推送:对单人推送函数抽象
This commit is contained in:
@@ -10,7 +10,7 @@ import { HeroModel, HeroType, HeroUpdate } from '../db/Hero';
|
||||
|
||||
import { RoleUpdate, RoleType, RoleModel } from '../db/Role';
|
||||
import { Rank } from './rankService';
|
||||
import { HERO_SYSTEM_TYPE, REDIS_KEY } from '../consts';
|
||||
import { HERO_SYSTEM_TYPE, PUSH_ROUTE, REDIS_KEY } from '../consts';
|
||||
import { updateUserInfo } from './redisService';
|
||||
import { GuildModel, GuildType } from '../db/Guild';
|
||||
import { CalCe } from './role/calCe';
|
||||
@@ -20,6 +20,7 @@ import { saveCeChangeLog } from '../pubUtils/logUtil';
|
||||
import { JewelType } from '../db/Jewel';
|
||||
import { SchoolModel } from '../db/School';
|
||||
import { AttributeCal } from '../domain/roleField/attribute';
|
||||
import { sendMessageToUserWithSuc } from './pushService';
|
||||
|
||||
interface Param {
|
||||
isInitRole?: boolean,
|
||||
@@ -334,9 +335,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
|
||||
saveCeChangeLog(role, roleInc, role.ce, type, changeHids);
|
||||
updateRank(roleId, serverId, topLineupCe, role, pushHeros, guild);
|
||||
|
||||
let uids = [{ uid: roleId, sid }];
|
||||
pinus.app.get('channelService').pushMessageByUids('onPlayerCeUpdate', resResult(STATUS.SUCCESS, { ce: role.ce, heros: pushHeros, topLineupCe }), uids);
|
||||
sendMessageToUserWithSuc(roleId, PUSH_ROUTE.PLAYER_CE_UPDATE, { ce: role.ce, heros: pushHeros, topLineupCe }, sid);
|
||||
|
||||
if(guild) {
|
||||
await updateUserInfo(REDIS_KEY.GUILD_INFO, guild.code, [{ field: 'guildCe', value: guild.guildCe }]);
|
||||
|
||||
Reference in New Issue
Block a user