q-koa 11.4.1 → 11.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1382,6 +1382,7 @@ exports.refund_notify = async (ctx) => {
1382
1382
  refund_price,
1383
1383
  type,
1384
1384
  out_refund_no,
1385
+ remark: refund_desc,
1385
1386
  })
1386
1387
  }
1387
1388
 
@@ -49,13 +49,16 @@ exports.refund = async ({
49
49
  where: {
50
50
  id,
51
51
  },
52
+ include: app.model.order_refund_record,
52
53
  })
53
54
  if (!orderDetail) throw new Error('不存在该订单')
54
55
  try {
55
56
  const data = {
56
57
  ...rest,
57
58
  out_trade_no,
58
- out_refund_no: `${prefix}-${id}_${type}`,
59
+ out_refund_no: `${prefix}-${id}_${type}-${
60
+ orderDetail.order_refund_records.length + 1
61
+ }`,
59
62
  total_fee: Math.round((total_fee || refund_fee || price) * 100),
60
63
  refund_fee: Math.round((refund_fee || price) * 100),
61
64
  notify_url: `https://${
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "11.4.1",
3
+ "version": "11.4.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {