提交 a0f5ac7f 作者: 张小凤

GambitDao(update)

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