|
@@ -104,7 +104,7 @@ class OrderService extends CrudService {
|
|
// 处理库存,删除购物车
|
|
// 处理库存,删除购物车
|
|
await this.dealGoodsNum(goodsData);
|
|
await this.dealGoodsNum(goodsData);
|
|
// 处理优惠券,改为使用过
|
|
// 处理优惠券,改为使用过
|
|
- if (coupon.length > 1) await this.ctx.service.user.userCoupon.useCoupon(coupon, this.tran);
|
|
|
|
|
|
+ if (coupon.length > 0) await this.ctx.service.user.userCoupon.useCoupon(coupon, this.tran);
|
|
await this.tran.run();
|
|
await this.tran.run();
|
|
// 创建定时任务(mq死信机制任务)
|
|
// 创建定时任务(mq死信机制任务)
|
|
await this.toMakeTask(order_id);
|
|
await this.toMakeTask(order_id);
|