🐞 fix(gvg): 军团替换团长之后相关信息更新

This commit is contained in:
luying
2023-02-08 10:47:41 +08:00
parent 0b877150ea
commit 542845af09
4 changed files with 12 additions and 6 deletions

View File

@@ -17,6 +17,7 @@ import { createGroupMsg, pushGroupMsgToRoom } from "../../../services/chatServic
import { sendMailByContent, sendMailToGuildByContent } from "../../../services/mailService";
import { getGVGCities } from "../../../services/gvg/gvgBattleService";
import { guildQuitLeagueRecord } from "../../../services/gvg/gvgRecService";
import { LeagueLeader } from "../../../domain/rank";
export default function (app: Application) {
new HandlerService(app, {});
@@ -558,7 +559,7 @@ export class GVGManageHandler {
const checkHisAuth = await checkLeagueAuth(targetRoleId, myLeague, LEAGUE_MANAGE_TYPE.BE_ABDICATED);
if(!checkHisAuth) return resResult(STATUS.GVG_HE_HAS_NO_AUTH);
const targetRole = await RoleModel.findByRoleId(targetRoleId, '_id roleName serverId');
const targetRole = await RoleModel.findByRoleId(targetRoleId, '_id roleName serverId guildName roleId');
let targetRoleServerName = await getServerName(targetRole.serverId);
// 修改联军数据 membersleader
@@ -566,6 +567,7 @@ export class GVGManageHandler {
// 推送
await sendMessageToUserWithSuc(targetRoleId, PUSH_ROUTE.LEAGUE_ABDICATE, { leagueCode: myLeague.leagueCode });
await sendMailByContent(MAIL_TYPE.LEAGUE_ABDICATE, roleId, { params: [ myLeague.name ] });
await updateUserInfo(REDIS_KEY.LEAGUE_INFO, myLeague.leagueCode, [{ field: 'leader', value: new LeagueLeader(targetRole) }]);
let myAuth = getMyAuth(myLeague, roleId);
// 返回