|
|
@@ -107,6 +107,10 @@ import com.uas.search.b2b.util.SearchConstants;
|
|
|
* @author sunyj
|
|
|
* @since 2016年11月11日 上午10:43:25
|
|
|
*/
|
|
|
+/**
|
|
|
+ * @author hejq
|
|
|
+ * @time 创建时间:2017年4月28日
|
|
|
+ */
|
|
|
@Service
|
|
|
public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchService {
|
|
|
|
|
|
@@ -220,6 +224,11 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
|
|
|
private static final Integer SIMILAR_NUM = 10; // 联想词size
|
|
|
|
|
|
+ /**
|
|
|
+ * 企业圈资料最大返回值页码设置为100
|
|
|
+ */
|
|
|
+ private static final int MAXPAGE_USERSPACEDETAIL = 100;
|
|
|
+
|
|
|
private ConcurrentHashMap<String, Field> sortFields = new ConcurrentHashMap<String, Field>();
|
|
|
|
|
|
private Field getPropertyField(Class<?> targetCls, String properyName) {
|
|
|
@@ -854,7 +863,15 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
@Override
|
|
|
public SPage<UserSpaceDetail> searchUserSpaceDetailCheckIds(String keyword, PageParams pageParams)
|
|
|
throws Exception {
|
|
|
+ // 限制最大返回页数为100
|
|
|
+ if (pageParams.getPage() > MAXPAGE_USERSPACEDETAIL) {
|
|
|
+ pageParams.setPage(MAXPAGE_USERSPACEDETAIL);
|
|
|
+ }
|
|
|
SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.AC$US$DETAIL, pageParams);
|
|
|
+ if (idsPage.getTotalPage() > MAXPAGE_USERSPACEDETAIL) {
|
|
|
+ idsPage.setTotalPage(MAXPAGE_USERSPACEDETAIL);
|
|
|
+ idsPage.setTotalElement(MAXPAGE_USERSPACEDETAIL * pageParams.getSize());
|
|
|
+ }
|
|
|
List<UserSpaceDetail> content = AccountUtils.findAll(idsPage.getContent().toString());
|
|
|
sortByProperty(content, UserSpaceDetail.class, "id", idsPage.getContent());
|
|
|
return toSPage(idsPage, content);
|