feat(gvg): 添加联军频道

This commit is contained in:
luying
2023-02-21 17:15:15 +08:00
parent 22b3dbc551
commit 3eb6a1045f
19 changed files with 218 additions and 38 deletions

View File

@@ -16,7 +16,7 @@ import { GVGLeaguePrepareModel } from "../../../db/GVGLeaguePrepare";
import { createGroupMsg, pushGroupMsgToRoom } from "../../../services/chatService";
import { sendMailByContent, sendMailToGuildByContent, sendMailToLeagueByContent } from "../../../services/mailService";
import { getGVGCities } from "../../../services/gvg/gvgBattleService";
import { guildQuitLeagueRecord } from "../../../services/gvg/gvgRecService";
import { changeNoticeMessage, guildQuitLeagueRecord } from "../../../services/gvg/gvgRecService";
import { LeagueLeader } from "../../../domain/rank";
export default function (app: Application) {
@@ -587,6 +587,7 @@ export class GVGManageHandler {
// 设置联军信息
async setLeagueInfo(msg: { leagueCode: string, name: string, notice: string, icon: number }, session: BackendSession) {
const roleId = session.get('roleId');
const roleName = session.get('roleName');
const guildCode = session.get('guildCode');
const { leagueCode: targetLeagueCode, name, notice, icon } = msg;
@@ -611,6 +612,9 @@ export class GVGManageHandler {
if(icon != undefined) {
await updateUserInfo(REDIS_KEY.LEAGUE_INFO, myLeague.leagueCode, [{ field: 'icon', value: name }]);
}
if(notice != undefined) {
await changeNoticeMessage(roleId, roleName, myLeague, notice);
}
// 返回
return resResult(STATUS.SUCCESS, {