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

This reverts commit e39af3649288cc5802739cfe862c818fe56e194e.
This commit is contained in:
luying
2023-05-08 10:01:05 +08:00
parent 2d45b2c66c
commit 7bc9e1fe49
79 changed files with 423 additions and 423 deletions

View File

@@ -5,7 +5,7 @@ import { BattleRecordModel } from '@db/BattleRecord';
import { STATUS, WAR_TYPE } from '@consts';
import { Controller } from 'egg';
import * as fs from 'fs';
import Role from '@db/Role';
import { RoleModel } from '@db/Role';
import { NoticeModel } from '@db/Notice';
import { ServerParamWithRole, GroupParam } from '../domain/gameField/serverlist';
import { reloadResources } from 'app/pubUtils/data';
@@ -104,7 +104,7 @@ export default class GameController extends Controller {
// let env = isReview? curRegion.reviewEnv: ctx.app.config.realEnv;
let allServers = await ServerlistModel.findByEnv(ctx.app.config.realEnv, false);
let hasRole = await Role.checkHasRole(uid, curRegion.latestServerUniqId);
let hasRole = await RoleModel.checkHasRole(uid, curRegion.latestServerUniqId);
if(pid && gid) {
const pkg = await PackageModel.getPackageByGidPid(gid, pid);
@@ -113,7 +113,7 @@ export default class GameController extends Controller {
}
}
let roles = await Role.findAllByUid(uid, true, true);
let roles = await RoleModel.findAllByUid(uid, true, true);
for (let server of allServers) {
let status = ctx.service.utils.getServerStatus(server, version, hasRole)
let curGroup = serverList.find(cur => cur.groupId == server.groupId);