|
|
@@ -540,6 +540,11 @@ public class ProductOrderInfoServiceImpl extends ServiceImpl<ProductOrderInfoMap
|
|
|
// 查询并校验订单(公共方法提取)
|
|
|
ProductOrderInfo productOrderInfo = getAndCheckOrder(dto.getOrderId(), null);
|
|
|
|
|
|
+ // 保证只有在待发货的状态才能修改
|
|
|
+ if(ObjectUtil.notEqual(ProductOrderStatusEnum.WAIT_DELIVERY.getCode(), productOrderInfo.getOrderStatus())){
|
|
|
+ throw new ServiceException("订单状态不是待发货状态无权限操作");
|
|
|
+ }
|
|
|
+
|
|
|
BeanUtil.copyProperties(dto, productOrderInfo);
|
|
|
productOrderInfo.setUpdateTime(LocalDateTime.now());
|
|
|
|