活动:糜家商店挑战统计
This commit is contained in:
@@ -17,7 +17,7 @@ export enum ACTIVITY_TYPE {
|
||||
GROWTH_FUND_MAIN_ELITE = 10, // 精英成长基金 (注册后可见,永久存在)
|
||||
GROWTH_FUND_MAIN_ELITE_VIP = 11, // 精英成长基金(高阶)(注册后可见,永久存在)
|
||||
THIRTY_DAYS = 12, // 30日目标活动
|
||||
SELF_SERVICE_SHOP = 13, // 自选商店
|
||||
SELF_SERVICE_SHOP = 13, // 自选商店 糜家商队
|
||||
FIRST_GIFT = 14, // 首充礼包
|
||||
NEW_PLAYER_LIMIT_PACKAGE = 15, // 新手限定RMB购买礼包
|
||||
LIMIT_PACKAGE_SHOP_DAILY = 16, // 每日限购礼包,RMB购买礼包
|
||||
|
||||
@@ -39,8 +39,8 @@ export default class Activity_Self_Service extends BaseModel {
|
||||
//添加挑战记录
|
||||
public static async addChallengeRecord(serverId: number, activityId: number, roleId: string, roundIndex: number, count: number, time: Date) {
|
||||
let result: ActivitySelfServiceModelType = await ActivitySelfServiceModel.findOneAndUpdate(
|
||||
{ serverId, roleId, activityId, roundIndex, challengeRecords: { $elemMatch: { time } } },
|
||||
{ $inc: { "challengeRecords.$.count": count } }, { upsert: true, new: true }).lean(true);
|
||||
{ serverId, roleId, activityId, roundIndex, },
|
||||
{ $push: { challengeRecords: { count, time: new Date() } } }, { upsert: true, new: true }).lean(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ActivityBase } from './activityField';
|
||||
export class SelfServiceShopItemInfo {
|
||||
cellIndex: number; // 第几个坑位,从1开始
|
||||
cellType: number; //坑位类型 SELF_SERVICE_SHOP_CELL_TYPE 1.特殊 2.普通
|
||||
gift: number; //礼包内容
|
||||
gift: string; //礼包内容
|
||||
|
||||
constructor(data: any) {
|
||||
this.cellIndex = data.cellIndex;
|
||||
@@ -56,6 +56,7 @@ export class SelfServiceShopData extends ActivityBase {
|
||||
unitCountMax: number = 0;//元宝购买代币最大次数
|
||||
unitReward: string = '';//购买获得代币资源
|
||||
|
||||
challengeCount: number = 0;//挑战次数
|
||||
unitBuyCount: number = 0;//元宝购买代币次数
|
||||
roundIndex: number = 0; //第几周期 从1开始
|
||||
|
||||
@@ -87,6 +88,7 @@ export class SelfServiceShopData extends ActivityBase {
|
||||
this.unitPrice = dataObj.unitPrice;
|
||||
this.unitCountMax = dataObj.unitCountMax;
|
||||
this.unitReward = dataObj.unitReward;
|
||||
this.challengeCount = 0;
|
||||
|
||||
let arr = dataObj.data;
|
||||
for (let obj of arr) {
|
||||
|
||||
Reference in New Issue
Block a user