记得上下班打卡 | git大法好,push需谨慎

Commit 2d6fc6eb authored by 胡佳晨's avatar 胡佳晨

erp 添加 同步库存 如果无库存同步 反馈异常文案

parent f4c9b3d4
...@@ -89,7 +89,7 @@ public class WdtServiceImpl implements IGoblinErpService { ...@@ -89,7 +89,7 @@ public class WdtServiceImpl implements IGoblinErpService {
param.put("spec_no", skuInfoVo.getSkuErpCode()); param.put("spec_no", skuInfoVo.getSkuErpCode());
json = erpWdtClient.execute(ErpEnum.WdtAPI.STOCK_QUERY.getUri(), param); json = erpWdtClient.execute(ErpEnum.WdtAPI.STOCK_QUERY.getUri(), param);
ArrayList<SyncStockVo> list = baseStock(json); ArrayList<SyncStockVo> list = baseStock(json);
String error = syncStockError(list,json); String error = syncStockError(list,json,spuId);
if(!"".equals(error)){ if(!"".equals(error)){
return ResponseDto.failure(error); return ResponseDto.failure(error);
} }
...@@ -117,10 +117,10 @@ public class WdtServiceImpl implements IGoblinErpService { ...@@ -117,10 +117,10 @@ public class WdtServiceImpl implements IGoblinErpService {
return ResponseDto.success(); return ResponseDto.success();
} }
private String syncStockError(ArrayList<SyncStockVo> list,String json){ private String syncStockError(ArrayList<SyncStockVo> list,String json,String spuId){
if(list.size()==0){ if(list.size()==0){
log.error("无数据同步 json : {}",json); log.error("erp未找到相关商品,同步失败 spuId : {} json : {}",spuId,json);
return "无数据同步"; return "erp未找到相关商品,同步失败";
} }
return ""; return "";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment