|
|
@ -70,7 +70,7 @@ public class JournalController {
|
|
|
|
@RequestHeader(value = "device_type", required = false) String deviceType,
|
|
|
|
@RequestHeader(value = "device_type", required = false) String deviceType,
|
|
|
|
@VerifyParam JournalQueryReq queryReq) {
|
|
|
|
@VerifyParam JournalQueryReq queryReq) {
|
|
|
|
UserLoginDto user = jwtUtil.getUserLoginDto(authorization);
|
|
|
|
UserLoginDto user = jwtUtil.getUserLoginDto(authorization);
|
|
|
|
updateQuery(deviceType,user,queryReq);
|
|
|
|
// updateQuery(deviceType,user,queryReq);
|
|
|
|
Long count = journalService.countJournal(queryReq);
|
|
|
|
Long count = journalService.countJournal(queryReq);
|
|
|
|
if(0==count) {
|
|
|
|
if(0==count) {
|
|
|
|
return Result.success(new PageResult<JournalRespDTO>(count, Collections.emptyList()));
|
|
|
|
return Result.success(new PageResult<JournalRespDTO>(count, Collections.emptyList()));
|
|
|
@ -90,16 +90,16 @@ public class JournalController {
|
|
|
|
private Set<String> getJournalCollectSet(UserLoginDto user) {
|
|
|
|
private Set<String> getJournalCollectSet(UserLoginDto user) {
|
|
|
|
return null == user ? Collections.emptySet():getJournalCollectSet(user.getUserId());
|
|
|
|
return null == user ? Collections.emptySet():getJournalCollectSet(user.getUserId());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private void updateQuery(String deviceType, UserLoginDto user, JournalQueryReq queryReq) {
|
|
|
|
// private void updateQuery(String deviceType, UserLoginDto user, JournalQueryReq queryReq) {
|
|
|
|
if(DeviceTypeUtil.isWeb(deviceType)) {
|
|
|
|
// if(DeviceTypeUtil.isWeb(deviceType)) {
|
|
|
|
return;
|
|
|
|
// return;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (StringTools.isEmpty(queryReq.getCategoryId()) && null == user) {
|
|
|
|
// if (StringTools.isEmpty(queryReq.getCategoryId()) && null == user) {
|
|
|
|
queryReq.setCategoryId(null);
|
|
|
|
// queryReq.setCategoryId(null);
|
|
|
|
queryReq.setPageNum(1);
|
|
|
|
// queryReq.setPageNum(1);
|
|
|
|
queryReq.setPageSize(10);
|
|
|
|
// queryReq.setPageSize(10);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
private Set<String> getJournalCollectSet(String userId) {
|
|
|
|
private Set<String> getJournalCollectSet(String userId) {
|
|
|
|
Set<String> set=(Set<String>) redisTemplate.opsForValue().get(Constants.REDIS_KEY_USER_COLLECT_JOURNAL+userId);
|
|
|
|
Set<String> set=(Set<String>) redisTemplate.opsForValue().get(Constants.REDIS_KEY_USER_COLLECT_JOURNAL+userId);
|
|
|
|
if(null==set) {
|
|
|
|
if(null==set) {
|
|
|
|