后台:虚拟充值

This commit is contained in:
luying
2022-02-10 20:20:31 +08:00
parent c77337d139
commit 04ebd0a9d7
7 changed files with 236 additions and 2 deletions
+2 -1
View File
@@ -22,7 +22,8 @@ export default class Activity extends BaseModel {
type: number; // 活动类型
@prop({ required: true })
data: string; // 活动表中的数据
@prop({ required: true })
name: string; // 活动名
@prop({ required: true })
timeType: number; // 活动时间类型 ACTIVITY_TIME_TYPE 1.服务器开启时间 2.角色创建时间 3.指定开启时间(beginTime,endTime)
+5
View File
@@ -36,6 +36,11 @@ export default class Activity_Group extends BaseModel {
return result;
}
public static async findByServerId(serverId: number) {
let result: ActivityGroupModelType[] = await ActivityGroupModel.find({ serverIds: serverId }).lean();
return result;
}
//查询组
public static async findGroupsData(groupIds: number[]) {
let result: ActivityGroupModelType[] = await ActivityGroupModel.find({ groupId: { $in: groupIds } }).lean();
@@ -96,6 +96,7 @@ export class ActivityInRemote {
days: number; // 活动持续天数 timeType=1、2
delayDay: number; // 迟几天开启活动,0表示按照规定时间开启
interval: number; // 周期性活动时间间隔,秒
name: string;
constructor(activity?: ActivityModelType) {
this.groupId = activity.groupId;
@@ -108,6 +109,7 @@ export class ActivityInRemote {
this.days = activity.days;
this.delayDay = activity.delayDay;
this.interval = activity.interval;
this.name = activity.name;
}
}
+14
View File
@@ -775,5 +775,19 @@
"name": "设置武将",
"module": "user",
"type": "update"
},
{
"id": 112,
"api": "gm.gmOrderHandler.getActivitiesCanBuy",
"name": "获取可以购买的活动",
"module": "order",
"type": "get"
},
{
"id": 113,
"api": "gm.gmOrderHandler.applyOrder",
"name": "虚拟充值",
"module": "order",
"type": "update"
}
]