思迅同步库存问题修改,类型问题扣减问题

This commit is contained in:
liyj 2025-10-20 15:36:19 +08:00
parent e252475a34
commit 6637180cbf

View File

@ -901,7 +901,7 @@ public class SyncThirdDataServiceImpl extends SyncBaseThirdSxAbstract implements
String productKey= (String) k;
String[] productKeyArrys=productKey.split("-");
logger.info("productNumber:{}",productKeyArrys[0]);
logger.info("orderId:{}",productKeyArrys[0]);
logger.info("orderId:{}",productKeyArrys[1]);
if(productKeyArrys.length!=2){
return;
}
@ -958,7 +958,7 @@ public class SyncThirdDataServiceImpl extends SyncBaseThirdSxAbstract implements
String itemId=productBase.getProduct_number();
cn.hutool.json.JSONArray array_item_spec= JSONUtil.parseArray(spuItem.getItem_spec());
if(array_item_spec.isEmpty()){
redisTemplate.opsForHash().increment(key, itemId, delta.doubleValue());
redisTemplate.opsForHash().increment(key, itemId+"-"+orderId, delta.doubleValue());
continue;
}
cn.hutool.json.JSONObject item = (cn.hutool.json.JSONObject) ((cn.hutool.json.JSONObject) array_item_spec.get(0)).get("item");