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

@@ -2,7 +2,7 @@ import { STATUS } from '@consts';
import { ServerlistModel } from '@db/Serverlist';
import { nowSeconds } from 'app/pubUtils/timeUtil';
import { checkWhiteList } from 'app/pubUtils/sysUtil';
import Role from '@db/Role';
import { RoleModel } from '@db/Role';
module.exports = () => {
return async function checkMainten(ctx, next) {
@@ -16,7 +16,7 @@ module.exports = () => {
} else {
const versionFlag = ctx.service.utils.compareVersion(version||'0.0.0.0', server.maintenance.version||'0.0.0.1');
if(versionFlag >= 0) { // 新版本号
let hasRole = await Role.checkHasRole(ctx.uid, server.latestServerUniqId); // 是否是老玩家
let hasRole = await RoleModel.checkHasRole(ctx.uid, server.latestServerUniqId); // 是否是老玩家
if(!hasRole) {
return await next();
} else {