✨ feat(db): 修改role表数据库操作方式
This commit is contained in:
@@ -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 { RoleModel } from '@db/Role';
|
||||
import Role 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 RoleModel.checkHasRole(uid, curRegion.latestServerUniqId);
|
||||
let hasRole = await Role.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 RoleModel.findAllByUid(uid, true, true);
|
||||
let roles = await Role.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);
|
||||
|
||||
Reference in New Issue
Block a user