1
This commit is contained in:
parent
5aba988da6
commit
b893eaed16
@ -138,4 +138,6 @@ type DbLogMgr interface {
|
||||
GuildKickout(string, string, string)
|
||||
GuildSetJob(string, string, string, int32)
|
||||
GuildDisband(string, string, int32)
|
||||
GuildRenameConsumeBegin(string, string, string)
|
||||
GuildRenameConsumeEnd(string, string, string, int32)
|
||||
}
|
||||
|
@ -26,6 +26,10 @@ const (
|
||||
LOG_TYPE_GUILD_KICKOUT = "guild.kickout"
|
||||
LOG_TYPE_GUILD_SETJOB = "guild.setjob"
|
||||
LOG_TYPE_GUILD_DISBAND = "guild.disband"
|
||||
|
||||
LOG_TYPE_GUILD_RENAME_CONSUME_BEGIN = "guild.rename_consume.begin"
|
||||
LOG_TYPE_GUILD_RENAME_CONSUME_END = "guild.rename_consume.end"
|
||||
|
||||
)
|
||||
|
||||
func (this* dbLogMgr) Init() {
|
||||
@ -144,3 +148,23 @@ func (this *dbLogMgr) GuildDisband(guildId string, sender string, reason int32)
|
||||
{"param3", q5.ToString(reason)},
|
||||
})
|
||||
}
|
||||
|
||||
func (this *dbLogMgr) GuildRenameConsumeBegin(accountId string, guildId string, newGuildName string) {
|
||||
this.addLog([][]string{
|
||||
{"log_type", LOG_TYPE_GUILD_RENAME_CONSUME_BEGIN},
|
||||
{"param1", accountId},
|
||||
{"param2", guildId},
|
||||
{"param3", newGuildName},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
func (this *dbLogMgr) GuildRenameConsumeEnd(accountId string, guildId string, newGuildName string, errCode int32) {
|
||||
this.addLog([][]string{
|
||||
{"log_type", LOG_TYPE_GUILD_RENAME_CONSUME_END},
|
||||
{"param1", accountId},
|
||||
{"param2", guildId},
|
||||
{"param3", newGuildName},
|
||||
{"param4", q5.ToString(errCode)},
|
||||
})
|
||||
}
|
||||
|
@ -745,6 +745,7 @@ func (this *guildMgr) AsyncUpdateGuild(accountId string, sessionId string, kv ma
|
||||
})
|
||||
}
|
||||
if _, ok := kv[constant.GUILD_UPDATE_FIELD_NAME]; ok {
|
||||
GetDbLogMgr().GuildRenameConsumeBegin(accountId, guild.guildId, guildName)
|
||||
params := map[string]string{
|
||||
"c": "Bag",
|
||||
"a": "useItem",
|
||||
@ -762,7 +763,9 @@ func (this *guildMgr) AsyncUpdateGuild(accountId string, sessionId string, kv ma
|
||||
func(rsp f5.HttpCliResponse) {
|
||||
if rsp.GetErr() == nil && rsp.JsonParseOk() {
|
||||
doFunc()
|
||||
GetDbLogMgr().GuildRenameConsumeEnd(accountId, guild.guildId, guildName, 0)
|
||||
} else {
|
||||
GetDbLogMgr().GuildRenameConsumeEnd(accountId, guild.guildId, guildName, 1)
|
||||
cb(4, "cube rename card not enough")
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user