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

Commit a088638e authored by 胡佳晨's avatar 胡佳晨

提交 接口 同步 spu库存

parent f7f4de03
......@@ -24,9 +24,12 @@ public class WdtController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "spuId", value = "spuId"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "min", value = "间隔时间"),
})
public ResponseDto<Boolean> initErpStock(@RequestParam("spuId") String spuId,
@RequestParam("min") Integer min) {
return goblinErpService.initErpStock(spuId,min);
public ResponseDto<Boolean> initErpStock(@RequestParam(value = "spuId", required = false) String spuId,
@RequestParam(value = "min", required = false) Integer min) {
if (min <= 0) {
min = 5;
}
return goblinErpService.initErpStock(spuId, min);
}
}
......@@ -121,7 +121,7 @@ public class WdtServiceImpl implements IGoblinErpService {
}
//同步库存
private boolean syncStock(ArrayList<SyncStockVo> stockMap) {
private void syncStock(ArrayList<SyncStockVo> stockMap) {
for (SyncStockVo vo : stockMap) {
String skuId = "";
try {
......@@ -152,7 +152,6 @@ public class WdtServiceImpl implements IGoblinErpService {
log.error("同步库存失败 skuId:{},erpSpecNo:{},warehouseNo:{}", skuId, vo.getSpecNo(), vo.getWarehouseNo());
}
}
return true;
}
}
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