Revert "✨ feat(db): 修改对item表的数据库操作方式"
This reverts commit 97a36fda70fc1ccbb7f310b04d149f46f997a614.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { CURRENCY_TYPE, HANDLE_REWARD_TYPE, CURRENCY_BY_TYPE } from '../../consts';
|
||||
import Role, { RoleType } from '../../db/Role';
|
||||
import Item, { ItemType } from '../../db/Item';
|
||||
import { ItemModel, ItemType } from '../../db/Item';
|
||||
import { ItemInter, RewardInter, } from '../../pubUtils/interface';
|
||||
import { gameData } from '../../pubUtils/data';
|
||||
import { sortItems } from './util';
|
||||
@@ -81,7 +81,7 @@ export class CheckMeterial {
|
||||
private async decreaseItem(id: number, count: number) {
|
||||
console.log('#### decreaseItem 1', id, count);
|
||||
if(!this.itemsIndb.has(id)) {
|
||||
let item = await Item.findbyRoleAndGid(this.roleId, id);
|
||||
let item = await ItemModel.findbyRoleAndGid(this.roleId, id);
|
||||
console.log('#### decreaseItem', item);
|
||||
if(!item) {
|
||||
this.pushToNotEnoughItems(id, count);
|
||||
|
||||
Reference in New Issue
Block a user