q-koa 11.9.7 → 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.
|
@@ -9,13 +9,6 @@ exports.loadModel = async ({ app, appName }) => {
|
|
|
9
9
|
|
|
10
10
|
// const modelList = await app.model.model.findAll({ raw: true })
|
|
11
11
|
|
|
12
|
-
await Promise.all(
|
|
13
|
-
['model', 'model_attributes'].map((item) =>
|
|
14
|
-
app.model[item].sync({
|
|
15
|
-
force: true,
|
|
16
|
-
})
|
|
17
|
-
)
|
|
18
|
-
)
|
|
19
12
|
const currentDisabledFindAllList = lodash.get(
|
|
20
13
|
app,
|
|
21
14
|
'appConfig.disabledFindAllList',
|
|
@@ -222,7 +215,13 @@ exports.loadModel = async ({ app, appName }) => {
|
|
|
222
215
|
dataList.push(obj)
|
|
223
216
|
}
|
|
224
217
|
}
|
|
225
|
-
|
|
218
|
+
await Promise.all(
|
|
219
|
+
['model', 'model_attributes'].map((item) =>
|
|
220
|
+
app.model[item].sync({
|
|
221
|
+
force: true,
|
|
222
|
+
})
|
|
223
|
+
)
|
|
224
|
+
)
|
|
226
225
|
const promise1 = app.model.model.bulkCreate(
|
|
227
226
|
dataList.map((item) => {
|
|
228
227
|
return {
|
|
@@ -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(
|
|
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)
|