diff --git a/src/api_s2c/event/zhoumolibao/ApiOpen.ts b/src/api_s2c/event/zhoumolibao/ApiOpen.ts index 7bed3a6..ebbcce3 100644 --- a/src/api_s2c/event/zhoumolibao/ApiOpen.ts +++ b/src/api_s2c/event/zhoumolibao/ApiOpen.ts @@ -17,7 +17,6 @@ export default async function (call: ApiCall) { record: data?.record || {}, buyLog: await PayFun.getPayLogs(call.uid, payIds) }) - } export async function getConf(call, args?: { id?: string; payId?: string }) { @@ -32,7 +31,7 @@ export async function checkResetBuyLog(call) { let zeroTime = PublicShared.getToDayZeroTime() let data = await G.mongodb.cEvent('zhoumolibao').findOne({uid: call.uid, type: 'zhoumolibao'}) - if (data.refreshTime && data.refreshTime <= zeroTime) { + if (data?.refreshTime <= zeroTime) { G.mongodb.cEvent(`zhoumolibao`).updateOne( {uid: call.uid, type: `zhoumolibao`}, {$set: {record: {}}},