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