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

This reverts commit 97a36fda70fc1ccbb7f310b04d149f46f997a614.
This commit is contained in:
luying
2023-05-22 19:41:04 +08:00
parent 7700ed438a
commit 024f1e2776
7 changed files with 23 additions and 23 deletions
@@ -1,5 +1,5 @@
import { MemComBtlTeam } from '../../domain/battleField/ComBattleTeamField';
import Item from '../../db/Item';
import { ItemModel } from '../../db/Item';
import { BATTLE_REWARD_TYPE, ITEM_CHANGE_REASON, IT_TYPE, PUSH_ROUTE } from '../../consts';
import { FriendRelationModel } from '../../db/FriendRelation';
import Role, { RoleType } from '../../db/Role';
@@ -505,7 +505,7 @@ export function blueprtIdValid(id: number) {
* @returns
*/
export async function hasEnoughBlueprt(roleId: string, sid: string, blueprtId: number) {
let blueprt = await Item.findbyRoleAndGidAndCount(roleId, blueprtId, 1);
let blueprt = await ItemModel.findbyRoleAndGidAndCount(roleId, blueprtId, 1);
if (!blueprt || blueprt.count <= 0) return false;
// 检查是否有已创建未结束的寻宝,预先占用一张藏宝图
// // 背包中占用的藏宝图不显示,所以这里就扣掉,结束再加回去