✨ feat(db): 修改hero表数据库操作方式
This commit is contained in:
@@ -25,7 +25,7 @@ import { getZeroPointD, getTimeFunD, getSeconds, nowSeconds } from '../../../pub
|
||||
import { FriendParams } from '../../../domain/roleField/friend';
|
||||
import { checkTask, checkTaskInComBattleStart } from '../../../services/task/taskService';
|
||||
import { gameData, getWarByBlueprtId } from '../../../pubUtils/data';
|
||||
import { HeroModel } from '../../../db/Hero';
|
||||
import Hero from '../../../db/Hero';
|
||||
import { addUserToTeamChannel, delTeamChannel, removeFromTeamChannel, sendMessageToTeam, sendMessageToUsersWithSuc, sendMessageToUserWithSuc } from '../../../services/pushService';
|
||||
import { getFriendRelationType, getRecommendType } from '../../../services/friendService';
|
||||
import { FriendRelationModel } from '../../../db/FriendRelation';
|
||||
@@ -274,7 +274,7 @@ export class ComBattleHandler {
|
||||
// let teamStatus = this.teamMap.get(teamCode);
|
||||
// if (!teamStatus || !teamStatus.roleIds || teamStatus.roleIds.indexOf(roleId) === -1) return resResult(STATUS.COM_BATTLE_TEAM_INVALID);
|
||||
|
||||
// const heroDBs = await HeroModel.findByHidRange(hids, roleId);
|
||||
// const heroDBs = await Hero.findByHidRange(hids, roleId);
|
||||
// const heroes = heroDBs.map(hero => {
|
||||
// return new ComRoleStatusHero(hero);
|
||||
// });
|
||||
@@ -307,7 +307,7 @@ export class ComBattleHandler {
|
||||
let teamStatus = getComTeamByCode(teamCode);
|
||||
if (!teamStatus || !teamStatus.roleIds || teamStatus.roleIds.indexOf(roleId) === -1) return resResult(STATUS.COM_BATTLE_TEAM_INVALID);
|
||||
|
||||
const heroDBs = await HeroModel.findByHidRange(hids, roleId);
|
||||
const heroDBs = await Hero.findByHidRange(hids, roleId);
|
||||
const heroes = heroDBs.map(hero => {
|
||||
return new ComRoleStatusHero(hero);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user