Просмотр исходного кода

feat(merchant): 添加养老金分配功能

- 引入 CommonEnum 枚举类用于订单收益分配配置
- 为商品 ID 3447 添加养老金额计算逻辑
- 实现养老金额按比例分配功能
- 新增 yanglao 字段存储养老金额数据
shichen месяцев назад: 5
Родитель
Сommit
e36d1c0f72
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      app/common/repositories/system/merchant/MerchantRepository.php

+ 4 - 0
app/common/repositories/system/merchant/MerchantRepository.php

@@ -12,6 +12,7 @@ namespace app\common\repositories\system\merchant;
12 12
 
13 13
 
14 14
 use app\common\dao\system\merchant\MerchantDao;
15
+use app\common\enum\CommonEnum;
15 16
 use app\common\model\store\product\ProductReply;
16 17
 use app\common\repositories\BaseRepository;
17 18
 use app\common\repositories\store\product\ProductCopyRepository;
@@ -501,6 +502,9 @@ class MerchantRepository extends BaseRepository
501 502
                         3=>$v['price']//复购金
502 503
                     ]
503 504
                 ];
505
+            }else if ($productMerId == 3447) {
506
+                $yanglao = bcmul($v['price'], CommonEnum::ORDER_EARNING_ALLOCATION['SharedProsperity']['Self']['YangLaoJin']['Ratio']['code'], 2);
507
+                $v['yanglao'] = $yanglao;
504 508
             }
505 509
 
506 510
 //            $v=($v,$k);