|
@@ -1,29 +1,23 @@
|
|
|
package com.zhentao.service.impl;
|
|
package com.zhentao.service.impl;
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.zhentao.config.RecommendProps;
|
|
import com.zhentao.config.RecommendProps;
|
|
|
|
|
+import com.zhentao.dto.UserSearchQuery;
|
|
|
import com.zhentao.mapper.RecommendMapper;
|
|
import com.zhentao.mapper.RecommendMapper;
|
|
|
import com.zhentao.mapper.UsersMapper;
|
|
import com.zhentao.mapper.UsersMapper;
|
|
|
import com.zhentao.pojo.Users;
|
|
import com.zhentao.pojo.Users;
|
|
|
import com.zhentao.service.RecommendService;
|
|
import com.zhentao.service.RecommendService;
|
|
|
import com.zhentao.vo.RecommendUserVO;
|
|
import com.zhentao.vo.RecommendUserVO;
|
|
|
-import com.zhentao.dto.UserSearchQuery;
|
|
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
|
|
+import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.Comparator;
|
|
|
|
|
-import java.util.HashSet;
|
|
|
|
|
-import java.util.Set;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
-import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
|
|
-import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
-import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
|
|
-
|
|
|
|
|
@Service
|
|
@Service
|
|
|
public class RecommendServiceImpl implements RecommendService {
|
|
public class RecommendServiceImpl implements RecommendService {
|
|
|
|
|
|
|
@@ -479,7 +473,7 @@ public class RecommendServiceImpl implements RecommendService {
|
|
|
limit = 20;
|
|
limit = 20;
|
|
|
}
|
|
}
|
|
|
if (offset == null || offset < 0) {
|
|
if (offset == null || offset < 0) {
|
|
|
- offset = 0;
|
|
|
|
|
|
|
+ offset = 1;
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
return recommendMapper.selectLikedUsers(userId, offset, limit);
|
|
return recommendMapper.selectLikedUsers(userId, offset, limit);
|