diff --git a/src/api_s2c/event/pobinglibao/ApiOpen.ts b/src/api_s2c/event/pobinglibao/ApiOpen.ts index 77e62a5..b97d08a 100644 --- a/src/api_s2c/event/pobinglibao/ApiOpen.ts +++ b/src/api_s2c/event/pobinglibao/ApiOpen.ts @@ -12,7 +12,11 @@ export default async function (call: ApiCall) { 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 || {}, diff --git a/src/public/pay.ts b/src/public/pay.ts index df09e44..61fef69 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -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: {