debug接口添加env限制

This commit is contained in:
luying
2022-09-02 14:07:24 +08:00
parent ff57712b18
commit ece5263894
3 changed files with 5 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ export async function checkPopUpConditions(serverId: number, roleId: string, con
let pushItems: PopUpShopItemShow[] = [];
for(let { conditionType, param } of conditions) {
for(let pkg of playerData.packages) {
console.log('##### 3', pkg.id, pkg.checkPackageCanPush(conditionType))
// console.log('##### 3', pkg.id, pkg.checkPackageCanPush(conditionType))
if( !pkg.checkPackageCanPush(conditionType)) { // 筛选推送
continue;
}

View File

@@ -1,6 +1,7 @@
import { isArray, isBoolean, isNumber, isString } from "underscore";
import { BLOCK_OPEATE, DEBUG_MAGIC_WORD, GM_MAIL_TYPE, GUILD_AUTH, GUILD_STRUCTURE, LINEUP_NUM, MSG_TYPE } from "../consts";
import { pvpEndParamInter } from "../pubUtils/interface";
import { isDevelopEnv } from "./utilService";
export function checkRouteParam(route: string, msg: any) {
switch(route) {
@@ -1550,7 +1551,7 @@ export function checkRouteParam(route: string, msg: any) {
}
case "role.heroHandler.addItem":
{
if(!checkNaturalNumbers(msg.id, msg.count)) return false;
if(!isDevelopEnv() && !checkNaturalNumbers(msg.id, msg.count)) return false;
break;
}
case 'activity.activityHandler.debugActivityMemory':
@@ -1628,7 +1629,7 @@ export function checkRouteParam(route: string, msg: any) {
case "activity.gachaHandler.debugClearGachaRecord":
case "battle.eventBattleHandler.debugRefEvent":
{
if (msg.magicWord !== DEBUG_MAGIC_WORD) return false;
if (msg.magicWord !== DEBUG_MAGIC_WORD || !isDevelopEnv()) return false;
break;
}
case "battle.comBattleHandler.getTeams":

View File

@@ -273,7 +273,7 @@ export default class ComBattleTeam extends BaseModel {
}
public static async syncTeamData(teamData: {teamCode: string, status: number, roleStatus: RoleStatus[], bossHpArr: BossHp[], endTime?: number}, timeout = false, lean = true) {
console.log('syncTeamData bossHpArr: ', teamData.bossHpArr);
// console.log('syncTeamData bossHpArr: ', teamData.bossHpArr);
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode: teamData.teamCode }, {$set :{...teamData, roleCnt: teamData.roleStatus.length, timeout}}, {new: true}).lean(lean);
return team;
}