|
|
@ -1400,15 +1400,16 @@ public class OmsOrderServiceImpl extends ServiceImpl<OmsOrderMapper, OmsOrder> i |
|
|
|
@Transactional |
|
|
|
public boolean closeOrder(OmsOrder order) { |
|
|
|
releaseStock(order); |
|
|
|
// order.setStatus(OrderStatus.CLOSED.getValue());
|
|
|
|
order.setStatus(OrderStatus.DELETED.getValue()); |
|
|
|
order.setStatus(OrderStatus.CLOSED.getValue()); |
|
|
|
// order.setStatus(OrderStatus.DELETED.getValue());
|
|
|
|
|
|
|
|
OmsOrderOperateHistory history = new OmsOrderOperateHistory(); |
|
|
|
history.setOrderId(order.getId()); |
|
|
|
history.setCreateTime(new Date()); |
|
|
|
history.setOperateMan("shop"); |
|
|
|
history.setPreStatus(OrderStatus.INIT.getValue()); |
|
|
|
history.setOrderStatus(OrderStatus.DELETED.getValue()); |
|
|
|
// history.setPreStatus(OrderStatus.INIT.getValue());
|
|
|
|
history.setPreStatus(OrderStatus.CLOSED.getValue()); |
|
|
|
history.setOrderStatus(OrderStatus.CLOSED.getValue()); |
|
|
|
history.setNote("取消订单"); |
|
|
|
orderOperateHistoryService.save(history); |
|
|
|
|
|
|
@ -1426,7 +1427,8 @@ public class OmsOrderServiceImpl extends ServiceImpl<OmsOrderMapper, OmsOrder> i |
|
|
|
if (order.getStatus() != OrderStatus.DELIVERED.getValue()) { |
|
|
|
return new CommonResult().paramFailed("已发货订单才能确认收货"); |
|
|
|
} |
|
|
|
OmsOrderOperateHistory history = updateOrderInfo(id, order, OrderStatus.TO_COMMENT); |
|
|
|
// OmsOrderOperateHistory history = updateOrderInfo(id, order, OrderStatus.TO_COMMENT);
|
|
|
|
OmsOrderOperateHistory history = updateOrderInfo(id, order, OrderStatus.TRADE_SUCCESS); |
|
|
|
history.setNote("确认收货"); |
|
|
|
orderOperateHistoryService.save(history); |
|
|
|
|
|
|
|