Commit a6616a1e authored by czh030's avatar czh030

修改定时任务-自动收货

parent 678a9818
......@@ -1415,7 +1415,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
LocalDateTime createTime = LocalDateTime.now().plus(0-parameterValue.intValue(), ChronoUnit.DAYS);
List<OrderDeliveryDO> list = orderDeliveryRepository.findAllByCreateTimeBeforeAndBuyerInnerStatus(createTime, BuyerInnerStatusEnum.BUYER_TO_RECEIVE.getCode());
for (OrderDeliveryDO orderDeliveryDO : list) {
OrderDO order = orderDeliveryDO.getOrder();
OrderDO order = orderRepository.findById(orderDeliveryDO.getOrder().getId()).orElse(null);
//Step 1 : 校验参数,修改发货记录统计数据
Wrapper<OrderReceiveBO> checkResult = baseOrderDeliveryService.checkBuyerOrderReceive(null, order, orderDeliveryDO.getBatchNo());
if(checkResult.getCode() != ResponseCode.SUCCESS.getCode()) {
......@@ -1429,8 +1429,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
//Step 2 : 执行工作流任务(修改订单状态、记录内外流转记录)
Wrapper<ProcessTaskBO> taskResult = baseOrderTaskService.execOrderProcess(order, checkResult.getData().getTaskJumpParamter());
if(taskResult.getCode() != ResponseCode.SUCCESS.getCode()) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return Wrapper.fail(taskResult.getCode(), taskResult.getMessage());
throw new BusinessException(ResponseCode.SERVICE_SCHEDULER_ERROR);
}
// order.getTask().setTaskId(taskResult.getData().getTaskId());
......
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