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

@@ -10,7 +10,7 @@ import { ITID, CONSUME_TYPE } from '../../../consts/constModules/itemConst';
import { GUILD_POINT_WAYS, GUILD_STRUCTURE, WISH_POOL_TYPE } from '../../../consts/constModules/guildConst';
import { getWishPool, getUserGuildWithRefActive, addActive, canWishToday } from '../../../services/guildService';
import { findIndex, findWhere } from 'underscore';
import { RoleModel } from '../../../db/Role';
import Role from '../../../db/Role';
import { getRoleOnlineInfo } from '../../../services/redisService';
import { ARMY } from '../../../pubUtils/dicParam';
import { guildInter } from '../../../pubUtils/interface';
@@ -89,7 +89,7 @@ export class WishPoolHandler {
const sid: string = session.get('sid');
if (wishRoleId == dntRoleId)
return resResult(STATUS.WRONG_PARMS);
let role = await RoleModel.findByRoleId(wishRoleId);
let role = await Role.findByRoleId(wishRoleId);
if (!role)
return resResult(STATUS.WRONG_PARMS);//没有玩家
let wishUserGuild = await getUserGuildWithRefActive(wishRoleId, ' wishDntCnt wishGoods guildCode');