This commit is contained in:
aozhiwei 2024-04-22 15:29:54 +08:00
parent 756aea2619
commit 33b90c5c39
4 changed files with 13 additions and 9 deletions

View File

@ -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) {

View File

@ -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

View File

@ -364,7 +364,7 @@ message SMInviteFriendMsg
//
message CMRecommendList
{
optional int32 type = 1; //0: 1: 2
optional int32 type = 1; //0: 1: 2
}
message SMRecommendList

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit 380443c39edace66279a0ea21f9f7c80f6ec1fd4
Subproject commit d10752d318cc85bf47b0b6fd49395350010d52dd