Revert "✨ feat(db): 修改role表数据库操作方式"
This reverts commit e39af3649288cc5802739cfe862c818fe56e194e.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user