注释掉一些log

This commit is contained in:
luying
2022-08-26 15:50:06 +08:00
parent 4b2e7d9d0f
commit 26b18b7ba0
17 changed files with 29 additions and 29 deletions
@@ -62,7 +62,7 @@ export class RechargeMoneyHandler {
} }
let notGetRecord = playerData.recordArr[0]; let notGetRecord = playerData.recordArr[0];
console.log('notGetRecord', JSON.stringify(notGetRecord)); // console.log('notGetRecord', JSON.stringify(notGetRecord));
await ActivityRechargeMoneyModel.addRecord(notGetRecord._id, item.id, `${item.gid}&${item.count}`); await ActivityRechargeMoneyModel.addRecord(notGetRecord._id, item.id, `${item.gid}&${item.count}`);
let goods = await addItems(roleId, roleName, sid, [{ id: item.gid, count: item.count }], ITEM_CHANGE_REASON.RECHARGE_REWARD) let goods = await addItems(roleId, roleName, sid, [{ id: item.gid, count: item.count }], ITEM_CHANGE_REASON.RECHARGE_REWARD)
@@ -157,7 +157,7 @@ export class NormalBattleHandler {
if (warInfo.warType == WAR_TYPE.COM_BATTLE) { if (warInfo.warType == WAR_TYPE.COM_BATTLE) {
return resResult(STATUS.BATTLE_END_WRONG_TYPE); return resResult(STATUS.BATTLE_END_WRONG_TYPE);
} }
console.log('####### warInfo.warType', warInfo.warType) // console.log('####### warInfo.warType', warInfo.warType)
const BattleRecord = await BattleRecordModel.getBattleRecordByCode(battleCode, true); const BattleRecord = await BattleRecordModel.getBattleRecordByCode(battleCode, true);
if (!BattleRecord || BattleRecord.status != 0) { if (!BattleRecord || BattleRecord.status != 0) {
@@ -255,7 +255,7 @@ export class NormalBattleHandler {
await challengeDailyGK(serverId, roleId, activityId, battleId) await challengeDailyGK(serverId, roleId, activityId, battleId)
} }
} else if (warInfo.warType == WAR_TYPE.ACT_NEW_HERO_GK) { } else if (warInfo.warType == WAR_TYPE.ACT_NEW_HERO_GK) {
console.log('##### warInfo.warType', warInfo.warType, isSuccess) // console.log('##### warInfo.warType', warInfo.warType, isSuccess)
if (isSuccess) { if (isSuccess) {
isFirst = await challengeNewHeroGK(serverId, roleId, activityId, battleId) isFirst = await challengeNewHeroGK(serverId, roleId, activityId, battleId)
} }
@@ -133,7 +133,7 @@ export class GateActivityHandler {
obj.setMemberRecord(code, newMemberRecord); obj.setMemberRecord(code, newMemberRecord);
let nextWeek = <number>getTimeFun().getAfterDayWithHour(7); let nextWeek = <number>getTimeFun().getAfterDayWithHour(7);
console.log('####### nextWeek', nextWeek) // console.log('####### nextWeek', nextWeek)
let index = getGAIndexInPinus(this.aid); let index = getGAIndexInPinus(this.aid);
// 更新redis数据 // 更新redis数据
let myR = new Rank(REDIS_KEY.USER_GATE_ACTIVITY, { serverId, guildCode, index }, true); let myR = new Rank(REDIS_KEY.USER_GATE_ACTIVITY, { serverId, guildCode, index }, true);
@@ -283,7 +283,7 @@ export class GuildTrainHandler {
let { trainInstances } = getArmyTrainJuDian(trainId); let { trainInstances } = getArmyTrainJuDian(trainId);
let trainInfo = getGuildTrainGkInfo(trainId, hid); let trainInfo = getGuildTrainGkInfo(trainId, hid);
let { progress } = findWhere(trainInstances, { hid }); let { progress } = findWhere(trainInstances, { hid });
console.log('progress = ' + progress); // console.log('progress = ' + progress);
let guildTrain = await GuildTrainModel.findTrainInstanceBoxByIndex(code, trainId, hid, progress); let guildTrain = await GuildTrainModel.findTrainInstanceBoxByIndex(code, trainId, hid, progress);
if (!guildTrain) { if (!guildTrain) {
res.releaseCallback();//解锁 res.releaseCallback();//解锁
@@ -65,7 +65,7 @@ export async function getPlayerActivityData(activityId: number, serverId: number
} }
let records = (playerSelfServerData && playerSelfServerData.challengeRecords) ? playerSelfServerData.challengeRecords : []; let records = (playerSelfServerData && playerSelfServerData.challengeRecords) ? playerSelfServerData.challengeRecords : [];
for (let record of records) { for (let record of records) {
console.log(challengeBeginTime, challengeEndTime, record.time) // console.log(challengeBeginTime, challengeEndTime, record.time)
if (record.time >= challengeBeginTime && record.time <= challengeEndTime) { if (record.time >= challengeBeginTime && record.time <= challengeEndTime) {
playerData.challengeCount++; playerData.challengeCount++;
} }
@@ -75,7 +75,7 @@ export async function sendRankMail(data: TimeLimitRankData, serverId: number) {
let reward = data.getRewardByRank(rank); let reward = data.getRewardByRank(rank);
if(reward) { if(reward) {
let guild = await GuildModel.findByCode(code, serverId, '+members'); let guild = await GuildModel.findByCode(code, serverId, '+members');
console.log(guild.members) // console.log(guild.members)
for(let roleId of guild.members) { for(let roleId of guild.members) {
await sendMailByContent(MAIL_TYPE.TIME_LIMIT_RANK, roleId, { await sendMailByContent(MAIL_TYPE.TIME_LIMIT_RANK, roleId, {
params: [data.tabName,`${rank}`], params: [data.tabName,`${rank}`],
+1 -1
View File
@@ -39,7 +39,7 @@ export function getRandSeResult(id: number, randSe: RandSe[], originSe: RandSe[]
randomResult.push(...allRandom); randomResult.push(...allRandom);
} }
console.log('##### getRandSeResult', startId, effectCount) // console.log('##### getRandSeResult', startId, effectCount)
for (let i = startId; i < effectCount; i++) { for (let i = startId; i < effectCount; i++) {
if(randSe[i]) { if(randSe[i]) {
@@ -620,7 +620,7 @@ export async function sendGuildCityDeclare(cityId: number, declareGuildCode: str
* @param serverId 区id * @param serverId 区id
*/ */
export async function calWoodenHorseAndSend(serverId: number) { export async function calWoodenHorseAndSend(serverId: number) {
console.log('calWoodenHorseAndSend'); // console.log('calWoodenHorseAndSend');
let obj = getRaceActivityObj(); let obj = getRaceActivityObj();
return await obj.calServerHorses(serverId); return await obj.calServerHorses(serverId);
} }
+1 -1
View File
@@ -143,7 +143,7 @@ export class WarReward {
// let warType = this.warInfo.warType; // let warType = this.warInfo.warType;
if(this.isSuccess) { // 成功了才给固定奖励 if(this.isSuccess) { // 成功了才给固定奖励
console.log(this.fixReward) // console.log(this.fixReward)
if(this.fixReward) this.handleFixReward(num); if(this.fixReward) this.handleFixReward(num);
if(this.conditionReward) this.handleConditionReward(num); if(this.conditionReward) this.handleConditionReward(num);
if(this.randomReward) await this.handleRandomReward(num); if(this.randomReward) await this.handleRandomReward(num);
+1 -1
View File
@@ -27,7 +27,7 @@ export default class Activity_Recharge_Money extends BaseModel {
//添加领取记录 //添加领取记录
public static async addRecord(_id: string, poolId: number, reward: string) { public static async addRecord(_id: string, poolId: number, reward: string) {
console.log(_id, poolId, reward) // console.log(_id, poolId, reward)
let result: ActivityRechargeMoneyModelType = await ActivityRechargeMoneyModel.findOneAndUpdate({ _id }, let result: ActivityRechargeMoneyModelType = await ActivityRechargeMoneyModel.findOneAndUpdate({ _id },
{ $set: { poolId, reward, rewardTime: new Date() } }, { $set: { poolId, reward, rewardTime: new Date() } },
{ upsert: true, new: true }).lean(true); { upsert: true, new: true }).lean(true);
+1 -1
View File
@@ -63,7 +63,7 @@ export default class Activity_Task_Pass extends BaseModel {
} }
public static async receiveItems(serverId: number, activityId: number, roleId: string, roundIndex: number, receivedReward: ReceivedReward[]) { public static async receiveItems(serverId: number, activityId: number, roleId: string, roundIndex: number, receivedReward: ReceivedReward[]) {
console.log(receivedReward) // console.log(receivedReward)
let result: ActivityTaskPassModelType = await ActivityTaskPassModel.findOneAndUpdate({ serverId, roleId, activityId, roundIndex}, let result: ActivityTaskPassModelType = await ActivityTaskPassModel.findOneAndUpdate({ serverId, roleId, activityId, roundIndex},
{ $push: { receivedReward: { $each: receivedReward } }}, { upsert: true, new: true }).lean(true); { $push: { receivedReward: { $each: receivedReward } }}, { upsert: true, new: true }).lean(true);
return result; return result;
@@ -57,7 +57,7 @@ export class FirstGiftPage {
items: FirstGiftItem[] = []; //奖励 items: FirstGiftItem[] = []; //奖励
constructor(data: FirstGiftDataInDb) { constructor(data: FirstGiftDataInDb) {
console.log(data) // console.log(data)
this.pageIndex = data.pageIndex; this.pageIndex = data.pageIndex;
this.targetMoney = data.targetMoney; this.targetMoney = data.targetMoney;
for (let obj of data.rewards) { for (let obj of data.rewards) {
+10 -10
View File
@@ -255,16 +255,16 @@ export class PopUpShopPackage {
// 检查这个礼包是否可以推送 // 检查这个礼包是否可以推送
public checkPackageCanPush(conditionType: POP_UP_SHOP_CONDITION_TYPE) { public checkPackageCanPush(conditionType: POP_UP_SHOP_CONDITION_TYPE) {
// 1. 达成条件类型是否符合 // 1. 达成条件类型是否符合
console.log('######### 3.5.1', this.conditionType, conditionType, this.conditionType != conditionType) // console.log('######### 3.5.1', this.conditionType, conditionType, this.conditionType != conditionType)
if(this.conditionType != conditionType) return false; if(this.conditionType != conditionType) return false;
// 2. 判断同类型是否是已经有在持续中的 // 2. 判断同类型是否是已经有在持续中的
console.log('######### 3.5.2', this.checkPushingItem, this.isPushing); // console.log('######### 3.5.2', this.checkPushingItem, this.isPushing);
if(this.checkPushingItem && this.isPushing) return false; if(this.checkPushingItem && this.isPushing) return false;
// 3. 自然日内推送次数 // 3. 自然日内推送次数
console.log('######### 3.5.3', this.canLvUp, this.pushCnt, this.hasPushCnt, this.pushCnt != -1, this.hasPushCnt >= this.pushCnt) // console.log('######### 3.5.3', this.canLvUp, this.pushCnt, this.hasPushCnt, this.pushCnt != -1, this.hasPushCnt >= this.pushCnt)
if(this.canLvUp == 1 && this.pushCnt != -1 && this.hasPushCnt >= this.pushCnt) return false; if(this.canLvUp == 1 && this.pushCnt != -1 && this.hasPushCnt >= this.pushCnt) return false;
// 4. 连续无视次数 // 4. 连续无视次数
console.log('######### 3.5.4', this.hasPassCnt, this.passCnt, this.passCnt > 0 && this.hasPassCnt >= this.passCnt) // console.log('######### 3.5.4', this.hasPassCnt, this.passCnt, this.passCnt > 0 && this.hasPassCnt >= this.passCnt)
if(this.passCnt > 0 && this.hasPassCnt >= this.passCnt) return false; if(this.passCnt > 0 && this.hasPassCnt >= this.passCnt) return false;
return true; return true;
@@ -408,18 +408,18 @@ export class PopShopItem {
} }
public checkItemCanPush(conditionType: POP_UP_SHOP_CONDITION_TYPE, param: PopUpConditionParamInter) { public checkItemCanPush(conditionType: POP_UP_SHOP_CONDITION_TYPE, param: PopUpConditionParamInter) {
console.log('##### xyz?1', this.hasBoughtCnt >= this.buyCnt) // console.log('##### xyz?1', this.hasBoughtCnt >= this.buyCnt)
if(this.hasBoughtCnt >= this.buyCnt) return false; if(this.hasBoughtCnt >= this.buyCnt) return false;
console.log('##### xyz?2', this.parent.getVipLv(), this.vipLv, this.parent.getVipLv() < this.vipLv) // console.log('##### xyz?2', this.parent.getVipLv(), this.vipLv, this.parent.getVipLv() < this.vipLv)
if(this.parent.getVipLv() < this.vipLv || this.parent.getLv() < this.lv) return false; if(this.parent.getVipLv() < this.vipLv || this.parent.getLv() < this.lv) return false;
console.log('##### xyz?3', this.parent.getLv(), this.lv, this.parent.getLv() < this.lv) // console.log('##### xyz?3', this.parent.getLv(), this.lv, this.parent.getLv() < this.lv)
if(this.parent.getLv() < this.lv) return false; if(this.parent.getLv() < this.lv) return false;
console.log('##### xyz?4', this.checkKeyTime()) // console.log('##### xyz?4', this.checkKeyTime())
if(!this.checkKeyTime()) return false if(!this.checkKeyTime()) return false
console.log('##### xyz?5', this.canLvUp, this.hasPushCnt, this.pushCnt, this.pushCnt != -1, this.hasPushCnt >= this.pushCnt) // console.log('##### xyz?5', this.canLvUp, this.hasPushCnt, this.pushCnt, this.pushCnt != -1, this.hasPushCnt >= this.pushCnt)
if(this.canLvUp == 0 && this.pushCnt != -1 && this.hasPushCnt >= this.pushCnt) return false if(this.canLvUp == 0 && this.pushCnt != -1 && this.hasPushCnt >= this.pushCnt) return false
console.log('##### xyz?6', conditionType, this.conditionParam, param) // console.log('##### xyz?6', conditionType, this.conditionParam, param)
switch(conditionType) { switch(conditionType) {
case POP_UP_SHOP_CONDITION_TYPE.LV_TO: case POP_UP_SHOP_CONDITION_TYPE.LV_TO:
return param.oldLv < this.conditionParam[0] && param.newLv >= this.conditionParam[0]; return param.oldLv < this.conditionParam[0] && param.newLv >= this.conditionParam[0];
@@ -150,7 +150,7 @@ export class RechargeMoneyData extends ActivityBase {
public initData(data: string) { public initData(data: string) {
let dataObj: RechargeMoneyInDb = JSON.parse(data); let dataObj: RechargeMoneyInDb = JSON.parse(data);
console.log(dataObj); // console.log(dataObj);
for(let pool of dataObj.pool) { for(let pool of dataObj.pool) {
let obj = new RechargeMoneyPool(pool); let obj = new RechargeMoneyPool(pool);
this.pool.push(obj); this.pool.push(obj);
@@ -75,7 +75,7 @@ export class RefreshShopItem {
let records = data.records ? data.records : []; let records = data.records ? data.records : [];
let buyRecords = records.filter(obj => { let buyRecords = records.filter(obj => {
let curRefTime = getZeroPointOfTime(obj.time, this.refreshType); let curRefTime = getZeroPointOfTime(obj.time, this.refreshType);
console.log(curRefTime, refZeroPoint) // console.log(curRefTime, refZeroPoint)
return obj && obj.id === this.id && obj.pageIndex == this.pageIndex && curRefTime == refZeroPoint return obj && obj.id === this.id && obj.pageIndex == this.pageIndex && curRefTime == refZeroPoint
}); });
this.buyCount = buyRecords.length; this.buyCount = buyRecords.length;
+1 -1
View File
@@ -65,7 +65,7 @@ export class SignInData extends ActivityBase {
if(this.type == ACTIVITY_TYPE.SIGN_IN || this.type == ACTIVITY_TYPE.SIGN_IN_VIP) { if(this.type == ACTIVITY_TYPE.SIGN_IN || this.type == ACTIVITY_TYPE.SIGN_IN_VIP) {
let time = getZeroPointOfTime(obj.time, SHOP_REFRESH_TYPE.DAILY, 0) let time = getZeroPointOfTime(obj.time, SHOP_REFRESH_TYPE.DAILY, 0)
let today = getZeroPoint(SHOP_REFRESH_TYPE.DAILY, 0); let today = getZeroPoint(SHOP_REFRESH_TYPE.DAILY, 0);
console.log('setPlayerRecords', time, today) // console.log('setPlayerRecords', time, today)
if(day.indexOf(time) == -1 && time < today) { if(day.indexOf(time) == -1 && time < today) {
this.todayIndex++; this.todayIndex++;
day.push(time); day.push(time);
+3 -3
View File
@@ -100,11 +100,11 @@ export class UpdateRegionParams {
checkParams() { checkParams() {
if(!this.id || !this.name || !this.prefix || !isString(this.versionCode) || !isString(this.curVersion) || !isString(this.updateResUrl)) { if(!this.id || !this.name || !this.prefix || !isString(this.versionCode) || !isString(this.curVersion) || !isString(this.updateResUrl)) {
console.log('1111', !this.id, !this.name, !this.prefix, !isString(this.versionCode),!isString(this.curVersion), !isString(this.updateResUrl)) // console.log('1111', !this.id, !this.name, !this.prefix, !isString(this.versionCode),!isString(this.curVersion), !isString(this.updateResUrl))
return false return false
} }
if(this.isOpen && (!this.maxPlayerCnt || !isArray(this.timers) || this.timers.length <= 0 || !isArray(this.activityGroupId) || this.activityGroupId.length <= 0 )) { if(this.isOpen && (!this.maxPlayerCnt || !isArray(this.timers) || this.timers.length <= 0 || !isArray(this.activityGroupId) || this.activityGroupId.length <= 0 )) {
console.log('2222') // console.log('2222')
return false return false
} }
return true; return true;
@@ -200,7 +200,7 @@ export class CreateServerParam {
} }
checkParams() { checkParams() {
console.log('##### createNew', this.env, this.openTime, this.stopRegisterTime, this.hasOpenMail, this.hasCircleMail) // console.log('##### createNew', this.env, this.openTime, this.stopRegisterTime, this.hasOpenMail, this.hasCircleMail)
if(!this.env || !this.openTime || !this.stopRegisterTime ) { if(!this.env || !this.openTime || !this.stopRegisterTime ) {
return false return false
} }