q-koa 11.9.2 → 11.9.4

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.
@@ -4,7 +4,7 @@ exports.init = async ({ app, appName }) => {
4
4
  const promiseFn = async (model) => {
5
5
  const result = await app.model[model].findAll({
6
6
  include: app.include[model],
7
- ...(app.config[model] ? app.config[model].autoData : {}),
7
+ // ...(app.config[model] ? app.config[model].autoData : {}),
8
8
  })
9
9
  app.cache.set(model, JSON.parse(JSON.stringify(result)))
10
10
  }
@@ -151,7 +151,10 @@ exports.login = async (ctx) => {
151
151
  return app.model[m] !== i.model
152
152
  })
153
153
  })
154
- const { exclude_list = [] } = await getAppConfig({ app, config })
154
+
155
+ const application = await getAppConfig({ app, config })
156
+ const exclude_list = lodash.get(application, 'exclude_list', [])
157
+
155
158
  const attributes = {
156
159
  exclude: Array.from(
157
160
  new Set([
@@ -337,7 +340,10 @@ exports.checkLogin = async (ctx) => {
337
340
  return app.model[m] !== i.model
338
341
  })
339
342
  })
340
- const { exclude_list = [] } = await getAppConfig({ app, config })
343
+
344
+ const application = await getAppConfig({ app, config })
345
+ const exclude_list = lodash.get(application, 'exclude_list', [])
346
+
341
347
  const attributes = {
342
348
  exclude: Array.from(
343
349
  new Set([
@@ -1369,11 +1369,11 @@ exports.refund_notify = async (ctx) => {
1369
1369
  }
1370
1370
 
1371
1371
  const order_id = out_refund_no.includes('_')
1372
- ? Number(out_refund_no.split('_')[0])
1373
- : Number(out_refund_no)
1372
+ ? Number(out_refund_no.split('_')[0].split('-')[1])
1373
+ : Number(out_refund_no.split('-')[1])
1374
1374
  const type = out_refund_no.includes('_') ? out_refund_no.split('_')[1] : ''
1375
1375
  const model = prefix ? `${prefix}_order` : 'order'
1376
- console.log(`微信退款回调 ${refund_desc}`)
1376
+ console.log(`微信退款回调 ${refundResult}`)
1377
1377
  if (app.service[model] && app.service[model].refund_notify) {
1378
1378
  await app.service[model].refund_notify({
1379
1379
  app,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "11.9.2",
3
+ "version": "11.9.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {