1
This commit is contained in:
parent
214ac6f7eb
commit
f0aff7f191
@ -42,6 +42,12 @@ const (
|
|||||||
GUILD_NAME_LOCK_KEY = "guild_name:"
|
GUILD_NAME_LOCK_KEY = "guild_name:"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
GUILD_APPLY_STATUS_NONE = 0
|
||||||
|
GUILD_APPLY_STATUS_ACCEPT = 1
|
||||||
|
GUILD_APPLY_STATUS_REJECT = 2
|
||||||
|
GUILD_APPLY_STATUS_IGNORE = 3
|
||||||
|
)
|
||||||
// im server chat
|
// im server chat
|
||||||
const (
|
const (
|
||||||
CCBegin = iota
|
CCBegin = iota
|
||||||
|
@ -266,7 +266,7 @@ func (this *guildMgr) AsyncGetApplyList(lastIdx int64, accountId string,
|
|||||||
f5.GetDbFilter().GT("idx", q5.ToString(lastIdx)).And(),
|
f5.GetDbFilter().GT("idx", q5.ToString(lastIdx)).And(),
|
||||||
f5.GetDbFilter().EQ("guild_id", guild.GetGuildId()).And(),
|
f5.GetDbFilter().EQ("guild_id", guild.GetGuildId()).And(),
|
||||||
f5.GetDbFilter().EQ("account_id", accountId).And(),
|
f5.GetDbFilter().EQ("account_id", accountId).And(),
|
||||||
f5.GetDbFilter().EQ("status", "0"),
|
f5.GetDbFilter().EQ("status", q5.ToString(constant.GUILD_APPLY_STATUS_NONE)),
|
||||||
),
|
),
|
||||||
"",
|
"",
|
||||||
func (err error, pg *f5.Pagination) {
|
func (err error, pg *f5.Pagination) {
|
||||||
@ -300,13 +300,13 @@ func (this *guildMgr) AsyncApplyJoin(accountId string, guildId string, cb func(i
|
|||||||
{"account_id", accountId},
|
{"account_id", accountId},
|
||||||
},
|
},
|
||||||
[][]string{
|
[][]string{
|
||||||
{"status", q5.ToString(0)},
|
{"status", q5.ToString(constant.GUILD_APPLY_STATUS_NONE)},
|
||||||
{"last_apply_time", q5.ToString(nowTime)},
|
{"last_apply_time", q5.ToString(nowTime)},
|
||||||
},
|
},
|
||||||
[][]string{
|
[][]string{
|
||||||
{"guild_id", guildId},
|
{"guild_id", guildId},
|
||||||
{"account_id", accountId},
|
{"account_id", accountId},
|
||||||
{"status", q5.ToString(0)},
|
{"status", q5.ToString(constant.GUILD_APPLY_STATUS_NONE)},
|
||||||
{"last_apply_time", q5.ToString(nowTime)},
|
{"last_apply_time", q5.ToString(nowTime)},
|
||||||
{"createtime", q5.ToString(nowTime)},
|
{"createtime", q5.ToString(nowTime)},
|
||||||
{"modifytime", q5.ToString(nowTime)},
|
{"modifytime", q5.ToString(nowTime)},
|
||||||
@ -416,7 +416,8 @@ func (this *guildMgr) AsyncGetGuildLogs(string, string, func(int32, string)) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *guildMgr) asyncSetApplyStatus(accountId string, guildId string, status int32) {
|
func (this *guildMgr) asyncSetApplyStatus(accountId string, guildId string, status int32,
|
||||||
|
cb func(error, int64, int64)) {
|
||||||
f5.GetJsStyleDb().Update(
|
f5.GetJsStyleDb().Update(
|
||||||
constant.FRIEND_DB,
|
constant.FRIEND_DB,
|
||||||
"t_guild_apply",
|
"t_guild_apply",
|
||||||
@ -428,7 +429,5 @@ func (this *guildMgr) asyncSetApplyStatus(accountId string, guildId string, stat
|
|||||||
{"account_id", accountId},
|
{"account_id", accountId},
|
||||||
{"guild_id", guildId},
|
{"guild_id", guildId},
|
||||||
},
|
},
|
||||||
func (err error, lastInsertId int64, rowsAffected int64) {
|
cb)
|
||||||
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user