Ver Fonte

首页推荐

licailing há 4 anos atrás
pai
commit
ccca701302

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

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