Browse Source

补充ims_ewei_shop_goods_option中的必填默认值

zhangwl 3 weeks ago
parent
commit
e17d83b504

+ 12 - 1
src/main/java/zs/payment/service/commodity/impl/CommodityProcureServiceImpl.java

@@ -603,6 +603,16 @@ public class CommodityProcureServiceImpl implements CommodityProcureService {
             option.setVirtual(0);
             option.setSku_id(sku.getSku_id());
             option.setThumb(sku.getSku_img());
+            //以下为必填
+            option.setExchangePostage(new BigDecimal(0));
+            option.setPresellprice(new BigDecimal(0));
+            option.setDay(0);
+            option.setAllfullbackprice(new BigDecimal(0));
+            option.setFullbackprice(new BigDecimal(0));
+            option.setIsfullback(0);
+            option.setIslive(0);
+            option.setLiveprice(new BigDecimal(0));
+
             optionService.save(option);
 
             totalStocks += sku.getStock();
@@ -1420,7 +1430,8 @@ public class CommodityProcureServiceImpl implements CommodityProcureService {
     public void deleteAll() {
 
         LambdaQueryWrapper<ImsEweiShopGoods> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.isNull(ImsEweiShopGoods::getGdId)
+        //ne(ImsEweiShopGoods::getMerchid,0)  代表是进货的商品
+        queryWrapper.ne(ImsEweiShopGoods::getMerchid,0)
             .eq(ImsEweiShopGoods::getUniacid, 470)
             .eq(ImsEweiShopGoods::getDeleted, 0);
 //        queryWrapper.last("limit 1");