Commit d741e04b by 段启岩

修复可以关注同一个话题的问题

parent caedda42
...@@ -92,7 +92,7 @@ public class TopicServiceImpl extends ServiceImpl<TopicMapper, Topic> implements ...@@ -92,7 +92,7 @@ public class TopicServiceImpl extends ServiceImpl<TopicMapper, Topic> implements
//3. 判断用户是否已经关注该话题 //3. 判断用户是否已经关注该话题
QueryWrapper<TopicFollow> topicFollowQueryWrapper = new QueryWrapper<>(); QueryWrapper<TopicFollow> topicFollowQueryWrapper = new QueryWrapper<>();
topicFollowQueryWrapper.eq("user_id", userId); topicFollowQueryWrapper.eq("user_id", userId);
topicFollowQueryWrapper.eq("topic", topicId); topicFollowQueryWrapper.eq("topic_id", topicId);
if (null != topicFollowService.getOne(topicFollowQueryWrapper)) { if (null != topicFollowService.getOne(topicFollowQueryWrapper)) {
throw new TopicServiceException(TopicErrorCode.AlREADY_FOLLOWED); throw new TopicServiceException(TopicErrorCode.AlREADY_FOLLOWED);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment