提交 15df0b75 作者: 张小凤

DynamicServiceImpl(update)

上级 783693a6
...@@ -297,6 +297,7 @@ public class DynamicServiceImpl implements DynamicService { ...@@ -297,6 +297,7 @@ public class DynamicServiceImpl implements DynamicService {
Integer pageNo, Integer pageSize, Integer userId, HttpServletRequest request, Integer gambitId,Integer dynId,Integer userAccountIds, Integer pageNo, Integer pageSize, Integer userId, HttpServletRequest request, Integer gambitId,Integer dynId,Integer userAccountIds,
String description,List<String> gambitName) { String description,List<String> gambitName) {
Integer tokenUserId =userId; Integer tokenUserId =userId;
Integer inUserId =userAccountIds;
int count = dynamicDao.countDynamicList(dynId,userAccountIds,description); int count = dynamicDao.countDynamicList(dynId,userAccountIds,description);
if (count == 0) { if (count == 0) {
return PageResult.buildPage(pageNo, pageSize, 0); return PageResult.buildPage(pageNo, pageSize, 0);
...@@ -449,15 +450,15 @@ public class DynamicServiceImpl implements DynamicService { ...@@ -449,15 +450,15 @@ 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);
List<ForumAttentionDO> forumAttentionDOS = gambitDao.selectAttentionCount(userAccountId, userId); List<ForumAttentionDO> forumAttentionDOS=null;
if(inUserId==null){
forumAttentionDOS= gambitDao.selectAttentionCount(inUserId, userId);
}else if (inUserId!=null){
forumAttentionDOS= gambitDao.selectAttentionCount(userAccountId, userId);
}
if (countAttention!=0){ if (countAttention!=0){
dynamicVO.setStatus(true); dynamicVO.setStatus(true);
} }
// if (countA!=0){
// dynamicVO.setStatus(true);
// }
System.out.println(userId);
for (ForumAttentionDO forumAttentionDO : forumAttentionDOS) { for (ForumAttentionDO forumAttentionDO : forumAttentionDOS) {
if (forumAttentionDO!=null){ if (forumAttentionDO!=null){
Integer userAccountId1 = dynamicVO.getUserAccountId(); Integer userAccountId1 = dynamicVO.getUserAccountId();
...@@ -480,6 +481,9 @@ public class DynamicServiceImpl implements DynamicService { ...@@ -480,6 +481,9 @@ public class DynamicServiceImpl implements DynamicService {
if (tokenUserId.equals(dynamicVO.getUserAccountId())){ if (tokenUserId.equals(dynamicVO.getUserAccountId())){
dynamicVO.setStatus(null); dynamicVO.setStatus(null);
} }
if (inUserId!=null && inUserId.equals(dynamicVO.getUserAccountId())){
dynamicVO.setStatus(null);
}
} }
return PageResult.buildPage(pageNo, pageSize, count, dynamicVOList); return PageResult.buildPage(pageNo, pageSize, count, dynamicVOList);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论