红点:抽卡推送修改
This commit is contained in:
@@ -19,7 +19,7 @@ import { getAllAssistCnt } from './comBattleService';
|
||||
import { getDungeonData } from './dungeonService';
|
||||
import { PvpSeasonResultModel } from '../db/PvpSeasonResult';
|
||||
import { nowSeconds, getZeroPoint } from '../pubUtils/timeUtil';
|
||||
import { getGachaList } from './gachaService';
|
||||
import { getGachaList, getVisitedHeroList } from './gachaService';
|
||||
import { getSchoolList } from './roleService';
|
||||
import { addRoleToGuildChannel } from './chatChannelService';
|
||||
import { getMyGuildInfo, getGuildWithRefActive, getUserGuildWithRefActive, getWishPool } from './guildService';
|
||||
@@ -98,7 +98,9 @@ export async function pushData(role: RoleType, session: FrontendOrBackendSession
|
||||
case 'pvp': // pvp
|
||||
return await getPvpEntryData(roleId);
|
||||
case 'gacha':
|
||||
return await getGachaList(roleId);
|
||||
const gachalist = await getGachaList(roleId);
|
||||
const visitList = await getVisitedHeroList(roleId);
|
||||
return { gachalist, visitList }
|
||||
case 'school':
|
||||
return await getSchoolList(roleId);
|
||||
case 'guild':
|
||||
|
||||
@@ -69,6 +69,17 @@ export async function refreshGacha(dicGacha: DicGacha, userGacha: UserGachaType)
|
||||
return userGacha
|
||||
}
|
||||
|
||||
|
||||
export async function getVisitedHeroList(roleId: string) {
|
||||
|
||||
let { visitedHero, refVisitedTime } = await UserGachaModel.findByRole(roleId, GACHA_ID.NORMAL, 0);
|
||||
if (shouldRefresh(refVisitedTime, new Date())) {
|
||||
visitedHero = [];
|
||||
}
|
||||
|
||||
return visitedHero;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获得保底结果
|
||||
* @param gachaId 招募表id
|
||||
|
||||
Reference in New Issue
Block a user