红点:修改推送方式

This commit is contained in:
luying
2021-05-31 13:29:58 +08:00
parent 44d9e80640
commit a8eebc200c
38 changed files with 805 additions and 605 deletions

View File

@@ -4,7 +4,7 @@ import { STATUS, GACHA_ID, HERO_QUALITY_TYPE, TASK_TYPE, REFRESH_TIME, TIME_OUTP
import { gameData } from "../../../pubUtils/data";
import { GachaListReturn, GachaResult, GachaData } from "../../../domain/activityField/gachaField";
import { UserGachaModel } from "../../../db/UserGacha";
import { refreshGacha, getFloorResult, getResultFromContentId } from "../../../services/gachaService";
import { refreshGacha, getFloorResult, getResultFromContentId, getGachaList } from "../../../services/gachaService";
import { RoleModel } from "../../../db/Role";
import { HeroModel } from "../../../db/Hero";
import { RewardInter } from "../../../pubUtils/interface";
@@ -35,18 +35,7 @@ export class GachaHandler {
async getGachaList(msg: {}, session: BackendSession) {
const { } = msg;
const roleId: string = session.get('roleId');
let userGachaList = await UserGachaModel.findAllByRole(roleId);
let list: GachaListReturn[] = [];
for (let [id, dicGacha] of gameData.gacha) {
if (id == GACHA_ID.TIMELIMIT) continue; // 不包括限时
let userGacha = userGachaList.find(cur => cur.gachaId == id);
if (userGacha)
userGacha = await refreshGacha(dicGacha, userGacha);
let param = new GachaListReturn(dicGacha, userGacha);
list.push(param);
}
const list = await getGachaList(roleId);
return resResult(STATUS.SUCCESS, { list });
}