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

@@ -18,7 +18,7 @@ import { checkTask } from '../../../services/task/taskService';
import { guildInter } from '../../../pubUtils/interface';
import { addItems, getGoldObject, handleCost } from '../../../services/role/rewardService';
import * as dicParam from '../../../pubUtils/dicParam';
import Role from '../../../db/Role';
import { RoleModel } from '../../../db/Role';
import { sendMailToGuildByContent } from '../../../services/mailService';
import { genAuction, getAuctionRewardByPoolId } from '../../../services/auctionService';
import { sendMessageToGuildWithSuc } from '../../../services/pushService';
@@ -244,7 +244,7 @@ export class GuildHandler {
let freeCount = dicParam.GUILD_BOSS.GUILD_BOSS_ENCOURAGE_FREECOUNT - myEncourageCnt > 0? dicParam.GUILD_BOSS.GUILD_BOSS_ENCOURAGE_FREECOUNT - myEncourageCnt: 0;
let costGold = (count - freeCount) * dicParam.GUILD_BOSS.GUILD_BOSS_ENCOURAGE_COST;
if(costGold < 0) costGold = 0;
let { gold } = await Role.findByRoleId(roleId, 'gold');
let { gold } = await RoleModel.findByRoleId(roleId, 'gold');
if(gold < costGold) return resResult(STATUS.BATTLE_GOLD_NOT_ENOUGH);
let { code, bossLv } = bossInstance;