1
This commit is contained in:
parent
344d2a8384
commit
2f21157a3e
@ -91,8 +91,39 @@ func (this *guildMgr) AsyncGetApplyList(lastIdx int64, accountId string,
|
||||
})
|
||||
}
|
||||
|
||||
func (this *guildMgr) AsyncApplyJoin(string, string, func(int32, string)) {
|
||||
|
||||
func (this *guildMgr) AsyncApplyJoin(accountId string, guildId string, cb func(int32, string)) {
|
||||
guild := this.GetGuildByAccountId(accountId)
|
||||
if guild != nil {
|
||||
cb(0, "")
|
||||
return
|
||||
}
|
||||
nowTime := f5.GetApp().GetNowSeconds()
|
||||
f5.GetJsStyleDb().Upsert(
|
||||
constant.FRIEND_DB,
|
||||
"t_guild_apply",
|
||||
[][]string{
|
||||
{"guild_id", guildId},
|
||||
{"account_id", accountId},
|
||||
},
|
||||
[][]string{
|
||||
{"status", q5.ToString(0)},
|
||||
{"last_apply_time", q5.ToString(nowTime)},
|
||||
},
|
||||
[][]string{
|
||||
{"guild_id", guildId},
|
||||
{"account_id", accountId},
|
||||
{"status", q5.ToString(0)},
|
||||
{"last_apply_time", q5.ToString(nowTime)},
|
||||
{"createtime", q5.ToString(nowTime)},
|
||||
{"modifytime", q5.ToString(nowTime)},
|
||||
},
|
||||
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||
if err != nil {
|
||||
cb(1, "")
|
||||
return
|
||||
}
|
||||
cb(0, "")
|
||||
})
|
||||
}
|
||||
|
||||
func (this *guildMgr) AsyncAcceptApply(string, string, func(int32, string)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user