q-koa 12.0.0 → 12.0.1

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.
@@ -66,8 +66,18 @@ exports.refund = async ({
66
66
  site_host || 'api.kuashou.com'
67
67
  }/${appName}/weixin/refund_notify/${pay_config}`,
68
68
  }
69
- const { result_code, err_code_des } = await payObj.refund(data)
69
+ const { result_code, err_code_des, out_refund_no } = await payObj.refund(
70
+ data
71
+ )
70
72
  if (result_code === 'SUCCESS') {
73
+ const hasResult = await app.model.order_refund_record.findOne({
74
+ where: {
75
+ out_refund_no,
76
+ },
77
+ })
78
+ if (hasResult) {
79
+ throw new Error('退款错误')
80
+ }
71
81
  return true
72
82
  } else {
73
83
  console.error(data)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "12.0.0",
3
+ "version": "12.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {