1
This commit is contained in:
parent
831d2480fc
commit
a6a7fed770
@ -326,29 +326,12 @@ func (this *guildMgr) AsyncApplyJoin(accountId string, guildId string, cb func(i
|
||||
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(constant.GUILD_APPLY_STATUS_NONE)},
|
||||
{"last_apply_time", q5.ToString(nowTime)},
|
||||
},
|
||||
[][]string{
|
||||
{"guild_id", guildId},
|
||||
{"account_id", accountId},
|
||||
{"status", q5.ToString(constant.GUILD_APPLY_STATUS_NONE)},
|
||||
{"last_apply_time", q5.ToString(nowTime)},
|
||||
{"createtime", q5.ToString(nowTime)},
|
||||
{"modifytime", q5.ToString(nowTime)},
|
||||
},
|
||||
model.GuildApply.Force(
|
||||
guildId,
|
||||
accountId,
|
||||
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||
if err != nil {
|
||||
cb(1, "")
|
||||
cb(500, "server internal error")
|
||||
return
|
||||
}
|
||||
cb(0, "")
|
||||
|
38
server/imserver_new/model/guild_apply.go
Normal file
38
server/imserver_new/model/guild_apply.go
Normal file
@ -0,0 +1,38 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"q5"
|
||||
"f5"
|
||||
"main/constant"
|
||||
)
|
||||
|
||||
type guildApply struct {
|
||||
|
||||
}
|
||||
|
||||
var GuildApply = new (guildApply)
|
||||
|
||||
func (this *guildApply) Force(guildId string, accountId string,
|
||||
cb func (error, int64, int64)) {
|
||||
nowTime := f5.GetApp().GetNowSeconds()
|
||||
f5.GetJsStyleDb().Upsert(
|
||||
constant.FRIEND_DB,
|
||||
"t_guild_apply",
|
||||
[][]string{
|
||||
{"guild_id", guildId},
|
||||
{"account_id", accountId},
|
||||
},
|
||||
[][]string{
|
||||
{"status", q5.ToString(constant.GUILD_APPLY_STATUS_NONE)},
|
||||
{"last_apply_time", q5.ToString(nowTime)},
|
||||
},
|
||||
[][]string{
|
||||
{"guild_id", guildId},
|
||||
{"account_id", accountId},
|
||||
{"status", q5.ToString(constant.GUILD_APPLY_STATUS_NONE)},
|
||||
{"last_apply_time", q5.ToString(nowTime)},
|
||||
{"createtime", q5.ToString(nowTime)},
|
||||
{"modifytime", q5.ToString(nowTime)},
|
||||
},
|
||||
cb)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user