|
|
@@ -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());
|
|
|
}
|