Revert "✨ feat(db): 修改对item表的数据库操作方式"
This reverts commit 97a36fda70fc1ccbb7f310b04d149f46f997a614.
This commit is contained in:
@@ -12,7 +12,7 @@ import { STATUS } from '../../../consts/statusCode';
|
||||
import { Application, BackendSession } from 'pinus';
|
||||
import { resResult, getRandSingleEelm, cal } from '../../../pubUtils/util';
|
||||
import { RoleStatus, ComBattleTeamModel, ComBattleTeamType, BossHp, ComRoleStatusHero } from '../../../db/ComBattleTeam';
|
||||
import Item, { ItemType } from '../../../db/Item';
|
||||
import { ItemModel, ItemType } from '../../../db/Item';
|
||||
import { addItems, handleCost } from '../../../services/role/rewardService';
|
||||
import { checkRoleInQueue, getServerName, redisClient, rmCreatedTeamFromRedis, rmRoleFromQueue, setTeamSearchReq } from '../../../services/redisService';
|
||||
import { getRandBlueprtId, getFrd, updateRobotHurtByTime, comBtlLvInvalid, clearRobotHurtTimer, setDismissTimer, dismissTeam, handleComBtlProgress, getComBattleFriendAdd, teammateInBlackList, blueprtIdValid, hasEnoughBlueprt, addRoleToTeam, addRoleStToTeam, addValidSearchingRoles, validToJoin, addRobotsToTeam, addRobotsLater, teamIsFullToStart, oneTeamNotInBlack, getAllAssistCnt, checkHasMyTeam, checkTeamStatusAndSend, getComBtlLvByPlayerLv, addToSearchingTeams, getCapFrd, getCapExtraCnt, startTeam } from '../../../services/battle/comBattleService';
|
||||
@@ -631,9 +631,9 @@ export class ComBattleHandler {
|
||||
let { ids } = msg;
|
||||
let blueprts: ItemType[];
|
||||
if (ids && ids.length) {
|
||||
blueprts = await Item.findbyRoleAndIds(roleId, ids);
|
||||
blueprts = await ItemModel.findbyRoleAndIds(roleId, ids);
|
||||
} else {
|
||||
blueprts = await Item.findByRoleAndType(roleId, CONSUME_TYPE.BLUEPRT);
|
||||
blueprts = await ItemModel.findByRoleAndType(roleId, CONSUME_TYPE.BLUEPRT);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS, { blueprts });
|
||||
}
|
||||
@@ -660,7 +660,7 @@ export class ComBattleHandler {
|
||||
async getComBtlCnt(msg: {}, session: BackendSession) {
|
||||
let roleId = session.get('roleId');
|
||||
let cnt = await getAllAssistCnt(roleId);
|
||||
const blueprts = await Item.findByRoleAndType(roleId, CONSUME_TYPE.BLUEPRT);
|
||||
const blueprts = await ItemModel.findByRoleAndType(roleId, CONSUME_TYPE.BLUEPRT);
|
||||
let capExtraCnt = await getCapExtraCnt(roleId);
|
||||
return resResult(STATUS.SUCCESS, { blueprts, assistCnt: cnt, capExtraCnt });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user