红点:抽卡推送修改

This commit is contained in:
luying
2021-06-15 15:42:21 +08:00
parent 15ffdf5e47
commit f908bdccee
5 changed files with 34 additions and 25 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, getGachaList } from "../../../services/gachaService";
import { refreshGacha, getFloorResult, getResultFromContentId, getGachaList, getVisitedHeroList, getAllHeroByQuality } from "../../../services/gachaService";
import { RoleModel } from "../../../db/Role";
import { HeroModel } from "../../../db/Hero";
import { RewardInter } from "../../../pubUtils/interface";
@@ -14,7 +14,6 @@ import { UserGachaRecModel } from "../../../db/UserGachaRec";
import { ActivityModel } from "../../../db/Activity";
import { checkActivityTask, checkTask } from "../../../services/taskService";
import { RECRUIT } from "../../../pubUtils/dicParam";
import { getAllHeroByQuality } from "../../../services/gachaService";
import { transPiece } from "../../../pubUtils/itemUtils";
import { CreateHeroParam } from "../../../domain/roleField/hero";
@@ -291,10 +290,7 @@ export class GachaHandler {
async getVisitedHero(msg: {}, session: BackendSession) {
const roleId: string = session.get('roleId');
let { visitedHero, refVisitedTime } = await UserGachaModel.findByRole(roleId, GACHA_ID.NORMAL, 0);
if (shouldRefresh(refVisitedTime, new Date())) {
visitedHero = [];
}
let visitedHero = await getVisitedHeroList(roleId);
return resResult(STATUS.SUCCESS, {
hids: visitedHero