排行榜:先做一点假数据

This commit is contained in:
luying
2021-04-01 20:51:49 +08:00
parent bd5fc81332
commit 18156c4c31
10 changed files with 167 additions and 32 deletions
@@ -1,7 +1,7 @@
import { Application, BackendSession } from "pinus";
import { gameData } from "../../../pubUtils/data";
import { resResult } from "../../../pubUtils/util";
import { STATUS, GUILD_STRUCTURE, ITID, CONSUME_TYPE, HERO_QUALITY_TYPE } from "../../../consts";
import { STATUS, GUILD_STRUCTURE, ITID, CONSUME_TYPE, HERO_QUALITY_TYPE, HERO_GROW_MAX } from "../../../consts";
import { DicShopListModel } from "../../../db/DicShopList";
import { ShopItem } from "../../../domain/dbGeneral";
import { ShopItemListParam } from '../../../domain/roleField/shop';
@@ -161,6 +161,10 @@ export class ShopHandler {
return resResult(STATUS.ITEM_NOT_SOUL);
}
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);
// 检查自己的数量
let cost = [{
id: goodsId, count