| | |
| | | if (!check){ |
| | | throw new ServiceException("订单不存在"); |
| | | } |
| | | order.setOrderStatus(OrderStatus.COMPLETED.getCode()); |
| | | orderMapper.updateById(order); |
| | | Integer orderType = order.getOrderType(); |
| | | |
| | | // 售后设置 |
| | |
| | | String content = baseSetting.getContent(); |
| | | JSONObject jsonObject = JSONObject.parseObject(content); |
| | | Long days = jsonObject.getLong("days"); |
| | | if (days != null && days > 0){ |
| | | commissionService.addToCommissionDelayQueue(order.getId(), LocalDateTime.now().plusDays(days)); |
| | | } |
| | | order.setOrderStatus(OrderStatus.COMPLETED.getCode()); |
| | | order.setIsCommission(0); |
| | | order.setAfterSaleTime(LocalDateTime.now().plusDays(days)); |
| | | orderMapper.updateById(order); |
| | | } |
| | | |
| | | |