pvp: 更改pvpdefense结构

This commit is contained in:
luying
2021-10-29 16:36:23 +08:00
parent 4a5e23969b
commit e39b120af4
31 changed files with 1542 additions and 1137 deletions
+3 -4
View File
@@ -35,7 +35,6 @@ import { setMedianCe, getAllGuildActivityStatus } from './guildActivityService';
import { getAllOnlineRoles } from './redisService';
import Item from '../db/Item';
import { PvpDefenseModel } from '../db/PvpDefense';
import { findPvpDefAllByRoleId } from './pvpService';
import { getDonation } from './donateService';
export async function pushData(role: RoleType, session: FrontendOrBackendSession, pushType: 'entry' | 'refresh' = 'entry') {
@@ -189,10 +188,10 @@ async function getTowerEntryData(role: RoleType) {
async function getPvpEntryData(roleId: string) {
let pvpDefense = await PvpDefenseModel.findByRoleIdIncludeAll(roleId);
if (pvpDefense) {
let { pvpDefense, } = await findPvpDefAllByRoleId(roleId);
let { challengeCnt, receivedBox, score, hisScore } = pvpDefense;
// let { pvpDefense, } = await findPvpDefAllByRoleId(roleId);
// let { challengeCnt, receivedBox, score, hisScore } = pvpDefense;
return { challengeCnt, score, hisScore, receivedBox }
// return { challengeCnt, score, hisScore, receivedBox }
} else {
return null
}