Browse Source

首页推荐

licailing 3 years ago
parent
commit
ccca701302
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/main/java/com/izouma/nineth/web/CollectionController.java

+ 3 - 3
src/main/java/com/izouma/nineth/web/CollectionController.java

@@ -121,10 +121,10 @@ public class CollectionController extends BaseController {
 
     @GetMapping("/recommend")
     @Cacheable("recommend")
-    public Map<String, List<?>> recommendAll(@RequestParam String type) {
+    public Map<String, List<?>> recommendAll() {
         Map<String, List<?>> map = new HashMap<>();
 
-        List<CollectionDTO> collectionDTOS = collectionRepo.recommend(type).stream().map(rc -> {
+        List<CollectionDTO> collectionDTOS = collectionRepo.recommend("LIST").stream().map(rc -> {
             if (StringUtils.isNotBlank(rc.getRecommend().getPic())) {
                 rc.getCollection().setPic(Collections.singletonList(new FileObject(null, rc.getRecommend()
                         .getPic(), null, null)));
@@ -135,7 +135,7 @@ public class CollectionController extends BaseController {
         }).collect(Collectors.toList());
         map.put("collection", collectionDTOS);
 
-        List<News> news = newsRepo.recommend(type).stream().map(rn -> {
+        List<News> news = newsRepo.recommend("LIST").stream().map(rn -> {
             if (StringUtils.isNotBlank(rn.getRecommend().getPic())) {
                 rn.getNews().setPic(rn.getRecommend().getPic());
             }