Merge branch 'feature/planb' into dev

This commit is contained in:
dy 2023-12-20 16:44:44 +08:00
commit 8df2ccf160
2 changed files with 6 additions and 5 deletions

View File

@ -12,7 +12,11 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
let payIds = _hd?.data?.gift?.filter(i => i.payId)?.map(i => i.payId)
let payLog = await PayFun.getPayLogs(call.uid, payIds, [_hd.stime, _hd.etime])
let payLog: any = await PayFun.getPayLogs(call.uid, payIds)
for (let key in payLog) {
payLog[key]?.filter(i => i.time > _hd.stime && i.time < _hd.etime)
}
call.succ({
record: data?.record || {},

View File

@ -84,15 +84,12 @@ export class PayFun {
return allPlayerPayLog?.[payId] || [];
}
static async getPayLogs(uid: string, payIds?: string[], times?: number[]) {
static async getPayLogs(uid: string, payIds?: string[]) {
let where = {
uid: uid,
del_time: {$exists: false}
}
if (payIds?.length) where['key'] = {$in: payIds}
if (times?.length) {
where['time'] = {$gte: times[0], $lte: times[1]}
}
let logs = await G.mongodb.collection("payLogNew").find(where, {
projection: {