fix bug
This commit is contained in:
parent
b39d0055ef
commit
87820f669a
@ -16,7 +16,6 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
||||
record: data?.record || {},
|
||||
buyLog: await PayFun.getPayLogs(call.uid, payIds)
|
||||
})
|
||||
checkResetBuyLog(call)
|
||||
}
|
||||
|
||||
export async function getConf(call, args?: { id?: string; payId?: string }) {
|
||||
@ -45,6 +44,6 @@ export async function checkResetBuyLog(call) {
|
||||
let payLogs = await PayFun.getPayLogs(call.uid, payIds)
|
||||
let payLogLength = R.flatten(R.values(payLogs)).filter(i => i.time < zeroTime).length
|
||||
if (payLogLength) {
|
||||
PayFun.delPayLog(call.uid, payIds.map(i => ({payId: i, val: []})))
|
||||
PayFun.delPayLog(call.uid, ...payIds.map(i => ({payId: i, val: []})))
|
||||
}
|
||||
}
|
@ -63,11 +63,7 @@ export class PayFun {
|
||||
);
|
||||
})
|
||||
|
||||
G.mongodb.collection('payLogNew').insertMany(args.filter(v => v.payId && v.val).map(i => ({
|
||||
key: i.payId,
|
||||
uid: uid,
|
||||
values: i.val
|
||||
})));
|
||||
G.mongodb.collection('payLogNew').insertMany(args.map(i => ({key: i.payId, uid: uid, values: i.val})));
|
||||
|
||||
G.server.sendMsgByUid(uid, 'msg_s2c/PayChange', Object.fromEntries(args.map(a => [a.payId, a.val])));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user