1
This commit is contained in:
parent
4bf67c25ec
commit
2c3f436e8c
@ -325,8 +325,25 @@ func (this *friendMgr) AsyncRemoveBlack(senderId string, targetId string, cb fun
|
||||
})
|
||||
}
|
||||
|
||||
func (this *friendMgr) AsyncHasApply(string, func(int32, string, int32)) {
|
||||
|
||||
func (this *friendMgr) AsyncHasApply(accountId string, cb func(int32, string, int32)) {
|
||||
f5.GetJsStyleDb().OrmSelectOne(
|
||||
constant.FRIEND_DB,
|
||||
"t_friend_apply",
|
||||
[][]string{
|
||||
{"target_id", accountId},
|
||||
{"status", q5.ToString(constant.FRIEND_APPLY_STATUS_NONE)},
|
||||
},
|
||||
func (err error, ds *f5.DataSet) {
|
||||
if err != nil {
|
||||
cb(500, "", 0)
|
||||
return
|
||||
}
|
||||
if ds.Next() {
|
||||
cb(0, "", 1)
|
||||
} else {
|
||||
cb(0, "", 0)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (this *friendMgr) addFriendShip(accountId1 string, accountId2 string, addTime int32) {
|
||||
|
@ -813,8 +813,30 @@ func (this *guildMgr) AsyncGetRecommendGuild(num int32, cb func(int32, string, [
|
||||
cb(0, "", guildIds)
|
||||
}
|
||||
|
||||
func (this *guildMgr) AsyncHasApply(string, func(int32, string, int32)) {
|
||||
|
||||
func (this *guildMgr) AsyncHasApply(accountId string, cb func(int32, string, int32)) {
|
||||
guild := this.GetGuildByAccountId(accountId)
|
||||
if guild == nil {
|
||||
cb(0, "", 0)
|
||||
return
|
||||
}
|
||||
f5.GetJsStyleDb().OrmSelectOne(
|
||||
constant.FRIEND_DB,
|
||||
"t_guild_apply",
|
||||
[][]string{
|
||||
{"guild_id", guild.GetGuildId()},
|
||||
{"status", q5.ToString(constant.GUILD_APPLY_STATUS_NONE)},
|
||||
},
|
||||
func (err error, ds *f5.DataSet) {
|
||||
if err != nil {
|
||||
cb(500, "", 0)
|
||||
return
|
||||
}
|
||||
if ds.Next() {
|
||||
cb(0, "", 1)
|
||||
} else {
|
||||
cb(0, "", 0)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (this *guildMgr) rearrangement() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user