17 lines
645 B
TypeScript
17 lines
645 B
TypeScript
import {ApiCall} from "tsrpc";
|
|
import {ReqDZOpen, ResDZOpen} from "../../../shared/protocols/event/yuandan/PtlDZOpen";
|
|
import {HuoDongFun} from "../../../public/huodongfun";
|
|
import {PayFun} from "../../../public/pay";
|
|
|
|
export default async function (call: ApiCall<ReqDZOpen, ResDZOpen>) {
|
|
let data = await G.mongodb.cEvent('yuandandingzhi').findOne({uid: call.uid, type: 'yuandandingzhi'})
|
|
|
|
let _hd = (await HuoDongFun.gethdList(call, 14))[0]
|
|
|
|
let payIds = _hd?.data?.gift?.filter(i => i.payId)?.map(i => i.payId)
|
|
|
|
call.succ({
|
|
record: data?.record || {},
|
|
buyLog: await PayFun.getPayLogs(call.uid, payIds)
|
|
})
|
|
} |