|
@@ -132,6 +132,9 @@ class OrderService extends CrudService {
|
|
|
if (_.get(order, 'pay.result')) {
|
|
|
throw new BusinessError(ErrorCode.DATA_INVALID, '该订单已支付完成,无法使用此接口');
|
|
|
}
|
|
|
+ if (_.get(order, 'status') !== '0') {
|
|
|
+ throw new BusinessError(ErrorCode.DATA_INVALID, '该订单不处于可以退单的状态');
|
|
|
+ }
|
|
|
// 退单分为 2 部分, 涉及价格不需要管.因为这是交钱之前的的操作,不涉及退款
|
|
|
// 1.货物的库存
|
|
|
const { goods: shopGoods, total_detail } = order;
|