@@ -99,11 +99,9 @@ class AfterSaleService extends CrudService {
// 部分退,部分退是不退优惠券的
refundMoney = needRefund;
}
- // 找下当前这个订单有多少次售后记录
- let num = await this.model.count({ order_detail: data.order_detail });
- num += 2;
// 组成退款单号
- const out_refund_no = `${order_no}-r${num}`;
+ const str = this.ctx.service.util.trade.createNonceStr();
+ const out_refund_no = `${order_no}-r-${str}`;
const obj = { reason, money: refundMoney, order_no, out_refund_no };
// 退款请求
if (refundMoney > 0) {