Browse Source

处理编辑上下架的bug

yujia 7 years ago
parent
commit
2fb6535944

+ 3 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java

@@ -616,10 +616,9 @@ public class GoodsServiceImpl implements GoodsService {
         goods.setReserve(goods);
         if (NumberUtil.compare(goods.getMinPackQty(), DoubleConstant.zero) < 1) {
             goods.setMinPackQty(DoubleConstant.minReserve);
-            goods.setMinBuyQty();
         }
+        goods.setMinBuyQty();
         goods.setPerQty();
-        goods.setStatus();
         // 设置货到香港,货到大陆的延长时间
         if (goods.getMinDelivery() != null || goods.getMaxDelivery() != null) {
             setB2CDelayTime(goods);
@@ -631,6 +630,7 @@ public class GoodsServiceImpl implements GoodsService {
         goods.setWithOutTaxUSDPrice();
         // 计算本批最小价格
         goods.setMaxAndMinPrice();
+        goods.setStatus();
     }
 
 
@@ -4030,6 +4030,7 @@ public class GoodsServiceImpl implements GoodsService {
                 goods.setMinPackQty(product.getMinPackQty());
                 goods.setPackaging(product.getPackaging());
                 goods.setMinBuyQty();
+                goods.adjustFragmentPrice();
                 if (goods.getAutoPublish() == null) {
                     goods.setAutoPublish(Boolean.TRUE);
                 }