diff --git a/server/imserver/cache/cachemgr.go b/server/imserver/cache/cachemgr.go index 0500b5f2..a98e27e5 100644 --- a/server/imserver/cache/cachemgr.go +++ b/server/imserver/cache/cachemgr.go @@ -209,7 +209,7 @@ func (this *cacheMgr) AsyncRecommendList(recommendType int32, accountId string, excludeHums[friendId] = 1 } } - if recommendType == constant.RECOMMEND_TYPE_BATTLE { + if recommendType == constant.RECOMMEND_TYPE_RECENT_BATTLE { f5.GetJsStyleDb().PageQuery( constant.FRIEND_DB, 5, @@ -218,8 +218,10 @@ func (this *cacheMgr) AsyncRecommendList(recommendType int32, accountId string, []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)), + f5.GetDbFilter().Comp( + f5.GetDbFilter().EQ("account_id1", q5.ToString(accountId)).And(), + f5.GetDbFilter().EQ("account_id2", q5.ToString(accountId)).Or(), + ), ), "ORDER BY last_battle_time DESC", func (err error, pg *f5.Pagination) { @@ -250,8 +252,10 @@ func (this *cacheMgr) AsyncRecommendList(recommendType int32, accountId string, []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)), + f5.GetDbFilter().Comp( + f5.GetDbFilter().EQ("account_id1", q5.ToString(accountId)).And(), + f5.GetDbFilter().EQ("account_id2", q5.ToString(accountId)).Or(), + ), ), "ORDER BY last_battle_time DESC", func (err error, pg *f5.Pagination) { diff --git a/server/imserver/constant/constant.go b/server/imserver/constant/constant.go index 084c71db..492c452e 100644 --- a/server/imserver/constant/constant.go +++ b/server/imserver/constant/constant.go @@ -179,8 +179,8 @@ const ( const ( RECOMMEND_TYPE_ALL = 0 - RECOMMEND_TYPE_BATTLE = 1 - RECOMMEND_TYPE_RECENT_GAME = 2 + RECOMMEND_TYPE_USER = 1 + RECOMMEND_TYPE_RECENT_BATTLE = 2 ) const GUILD_RENAME_CARD_ITEM_ID = 90003 diff --git a/server/imserver/proto/cs_proto.proto b/server/imserver/proto/cs_proto.proto index 747332f7..fa3ab420 100644 --- a/server/imserver/proto/cs_proto.proto +++ b/server/imserver/proto/cs_proto.proto @@ -364,7 +364,7 @@ message SMInviteFriendMsg // 推荐列表 message CMRecommendList { - optional int32 type = 1; //0:全部 1:推荐战斗 2:最近游戏 + optional int32 type = 1; //0:全部 1:最近战斗 2:推荐游戏玩家 } message SMRecommendList diff --git a/third_party/f5 b/third_party/f5 index 380443c3..d10752d3 160000 --- a/third_party/f5 +++ b/third_party/f5 @@ -1 +1 @@ -Subproject commit 380443c39edace66279a0ea21f9f7c80f6ec1fd4 +Subproject commit d10752d318cc85bf47b0b6fd49395350010d52dd