diff --git a/database/frienddb.sql b/database/frienddb.sql index 920014e2..6de653c4 100644 --- a/database/frienddb.sql +++ b/database/frienddb.sql @@ -217,6 +217,7 @@ CREATE TABLE `t_recent_battle` ( `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`idx`), + KEY `last_battle_time` (`last_battle_time`), KEY `account_id1_account_id2` (`account_id1`, `account_id2`) ) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/server/imserver/cache/cachemgr.go b/server/imserver/cache/cachemgr.go index 13e3e218..b16d3113 100644 --- a/server/imserver/cache/cachemgr.go +++ b/server/imserver/cache/cachemgr.go @@ -186,7 +186,7 @@ func (this *cacheMgr) AsyncRecommendList(recommendType int32, accountId string, excludeHums[accountId] = 1 outHums := make(map[string]int32) if recommendType == constant.RECOMMEND_TYPE_BATTLE { - GetPlayerMgr().GetRecommendPlayers(excludeHums, outHums, 3) + GetPlayerMgr().GetRecommendPlayers(excludeHums, outHums, 5) } else if recommendType == constant.RECOMMEND_TYPE_RECENT_GAME { f5.GetJsStyleDb().PageQuery( constant.FRIEND_DB,