Authored by mali

回退闪购二期需求

@@ -72,25 +72,25 @@ public class StorageDepositAutoDown implements YhJob { @@ -72,25 +72,25 @@ public class StorageDepositAutoDown implements YhJob {
72 storageDeposits.stream().forEach(item -> { 72 storageDeposits.stream().forEach(item -> {
73 LOGGER.info("method StorageDepositAutoDown.process item is {}", item); 73 LOGGER.info("method StorageDepositAutoDown.process item is {}", item);
74 74
75 - //int downResult = 0; 75 + int downResult = 0;
76 if (item.getOrderStatus() == 1) { 76 if (item.getOrderStatus() == 1) {
77 - boolean offResult = offShelveByErp(item); // 到期商品直接下架 77 + boolean offResult = offShelveByErp(item);
  78 + if (offResult) { // 下架成功之后触发,变成待拣货状态
  79 + downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),
  80 + 0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());
78 } 81 }
79 - //if (offResult) { // 下架成功之后触发,变成待拣货状态  
80 - //downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),  
81 - // 0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());  
82 - // }  
83 - //} else { // 下架成功之后触发,变成待拣货状态  
84 - // downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),  
85 - // 0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());  
86 - //}  
87 -  
88 - //if (downResult > 0) { 82 + } else { // 下架成功之后触发,变成待拣货状态
  83 + downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),
  84 + 0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());
  85 + }
  86 +
  87 + if (downResult > 0) {
89 notifyOwnerUid(item); // 修改成功之后,调用发通知 88 notifyOwnerUid(item); // 修改成功之后,调用发通知
90 89
91 - //clearOrderInfoCache(item);  
92 - //} else {  
93 - // LOGGER.error("storageDepositService.updateStatus find wrong, item is {}", item); 90 + clearOrderInfoCache(item);
  91 + } else {
  92 + LOGGER.error("storageDepositService.updateStatus find wrong, item is {}", item);
  93 + }
94 }); 94 });
95 95
96 result.setJobResultCode(JobResultCode.SUCCESS); 96 result.setJobResultCode(JobResultCode.SUCCESS);