|
@@ -50,15 +50,8 @@ public class TechnicalArticlesController extends BaseSearchController{
|
|
|
|
|
|
Pageable getPageable(SearchConditionVO searchConditionVO){
|
|
Pageable getPageable(SearchConditionVO searchConditionVO){
|
|
int activePage = searchConditionVO.getActivePage() == 0?1:searchConditionVO.getActivePage();
|
|
int activePage = searchConditionVO.getActivePage() == 0?1:searchConditionVO.getActivePage();
|
|
- // 是文章和专著,根据publicTime排序,每页5条
|
|
|
|
- if(searchConditionVO.getSortType() == null || searchConditionVO.getSortType() == ""){
|
|
|
|
- Sort sort = new Sort(Sort.Direction.DESC,"publicTime");
|
|
|
|
- return new PageRequest(activePage-1, CommonConstant.TECHNOLOGY_ROWS_ON_PAGE, sort);
|
|
|
|
- }else{// 是工具,根据id排序,每页10条
|
|
|
|
- Sort sort = new Sort(Sort.Direction.DESC,searchConditionVO.getSortType());
|
|
|
|
- return new PageRequest(activePage-1, CommonConstant.HOT_CROWD_ROWS_ON_PAGE, sort);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ Sort sort = new Sort(Sort.Direction.DESC,searchConditionVO.getSortType());
|
|
|
|
+ return new PageRequest(activePage-1, CommonConstant.TECHNOLOGY_ROWS_ON_PAGE, sort);
|
|
}
|
|
}
|
|
|
|
|
|
Pageable getRanking(){
|
|
Pageable getRanking(){
|