1
This commit is contained in:
parent
3c365f6178
commit
d8bfbd5657
15
server/imserver/cache/cachemgr.go
vendored
15
server/imserver/cache/cachemgr.go
vendored
@ -183,11 +183,26 @@ func (this *cacheMgr) AsyncSearch(sinceId int64, q string, pbUsers *[]*cs.MFUser
|
|||||||
func (this *cacheMgr) AsyncRecommendList(recommendType int32, accountId string, pbUsers *[]*cs.MFUser,
|
func (this *cacheMgr) AsyncRecommendList(recommendType int32, accountId string, pbUsers *[]*cs.MFUser,
|
||||||
cb func(int32, string)) {
|
cb func(int32, string)) {
|
||||||
excludeHums := make(map[string]int32)
|
excludeHums := make(map[string]int32)
|
||||||
|
excludeHums[accountId] = 1
|
||||||
outHums := make(map[string]int32)
|
outHums := make(map[string]int32)
|
||||||
if recommendType == constant.RECOMMEND_TYPE_BATTLE {
|
if recommendType == constant.RECOMMEND_TYPE_BATTLE {
|
||||||
GetPlayerMgr().GetRecommendPlayers(excludeHums, outHums, 3)
|
GetPlayerMgr().GetRecommendPlayers(excludeHums, outHums, 3)
|
||||||
} else if recommendType == constant.RECOMMEND_TYPE_RECENT_GAME {
|
} else if recommendType == constant.RECOMMEND_TYPE_RECENT_GAME {
|
||||||
|
f5.GetJsStyleDb().PageQuery(
|
||||||
|
constant.FRIEND_DB,
|
||||||
|
5,
|
||||||
|
0,
|
||||||
|
"SELECT * FROM t_recent_battle WHERE 1=1",
|
||||||
|
[]string{},
|
||||||
|
f5.GetDbFilter().Comp(
|
||||||
|
f5.GetDbFilter().GT("idx", q5.ToString(0)).And(),
|
||||||
|
f5.GetDbFilter().Like("account_id1", q5.ToString(accountId)).Or(),
|
||||||
|
f5.GetDbFilter().Like("account_id2", q5.ToString(accountId)),
|
||||||
|
),
|
||||||
|
"ORDER BY last_battle_time DESC",
|
||||||
|
func (err error, pg *f5.Pagination) {
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user