✨ feat(db): 修改hero表数据库操作方式
This commit is contained in:
@@ -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 { HeroModel } from "../../../db/Hero";
|
||||
import Hero 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 HeroModel.findByHidAndRole(dicGoods.hid, roleId);
|
||||
let hero = await Hero.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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user