q-koa 7.8.0 → 7.8.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.
package/core/app.js
CHANGED
|
@@ -1472,11 +1472,15 @@ class APP {
|
|
|
1472
1472
|
if (omit.length === 0) {
|
|
1473
1473
|
ctx.SUCCESS(result)
|
|
1474
1474
|
} else {
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1475
|
+
if (['findAndCountAll', 'findAll'].includes(fn)) {
|
|
1476
|
+
ctx.SUCCESS(
|
|
1477
|
+
result.map((target) => {
|
|
1478
|
+
return _.omit(target.toJSON(), omit)
|
|
1479
|
+
})
|
|
1480
|
+
)
|
|
1481
|
+
} else {
|
|
1482
|
+
ctx.SUCCESS(_.omit(result.toJSON(), omit))
|
|
1483
|
+
}
|
|
1480
1484
|
}
|
|
1481
1485
|
} else {
|
|
1482
1486
|
const rows = await app[appName].model[controller][fn]({
|
|
@@ -956,12 +956,14 @@ exports.refund_notify = async (ctx) => {
|
|
|
956
956
|
const prefix =
|
|
957
957
|
out_trade_no.split('_').length === 4 ? out_trade_no.split('_')[1] : ''
|
|
958
958
|
|
|
959
|
-
const order_id =
|
|
960
|
-
? Number(
|
|
961
|
-
: Number(
|
|
962
|
-
const type =
|
|
959
|
+
const order_id = out_refund_no.includes('_')
|
|
960
|
+
? Number(out_refund_no.split('_')[0])
|
|
961
|
+
: Number(out_refund_no)
|
|
962
|
+
const type = out_refund_no.includes('_') ? out_refund_no.split('_')[1] : ''
|
|
963
963
|
const model = prefix ? `${prefix}_order` : 'order'
|
|
964
|
-
console.log(
|
|
964
|
+
console.log(
|
|
965
|
+
`微信退款回调 prefix:${prefix}/model:${model}/order_id:${order_id}/type:${type}`
|
|
966
|
+
)
|
|
965
967
|
if (app.service[model] && app.service[model].refund_notify) {
|
|
966
968
|
await app.service[model].refund_notify({
|
|
967
969
|
app,
|