|
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.aliyun.dts.subscribe.clients.record.OperationType;
|
|
import com.aliyun.dts.subscribe.clients.record.OperationType;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
+import com.kxs.common.core.util.RetOps;
|
|
|
import com.kxs.product.api.model.KxsShopGoods;
|
|
import com.kxs.product.api.model.KxsShopGoods;
|
|
|
import com.kxs.product.api.model.KxsShopGoodsPic;
|
|
import com.kxs.product.api.model.KxsShopGoodsPic;
|
|
|
import com.kxs.product.api.model.KxsShopGoodsSku;
|
|
import com.kxs.product.api.model.KxsShopGoodsSku;
|
|
@@ -139,8 +140,10 @@ public class KxsShopGoodsServiceImpl extends ServiceImpl<KxsShopGoodsMapper, Kxs
|
|
|
}
|
|
}
|
|
|
//获取sku列表
|
|
//获取sku列表
|
|
|
FieldData fieldData = fieldDataMap.get("NormJson");
|
|
FieldData fieldData = fieldDataMap.get("NormJson");
|
|
|
- String value = fieldData.getValue().toString();
|
|
|
|
|
- if(StrUtil.isNotBlank(value) && value.contains("#cut#")){
|
|
|
|
|
|
|
+ if(fieldData.getValue() != null && StrUtil.isNotBlank(fieldData.getValue().toString()) && fieldData.getValue().toString().contains("#cut#") ){
|
|
|
|
|
+
|
|
|
|
|
+ String value = fieldData.getValue().toString();
|
|
|
|
|
+
|
|
|
List<KxsShopGoodsSku> specs = new ArrayList<>();
|
|
List<KxsShopGoodsSku> specs = new ArrayList<>();
|
|
|
|
|
|
|
|
String goodsSku = value.substring(value.indexOf("#cut#") + 5);
|
|
String goodsSku = value.substring(value.indexOf("#cut#") + 5);
|
|
@@ -195,6 +198,7 @@ public class KxsShopGoodsServiceImpl extends ServiceImpl<KxsShopGoodsMapper, Kxs
|
|
|
kxsShopGoodsSkuService.updateById(kxsShopGoodsSku);
|
|
kxsShopGoodsSkuService.updateById(kxsShopGoodsSku);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ //添加商品
|
|
|
KxsShopGoods kxsShopGoods = baseMapper.selectById(goods.getId());
|
|
KxsShopGoods kxsShopGoods = baseMapper.selectById(goods.getId());
|
|
|
if(kxsShopGoods == null){
|
|
if(kxsShopGoods == null){
|
|
|
baseMapper.insert(goods);
|
|
baseMapper.insert(goods);
|