Revert "✨ feat(db): 修改role表数据库操作方式"
This reverts commit e39af3649288cc5802739cfe862c818fe56e194e.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { CURRENCY_TYPE, HANDLE_REWARD_TYPE, CURRENCY_BY_TYPE } from '../../consts';
|
||||
import Role, { RoleType } from '../../db/Role';
|
||||
import { RoleModel, RoleType } from '../../db/Role';
|
||||
import { ItemModel, ItemType } from '../../db/Item';
|
||||
import { ItemInter, RewardInter, } from '../../pubUtils/interface';
|
||||
import { gameData } from '../../pubUtils/data';
|
||||
@@ -120,7 +120,7 @@ export class CheckMeterial {
|
||||
private async decreaseGold(gold: { count: number }[]) {
|
||||
|
||||
if(!this.itemsIndb.has(this.goldId)) {
|
||||
let role = await Role.findByRoleId(this.roleId, 'gold coin');
|
||||
let role = await RoleModel.findByRoleId(this.roleId, 'gold coin');
|
||||
this.itemsIndb.set(this.goldId, role.gold);
|
||||
this.itemsIndb.set(this.coinId, role.coin);
|
||||
}
|
||||
@@ -138,7 +138,7 @@ export class CheckMeterial {
|
||||
private async decreaseCoin(coin: number[]) {
|
||||
|
||||
if(!this.itemsIndb.has(this.coinId)) {
|
||||
let role = await Role.findByRoleId(this.roleId, 'gold coin');
|
||||
let role = await RoleModel.findByRoleId(this.roleId, 'gold coin');
|
||||
this.itemsIndb.set(this.goldId, role.gold);
|
||||
this.itemsIndb.set(this.coinId, role.coin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user