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

Commit 9d0f56e4 authored by 胡佳晨's avatar 胡佳晨

需改 erphosting 不是1不处理

parent c2dcf08e
......@@ -108,8 +108,8 @@ public class WdtServiceImpl implements IGoblinErpService {
// for (int i = 0; i < pageCount; i++) {
// param.put("page_no", i + "");
GoblinStoreErpConfigVo storeErpConfigVo = goblinRedisUtils.getStoreErpConfigVoByStoreId(data.getStoreId());
if(storeErpConfigVo==null){
log.error("storeId:{},查询失败",data.getStoreId());
if (storeErpConfigVo == null) {
log.error("storeId:{},查询失败", data.getStoreId());
continue;
}
json = erpWdtClient.execute(ErpEnum.WdtAPI.STOCK_QUERY.getUri(), param, storeErpConfigVo.getAppKey(), storeErpConfigVo.getSid(), storeErpConfigVo.getAppSecret());
......@@ -163,7 +163,7 @@ public class WdtServiceImpl implements IGoblinErpService {
for (SyncStockVo vo : stockMap) {
String skuId = "";
try {
GoblinGoodsSkuInfoVo skuInfoVo = mongoTemplate.findOne(Query.query(Criteria.where("skuErpCode").is(vo.getSpecNo()).and("erpWarehouseNo").is(vo.getWarehouseNo())), GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
GoblinGoodsSkuInfoVo skuInfoVo = mongoTemplate.findOne(Query.query(Criteria.where("skuErpCode").is(vo.getSpecNo()).and("erpWarehouseNo").is(vo.getWarehouseNo()).and("erpHosting").is(1)), GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
int changeStock = vo.getStockErpNum().subtract(BigDecimal.valueOf(skuInfoVo.getSkuStock())).intValue();
skuId = skuInfoVo.getSkuId();
//mongo修改
......@@ -207,9 +207,13 @@ public class WdtServiceImpl implements IGoblinErpService {
String orderId = goblinRedisUtils.erpLeftPop(shopNo);
if (orderId != null) {
list.add(orderId);
} else {
break;
}
}
if (list.size() != 0) {
orderIdList.add(list);
}
} else {
List<String> a = CollectionUtil.arrayListString();
a.add(singleId);
......
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