This commit is contained in:
aozhiwei 2020-10-12 17:47:14 +08:00
parent 637cf5ec88
commit 443def2ff7
5 changed files with 12 additions and 6 deletions

View File

@ -1102,7 +1102,7 @@ bool Guild::HasApply()
void Guild::SyncNewApply()
{
std::vector<int> jobs = {kGuildAdmin, kGuildElite, kGuildMember};
std::vector<int> jobs = {kGuildOwner, kGuildAdmin};
for (int job : jobs) {
std::set<std::string>* members = GetJobMembers(job);
if (members) {
@ -1612,7 +1612,7 @@ void Guild::RecalcRedPoint()
conn_info,
"SELECT idx, applyid "
"FROM guild_apply "
"WHERE idx > %d AND A.status=0 LIMIT 1;",
"WHERE idx > %d AND status=0 LIMIT 1;",
{
0
},

View File

@ -46,6 +46,8 @@ void HandlerMgr::RegisterNetMsgHandlers()
RegisterNetMsgHandler(&immsghandler, &SyncHelper::_SS_IM_GuildMemberUpdateResponse);
RegisterNetMsgHandler(&immsghandler, &PlayerMgr::_SS_IM_PushUserOnlineState);
RegisterNetMsgHandler(&immsghandler, &PlayerMgr::_SS_IM_RandomUsersResponse);
RegisterNetMsgHandler(&immsghandler, &PlayerMgr::_SS_GS_QueryGuildUserOnlineState);
RegisterNetMsgHandler(&immsghandler, &PlayerMgr::_SS_GS_PushGuildRedPoint);
RegisterNetMsgHandler(&immsghandler, &GuildMgr::_SS_IM_ForwardGuildSMMsg);
RegisterNetMsgHandler(&mscmsghandler, &PlayerMgr::_SS_MS_PushUserList);
@ -67,8 +69,6 @@ void HandlerMgr::RegisterNetMsgHandlers()
RegisterNetMsgHandler(&imcmsghandler, &PlayerMgr::_SS_IM_RandomUsersRequest);
RegisterNetMsgHandler(&imcmsghandler, &PlayerMgr::_SS_IM_GuildMemberQuitRequest);
RegisterNetMsgHandler(&imcmsghandler, &PlayerMgr::_SS_IM_GuildMemberUpdateRequest);
RegisterNetMsgHandler(&imcmsghandler, &PlayerMgr::_SS_GS_QueryGuildUserOnlineState);
RegisterNetMsgHandler(&imcmsghandler, &PlayerMgr::_SS_GS_PushGuildRedPoint);
RegisterNetMsgHandler(&imcmsghandler, &GuildMgr::_SS_IM_ForwardGuildCMMsg);
RegisterNetMsgHandler(&imcmsghandler, &GuildMgr::_SS_IM_RefeshGuildMemberInfo);

View File

@ -27,6 +27,7 @@
#include "handlermgr.h"
#include "jsondatamgr.h"
#include "ss_msgid.pb.h"
#include "framework/cpp/httpclientpool.h"
static const int MAX_DAILY_APPPLY_GUILD_TIMES = 100;
@ -2092,6 +2093,9 @@ void Player::SyncGuildNewApply(long long guild_id)
{
ss::SS_IM_GuildNewApply msg;
FillIMMsgConext(msg.mutable_context());
msg.set_guild_id(GuildId());
SendGSMsg(msg);
msg.set_guild_id(guild_id);
SyncHelper::Instance()->SendIMConnMsg(
JsonDataMgr::Instance()->GetIMInstanceId(guild_id),
ss::SSMessageId_e::_SS_IM_GuildNewApply,
msg);
}

View File

@ -2,6 +2,7 @@
#include "cs_proto.pb.h"
#include "ss_proto.pb.h"
#include "ss_msgid.pb.h"
#include "WSListener.h"
#include "dbengine.h"

View File

@ -52,4 +52,5 @@ enum SSMessageId_e
_SS_IM_PushGuildUserOnlineState = 1037;
_SS_IM_GuildRecalcRedPoint = 1038;
_SS_GS_PushGuildRedPoint = 1039;
_SS_IM_GuildNewApply = 1041;
}