This commit is contained in:
aozhiwei 2024-04-11 19:27:19 +08:00
parent 8381e3af97
commit fe3c001cb7
2 changed files with 7 additions and 33 deletions

View File

@ -618,26 +618,10 @@ func (this *guildMgr) AsyncDisband(accountId string, cb func(int32, string, []st
cb(1, "Disband only leader perm", members)
return
}
f5.GetJsStyleDb().Update(
constant.FRIEND_DB,
"t_guild",
[][]string{
{"deleted", "1"},
},
[][]string{
{"guild_id", guild.guildId},
},
func (err error, lastInsertId int64, rowsAffected int64) {
if err != nil {
task.SetFail()
cb(500, "server internal error", members)
return
}
task.SetSucc()
guild.disband()
cb(0, "", members)
return
})
guild.disband()
task.SetSucc()
guild.disband()
cb(0, "", members)
})
}
@ -795,21 +779,10 @@ func (this *guildMgr) clearEmptyGuild() {
return true
})
for _, g := range(emptyGuilds) {
delete(this.idHash, g.guildId)
delete(this.nameHash, g.guildName)
this.delGuild(g)
GetDbLogMgr().GuildClearEmptyStart(g.guildId, g.guildName)
f5.GetJsStyleDb().Update(
constant.FRIEND_DB,
"t_guild_member",
[][]string{
{"guild_name", q5.ToString("!" + g.guildName)},
{"deleted", q5.ToString("1")},
},
[][]string{
{"guild_id", g.guildId},
},
model.Guild.Delete(g.guildId,
func (err error, lastInsertId int64, rowsAffected int64) {
GetDbLogMgr().GuildClearEmptyEnd(g.guildId, g.guildName)
})
}
}

View File

@ -35,6 +35,7 @@ func (this *guild) Delete(guildId string,
constant.FRIEND_DB,
"t_guild",
[][]string{
{"!guild_name", q5.ToString("'!' + guild_name")},
{"deleted", "1"},
},
[][]string{