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

This reverts commit 9051e72e99cf9c09ebdee57e0401c63480b3c128.
This commit is contained in:
luying
2023-05-22 19:41:19 +08:00
parent 3e78dc3e2b
commit 3e490fde9e
27 changed files with 149 additions and 131 deletions
@@ -5,7 +5,7 @@ import { STATUS, GUILD_STRUCTURE, ITID, CONSUME_TYPE, HERO_QUALITY_TYPE, HERO_GR
import { UserShopModel } from "../../../db/UserShop";
import { handleCost, addItems } from "../../../services/role/rewardService";
import { SHOP } from "../../../pubUtils/dicParam";
import Hero from "../../../db/Hero";
import { HeroModel } from "../../../db/Hero";
import { checkShopInPurchase, getShopDicById, getShopListByType, getShopPrice } from "../../../services/shopService";
import { RewardInter } from "../../../pubUtils/interface";
import { UserShopTypeModel } from "../../../db/UserShopType";
@@ -124,7 +124,7 @@ export class ShopHandler {
return resResult(STATUS.ITEM_NOT_SOUL);
}
let hero = await Hero.findByHidAndRole(dicGoods.hid, roleId);
let hero = await HeroModel.findByHidAndRole(dicGoods.hid, roleId);
if(!hero) return resResult(STATUS.HERO_NOT_MAX);
if(hero.colorStar != HERO_GROW_MAX.COLORSTAR) return resResult(STATUS.HERO_NOT_MAX);