Browse Source

补充创建商品spu中的贡献值

Yangzw 4 months ago
parent
commit
14ba52f624

+ 10 - 0
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/spu/ProductSpuServiceImpl.java

@@ -87,6 +87,16 @@ public class ProductSpuServiceImpl implements ProductSpuService {
             productSkuSaveReqVO.setMerchantId(userShopDetails.getMerId());
         }
 
+        //最大推广费, 单位: 分  add by Ben
+        Integer maxPromotionFee = 0;
+
+        for (ProductSkuSaveReqVO productSkuSaveReqVO : skuSaveReqList) {
+            Integer skuPromotionFee = productSkuSaveReqVO.getPromotionFee();
+            if(skuPromotionFee>maxPromotionFee)
+                maxPromotionFee=skuPromotionFee;
+        }
+        spu.setPromotionFee(maxPromotionFee);
+
         // 插入 SPU
         productSpuMapper.insert(spu);
         // 插入 SKU