Sfoglia il codice sorgente

feat(product): 添加养老金计算功能

- 在产品仓库中增加针对商户ID为3447的特殊处理逻辑
- 实现产品SKU价格查询并按升序排列
- 集成养老金额度计算公式,基于价格和分配比例
- 添加对SharedProsperity模块中养老金比率的引用
- 扩展现有产品属性值表的数据查询功能
shichen 4 mesi fa
parent
commit
75cf0ac7b5

+ 3 - 0
app/common/repositories/store/product/ProductRepository.php

@@ -1849,6 +1849,9 @@ class ProductRepository extends BaseRepository
1849 1849
                         3=>$product['price']//复购金
1850 1850
                     ]
1851 1851
                 ];
1852
+            } else if($product['mer_id'] == 3447){
1853
+                $productSku = Db::name('store_product_attr_value')->where('product_id', $good_id)->order('price asc')->find();
1854
+                $yanglao = bcmul($productSku['price'], CommonEnum::ORDER_EARNING_ALLOCATION['SharedProsperity']['Self']['YangLaoJin']['Ratio']['code'], 2);
1852 1855
             } else {
1853 1856
                 // 商贸区
1854 1857
                 /** @var MerchantRepository $merchant */