diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java b/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java index e1fc6441..8b0450ee 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/sync/service/impl/SyncBaseThirdSxAbstract.java @@ -811,6 +811,7 @@ public abstract class SyncBaseThirdSxAbstract{ shopProductBase.setProduct_add_time(currentDate.getTime()); shopProductBase.setProduct_unit_price(BigDecimal.valueOf(jsonObj.getDouble("retail_price"))); String isSpecial=jsonObj.getStr("isSpecial",DicEnum.YESORNO_0.getCode()); + String is_open_automatic=DicEnum.YESORNO_0.getCode(); if(ObjectUtil.equals(isSpecial,DicEnum.YESORNO_0.getCode())||ObjectUtil.equals(isSpecial,DicEnum.YESORNO_1.getCode())){ shopProductBase.setIs_special(isSpecial);//是否特价商品 特价商品需要手动上架 todo 是否要开发定时上架功能 }else { @@ -830,6 +831,7 @@ public abstract class SyncBaseThirdSxAbstract{ shopProductBase.setUnit_name(jsonObj.getStr("unit")); shopProductBase.setProduct_state_id(StateCode.PRODUCT_STATE_OFF_THE_SHELF_UNCHECK); shopProductBase.setUnit_price(BigDecimal.valueOf(jsonObj.getDouble("retail_price"))); + is_open_automatic=DicEnum.YESORNO_1.getCode(); }else { shopProductBase.setShop_weight(stock); if(null!= jsonObj.getJSONArray("product_spec")){ @@ -944,6 +946,10 @@ public abstract class SyncBaseThirdSxAbstract{ shopProductItem.setItem_is_default(1); shopProductItem.setItem_enable(StateCode.PRODUCT_STATE_NORMAL); + shopProductItem.setIs_open_automatic(is_open_automatic); + if(is_open_automatic.equals(DicEnum.YESORNO_1.getCode())){ + shopProductItem.setAutomatic(stock.intValue()); + } //shopProductImage ShopProductImage shopProductImage = new ShopProductImage(); shopProductImage.setStore_id(storeIdInt);