diff --git a/src/api_s2c/event/yuandan/fun.ts b/src/api_s2c/event/yuandan/fun.ts index 23f9037..785049d 100644 --- a/src/api_s2c/event/yuandan/fun.ts +++ b/src/api_s2c/event/yuandan/fun.ts @@ -2,6 +2,7 @@ import {ApiCall} from 'tsrpc'; import {HuoDongFun} from '../../../public/huodongfun'; import {christmas} from '../../../shared/protocols/event/christmas/PtlOpen'; import {PublicShared} from '../../../shared/public/public'; +import {PayFun} from "../../../public/pay"; export class Yuandanfun { /**配置 */ @@ -27,10 +28,19 @@ export class Yuandanfun { refreshTime: G.time }, }, {upsert: true, returnDocument: 'after'})).value + this.refreshPayLog(call) } return data } + static async refreshPayLog(call: ApiCall) { + let _hd = await this.getCon(call) + let payIds = _hd?.data?.gift?.filter(i=>i.payId).map(i=>i.payId) + PayFun.delPayLog(call.uid, ...payIds.map(i => { + return {payId: i, val: []} + })) + } + /**获取所有taskid 及对应的值 */ static async getTaskVal(call: ApiCall) { let _initCon = await this.getCon(call)