✨ feat(db): 修改hero表数据库操作方式

This commit is contained in:
liangtongchuan
2023-05-06 17:07:48 +08:00
parent 3f3c1af549
commit 297e1af7ee
27 changed files with 133 additions and 137 deletions
@@ -12,7 +12,7 @@ import { addItems, getGoldObject, handleCost } from '../../../services/role/rewa
import { checkBattleHeroes } from '../../../services/normalBattleService';
import { gameData } from '../../../pubUtils/data';
import * as dicParam from '../../../pubUtils/dicParam';
import { HeroModel } from '../../../db/Hero';
import Hero from '../../../db/Hero';
import { vipCanSkipTower } from '../../../services/activity/monthlyTicketService';
import { pushTowerMsg } from '../../../services/sysChatService';
import { WarStar } from '../../../domain/dbGeneral';
@@ -311,7 +311,7 @@ export class TowerBattleHandler {
// 检查战力是否足够
let towerRec = await TowerRecordModel.getRecordByLv(roleId, oldTowerLv);
let heroes = await HeroModel.findByRole(roleId, [{ field: 'ce', sortBy: -1 }], 'hid ce job', true);
let heroes = await Hero.findByRole(roleId, [{ field: 'ce', sortBy: -1 }], 'hid ce job', true);
let newWarStar: WarStar[] = [], resultGoods: { towerLv: number, goods: { id: number, count: number }[] }[] = [], rewards: ItemInter[] = [];
for(let lv = oldTowerLv; lv < toLv; lv++) {