Merge branch 'feature/planb' into dev
This commit is contained in:
commit
8df2ccf160
@ -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 || {},
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user