|
|
@ -91,6 +91,9 @@ public class JournalController {
|
|
|
|
@PathVariable @VerifyParam(required = true)Integer pageNum,
|
|
|
|
@PathVariable @VerifyParam(required = true)Integer pageNum,
|
|
|
|
@PathVariable @VerifyParam(required = true)Integer pageSize) {
|
|
|
|
@PathVariable @VerifyParam(required = true)Integer pageSize) {
|
|
|
|
List<String> objectIds=userCollectService.getCollectList(userId,pageNum,pageSize,CollectTypeEnum.JOURNAL);
|
|
|
|
List<String> objectIds=userCollectService.getCollectList(userId,pageNum,pageSize,CollectTypeEnum.JOURNAL);
|
|
|
|
|
|
|
|
if(objectIds.isEmpty()) {
|
|
|
|
|
|
|
|
return Result.success(new PageResult<JournalRespDTO>(0L, Collections.emptyList()));
|
|
|
|
|
|
|
|
}
|
|
|
|
List<Article> pageList = articleService.orderByField(objectIds);
|
|
|
|
List<Article> pageList = articleService.orderByField(objectIds);
|
|
|
|
Set<String> journalCollectSet = objectIds.isEmpty()?Collections.emptySet(): new HashSet<>(objectIds);
|
|
|
|
Set<String> journalCollectSet = objectIds.isEmpty()?Collections.emptySet(): new HashSet<>(objectIds);
|
|
|
|
List<JournalRespDTO> list = pageList.stream().map(a -> getJournalRespDTO(a, journalCollectSet))
|
|
|
|
List<JournalRespDTO> list = pageList.stream().map(a -> getJournalRespDTO(a, journalCollectSet))
|
|
|
|