q-koa 9.6.0 → 9.7.0
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
|
@@ -1011,7 +1011,36 @@ class APP {
|
|
|
1011
1011
|
let _where
|
|
1012
1012
|
|
|
1013
1013
|
if (where) {
|
|
1014
|
-
|
|
1014
|
+
if (fn === 'findAndCountAll') {
|
|
1015
|
+
const formatWhere = _.mapValues(where, (item) => {
|
|
1016
|
+
if (_.isObject(item)) {
|
|
1017
|
+
if (
|
|
1018
|
+
item.hasOwnProperty('$notIn') &&
|
|
1019
|
+
typeof item.$notIn === 'string'
|
|
1020
|
+
) {
|
|
1021
|
+
return {
|
|
1022
|
+
$notIn: [Sequelize.literal(item.$notIn)],
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
if (
|
|
1027
|
+
item.hasOwnProperty('$in') &&
|
|
1028
|
+
typeof item.$in === 'string'
|
|
1029
|
+
) {
|
|
1030
|
+
return {
|
|
1031
|
+
$in: [Sequelize.literal(item.$in)],
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
return item
|
|
1035
|
+
} else {
|
|
1036
|
+
return item
|
|
1037
|
+
}
|
|
1038
|
+
})
|
|
1039
|
+
_where = _.cloneDeep(formatWhere)
|
|
1040
|
+
} else {
|
|
1041
|
+
_where = _.cloneDeep(where)
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1015
1044
|
// if (util.isObject(where)) {
|
|
1016
1045
|
// _where = _.cloneDeep(where);
|
|
1017
1046
|
// } else if (util.isString(where)) {
|
package/core/config.js
CHANGED
|
@@ -1158,12 +1158,12 @@ exports.refund_notify = async (ctx) => {
|
|
|
1158
1158
|
const pay_config = ctx.params.sub || 'weixin_pay'
|
|
1159
1159
|
|
|
1160
1160
|
const appConfig = getConfig(app)
|
|
1161
|
-
const { key } = await appConfig.getObject(pay_config)
|
|
1161
|
+
const { key, partner_key } = await appConfig.getObject(pay_config)
|
|
1162
1162
|
|
|
1163
1163
|
const { req_info } = result.xml
|
|
1164
1164
|
const refundResult = await getRefundResultJson({
|
|
1165
1165
|
req_info,
|
|
1166
|
-
app_key: key,
|
|
1166
|
+
app_key: key.length > 10 ? key : partner_key,
|
|
1167
1167
|
})
|
|
1168
1168
|
|
|
1169
1169
|
const { out_refund_no, out_trade_no, total_fee, refund_fee } = refundResult
|
|
@@ -1271,6 +1271,7 @@ exports.checkPay = async (ctx) => {
|
|
|
1271
1271
|
order_id: id,
|
|
1272
1272
|
order_price,
|
|
1273
1273
|
transactionid: payResult.transaction_id,
|
|
1274
|
+
out_trade_no: payResult.out_trade_no,
|
|
1274
1275
|
})
|
|
1275
1276
|
}
|
|
1276
1277
|
|