Authored by mali

回退闪购二期需求

... ... @@ -72,25 +72,25 @@ public class StorageDepositAutoDown implements YhJob {
storageDeposits.stream().forEach(item -> {
LOGGER.info("method StorageDepositAutoDown.process item is {}", item);
//int downResult = 0;
int downResult = 0;
if (item.getOrderStatus() == 1) {
boolean offResult = offShelveByErp(item); // 到期商品直接下架
boolean offResult = offShelveByErp(item);
if (offResult) { // 下架成功之后触发,变成待拣货状态
downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),
0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());
}
} else { // 下架成功之后触发,变成待拣货状态
downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),
0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());
}
//if (offResult) { // 下架成功之后触发,变成待拣货状态
//downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),
// 0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());
// }
//} else { // 下架成功之后触发,变成待拣货状态
// downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),
// 0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());
//}
//if (downResult > 0) {
if (downResult > 0) {
notifyOwnerUid(item); // 修改成功之后,调用发通知
//clearOrderInfoCache(item);
//} else {
// LOGGER.error("storageDepositService.updateStatus find wrong, item is {}", item);
clearOrderInfoCache(item);
} else {
LOGGER.error("storageDepositService.updateStatus find wrong, item is {}", item);
}
});
result.setJobResultCode(JobResultCode.SUCCESS);
... ...