|
@@ -126,6 +126,9 @@ class OrderService extends CrudService {
|
|
assert(order_id, '缺少订单信息');
|
|
assert(order_id, '缺少订单信息');
|
|
const order = await this.model.findById(order_id);
|
|
const order = await this.model.findById(order_id);
|
|
if (!order) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '未找到订单信息');
|
|
if (!order) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '未找到订单信息');
|
|
|
|
+ if (_.get(order, 'pay.result')) {
|
|
|
|
+ throw new BusinessError(ErrorCode.DATA_INVALID, '该订单已支付完成,无法使用此接口');
|
|
|
|
+ }
|
|
// 退单分为 2 部分, 涉及价格不需要管.因为这是交钱之前的的操作,不涉及退款
|
|
// 退单分为 2 部分, 涉及价格不需要管.因为这是交钱之前的的操作,不涉及退款
|
|
// 1.货物的库存
|
|
// 1.货物的库存
|
|
const { goods: shopGoods, total_detail } = order;
|
|
const { goods: shopGoods, total_detail } = order;
|