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

This commit is contained in:
liangtongchuan
2023-05-06 15:48:16 +08:00
parent 2ff9f8c5f1
commit e65efa4192
79 changed files with 423 additions and 423 deletions

View File

@@ -4,7 +4,7 @@ import { STATUS, GACHA_TYPE, HERO_QUALITY_TYPE, TASK_TYPE, ITEM_CHANGE_REASON, }
import { gameData } from "../../../pubUtils/data";
import { UserGachaModel } from "../../../db/UserGacha";
import { refreshGacha, getGachaList, getVisitedHeroList, GachaPull, GachaResults, getDicGachaByGachaCnt, getNormalGachaId, getDicGachas } from "../../../services/activity/gachaService";
import { RoleModel } from "../../../db/Role";
import Role from "../../../db/Role";
import { HeroModel } from "../../../db/Hero";
import { handleCost, addItems } from "../../../services/role/rewardService";
import { getZeroPointD, getTimeFun } from "../../../pubUtils/timeUtil";
@@ -38,7 +38,7 @@ export class GachaHandler {
async getGachaList(msg: {}, session: BackendSession) {
const { } = msg;
const roleId: string = session.get('roleId');
let role = await RoleModel.findByRoleId(roleId, 'gachaHasGuide');
let role = await Role.findByRoleId(roleId, 'gachaHasGuide');
const list = await getGachaList(roleId);
return resResult(STATUS.SUCCESS, { hasInit: !!role.gachaHasGuide, list });