|
|
|
@ -178,6 +178,23 @@ public class JournalController {
|
|
|
|
|
return Result.success(journalRespDTO.getImage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "2.3 获取用户收藏最新2期的期刊封面")
|
|
|
|
|
@GetMapping("/collectLatest2Image")
|
|
|
|
|
@GlobalInterceptor(checkAppUserLogin = true)
|
|
|
|
|
public Result<List<String>> collectLatest2Image(
|
|
|
|
|
@RequestHeader(value = "Authorization", required = true) String authorization) {
|
|
|
|
|
UserLoginDto user = jwtUtil.getUserLoginDto(authorization);
|
|
|
|
|
List<String> objectIds=getCollectLatest2(user.getUserId());
|
|
|
|
|
if (CollectionUtils.isEmpty(objectIds)) {
|
|
|
|
|
return Result.success(null);
|
|
|
|
|
}
|
|
|
|
|
return Result.success(journalService.findImageByIds(objectIds));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<String> getCollectLatest2(String userId) {
|
|
|
|
|
return userCollectInfoService.getCollectLatest2(userId, CollectTypeEnum.JOURNAL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getCollectLatest(String userId) {
|
|
|
|
|
return userCollectInfoService.getCollectLatest(userId, CollectTypeEnum.JOURNAL);
|
|
|
|
|
}
|
|
|
|
|