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

@@ -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 { RoleModel } from '@db/Role';
import Role 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, server.maintenance.version||'0.0.0');
if(versionFlag >= 0) { // 新版本号
let hasRole = await RoleModel.checkHasRole(ctx.uid, server.latestServerUniqId); // 是否是老玩家
let hasRole = await Role.checkHasRole(ctx.uid, server.latestServerUniqId); // 是否是老玩家
if(!hasRole) {
return await next();
} else {