From 12300703b5133777bb8036586737e262448caf53 Mon Sep 17 00:00:00 2001 From: dy Date: Wed, 27 Dec 2023 20:09:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E5=88=B7=E6=96=B0=E4=BB=98?= =?UTF-8?q?=E8=B4=B9=E7=A4=BC=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/yuandan/fun.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) 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)