|
|
@@ -534,17 +534,8 @@ public class RecommendServiceImpl implements RecommendService {
|
|
|
throw new IllegalArgumentException("userId and lookUserId cannot be null");
|
|
|
}
|
|
|
try {
|
|
|
- // 查询是否已经浏览过此用户
|
|
|
- com.zhentao.pojo.UserLook existing = recommendMapper.selectUserLook(userId, lookUserId);
|
|
|
- if (existing != null) {
|
|
|
- // 如果存在,更新update_time字段
|
|
|
- int result = recommendMapper.updateUserLookTime(userId, lookUserId);
|
|
|
- return result > 0;
|
|
|
- } else {
|
|
|
- // 如果不存在,插入新记录
|
|
|
- int result = recommendMapper.insertUserLook(userId, lookUserId);
|
|
|
- return result > 0;
|
|
|
- }
|
|
|
+ int result = recommendMapper.insertUserLook(userId, lookUserId);
|
|
|
+ return result > 0;
|
|
|
} catch (Exception ex) {
|
|
|
log.error("saveUserLook failed", ex);
|
|
|
return false;
|