提交 a0f5ac7f 作者: 张小凤

GambitDao(update)

上级 7bd87fae
...@@ -150,5 +150,5 @@ public interface GambitDao { ...@@ -150,5 +150,5 @@ public interface GambitDao {
List<MyFansDO> myFansLists(UserTopicDynamicsQO userTopicDynamicsQO); List<MyFansDO> myFansLists(UserTopicDynamicsQO userTopicDynamicsQO);
ForumAttentionDO selectAttentionCount(Integer userAccountId, Integer userId); List<ForumAttentionDO> selectAttentionCount(Integer userAccountId, Integer userId);
} }
...@@ -451,7 +451,7 @@ public class DynamicServiceImpl implements DynamicService { ...@@ -451,7 +451,7 @@ public class DynamicServiceImpl implements DynamicService {
Integer userAccountId = dynamicVO.getUserAccountId(); Integer userAccountId = dynamicVO.getUserAccountId();
int countAttention= gambitDao.selectCountAttentions(userAccountId,userId); int countAttention= gambitDao.selectCountAttentions(userAccountId,userId);
// int countA=gambitDao.selectCountAttentions(userId,userAccountId); // int countA=gambitDao.selectCountAttentions(userId,userAccountId);
ForumAttentionDO forumAttentionDO = gambitDao.selectAttentionCount(userAccountId, userId); List<ForumAttentionDO> forumAttentionDOS = gambitDao.selectAttentionCount(userAccountId, userId);
if (countAttention!=0){ if (countAttention!=0){
dynamicVO.setStatus(true); dynamicVO.setStatus(true);
} }
...@@ -459,12 +459,14 @@ public class DynamicServiceImpl implements DynamicService { ...@@ -459,12 +459,14 @@ public class DynamicServiceImpl implements DynamicService {
// dynamicVO.setStatus(true); // dynamicVO.setStatus(true);
// } // }
System.out.println(userId); System.out.println(userId);
if (forumAttentionDO!=null && forumAttentionDO.getMutualAttention().equals(true)){ for (ForumAttentionDO forumAttentionDO : forumAttentionDOS) {
if (!dynamicVO.getUserAccountId().equals(userId) && if (forumAttentionDO!=null && forumAttentionDO.getMutualAttention().equals(true)){
forumAttentionDO.getAttentionUserAccountId().equals(dynamicVO.getUserAccountId())|| if (!dynamicVO.getUserAccountId().equals(userId) &&
forumAttentionDO.getUserAccountId().equals(dynamicVO.getUserAccountId()) forumAttentionDO.getAttentionUserAccountId().equals(dynamicVO.getUserAccountId())||
){ forumAttentionDO.getUserAccountId().equals(dynamicVO.getUserAccountId())
dynamicVO.setStatus(true); ){
dynamicVO.setStatus(true);
}
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论