思迅批量对接次日更新库存

This commit is contained in:
liyj 2025-10-13 14:48:43 +08:00
parent 13ec66d045
commit 2758b5ac62

View File

@ -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);