Revert "✨ feat(db): 修改role表数据库操作方式"

This reverts commit e39af3649288cc5802739cfe862c818fe56e194e.
This commit is contained in:
luying
2023-05-22 19:43:21 +08:00
parent 2d45b2c66c
commit 7bc9e1fe49
79 changed files with 423 additions and 423 deletions
@@ -5,7 +5,7 @@
import DailyRecord, { DailyRecordModel } from '../db/DailyRecord';
import { resResult } from '../pubUtils/util';
import { STATUS } from '../consts/statusCode';
import Role, { RoleType } from '../db/Role';
import { RoleModel, RoleType } from '../db/Role';
import { gameData } from '../pubUtils/data';
import { DicWar } from '../pubUtils/dictionary/DicWar';
import { WarStar } from '../domain/dbGeneral';
@@ -118,7 +118,7 @@ export async function getDailyNum(dailyRecord: DailyRecord, role?: RoleType) {
let {timesPerDay, timesCanBuy} = curDaily;
if(!role) {
role = await Role.findByRoleId(roleId, 'vipStartTime');
role = await RoleModel.findByRoleId(roleId, 'vipStartTime');
}
timesPerDay = getVipDailyCnt(timesPerDay, role);
// console.log('###### getDailyNum', timesPerDay, count, buyCount, timesCanBuy)