This commit is contained in:
aozhiwei 2024-04-20 17:38:31 +08:00
parent b411e9d46a
commit 166ec772b0
2 changed files with 46 additions and 40 deletions

View File

@ -182,7 +182,7 @@ func (this *friendMgr) AsyncGetApplyList(lastIdx int64, accountId string,
return return
} }
users := []string{} users := []string{}
if pg.Rows.Next() { for pg.Rows.Next() {
idx := q5.ToInt64(pg.Rows.GetByName("idx")) idx := q5.ToInt64(pg.Rows.GetByName("idx"))
senderId := pg.Rows.GetByName("sender_id") senderId := pg.Rows.GetByName("sender_id")
if idx > lastSinceId { if idx > lastSinceId {

View File

@ -697,6 +697,7 @@ func (this *guildMgr) AsyncUpdateGuild(accountId string, kv map[int32]string, cb
this.addUsingName(name) this.addUsingName(name)
guildName = name guildName = name
} }
doFunc := func () {
f5.NewLockAsyncTask([][]string{ f5.NewLockAsyncTask([][]string{
{constant.GUILD_ID_LOCK_KEY, guild.guildId}, {constant.GUILD_ID_LOCK_KEY, guild.guildId},
{constant.GUILD_NAME_LOCK_KEY, guild.guildName}, {constant.GUILD_NAME_LOCK_KEY, guild.guildName},
@ -741,6 +742,11 @@ func (this *guildMgr) AsyncUpdateGuild(accountId string, kv map[int32]string, cb
this.removeUsingName(name) this.removeUsingName(name)
} }
}) })
}
if _, ok := kv[constant.GUILD_UPDATE_FIELD_NAME]; ok {
} else {
doFunc()
}
} }
func (this *guildMgr) NotifyGuildMsg(guildId string, msg proto.Message) { func (this *guildMgr) NotifyGuildMsg(guildId string, msg proto.Message) {