提交 640ea460 作者: 张小凤

GambitDao(update)

上级 f16e2d02
...@@ -150,5 +150,5 @@ public interface GambitDao { ...@@ -150,5 +150,5 @@ public interface GambitDao {
List<MyFansDO> myFansLists(UserTopicDynamicsQO userTopicDynamicsQO); List<MyFansDO> myFansLists(UserTopicDynamicsQO userTopicDynamicsQO);
int selectAttentionCount(Integer userAccountId, Integer userId); ForumAttentionDO selectAttentionCount(Integer userAccountId, Integer userId);
} }
...@@ -14,6 +14,7 @@ import com.mmc.csf.release.dao.LikeDAO; ...@@ -14,6 +14,7 @@ import com.mmc.csf.release.dao.LikeDAO;
import com.mmc.csf.release.dao.gambit.GambitDao; import com.mmc.csf.release.dao.gambit.GambitDao;
import com.mmc.csf.release.entity.forum.*; import com.mmc.csf.release.entity.forum.*;
import com.mmc.csf.release.entity.forum.ForumReviewDO; import com.mmc.csf.release.entity.forum.ForumReviewDO;
import com.mmc.csf.release.entity.gambit.ForumAttentionDO;
import com.mmc.csf.release.entity.gambit.ForumGambitDO; import com.mmc.csf.release.entity.gambit.ForumGambitDO;
import com.mmc.csf.release.feign.UserAppApi; import com.mmc.csf.release.feign.UserAppApi;
import com.mmc.csf.release.forum.vo.*; import com.mmc.csf.release.forum.vo.*;
...@@ -449,12 +450,15 @@ public class DynamicServiceImpl implements DynamicService { ...@@ -449,12 +450,15 @@ public class DynamicServiceImpl implements DynamicService {
for (DynamicVO dynamicVO : dynamicVOList) { for (DynamicVO dynamicVO : dynamicVOList) {
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 i = gambitDao.selectAttentionCount(userAccountId, userId); ForumAttentionDO forumAttentionDO = gambitDao.selectAttentionCount(userAccountId, userId);
if (countAttention!=0){ if (countAttention!=0){
dynamicVO.setStatus(true); dynamicVO.setStatus(true);
} }
if (i!=0){ if (countA!=0){
dynamicVO.setStatus(true);
}
if (forumAttentionDO!=null && forumAttentionDO.getMutualAttention().equals(true)){
dynamicVO.setStatus(true); dynamicVO.setStatus(true);
} }
} }
......
...@@ -204,8 +204,8 @@ ...@@ -204,8 +204,8 @@
select count(*) from forum_attention where attention_user_account_id=#{userId} and user_account_id=#{userAccountId} and mutual_attention=1 select count(*) from forum_attention where attention_user_account_id=#{userId} and user_account_id=#{userAccountId} and mutual_attention=1
</select> </select>
<select id="selectAttentionCount" resultType="java.lang.Integer"> <select id="selectAttentionCount" resultType="com.mmc.csf.release.entity.gambit.ForumAttentionDO">
select count(*) from forum_attention where attention_user_account_id=#{userId} or user_account_id=#{userAccountId} or attention_user_account_id=#{userAccountId} or user_account_id=#{userId} and mutual_attention=1 select user_account_id,attention_user_account_id,mutual_attention from forum_attention where attention_user_account_id=#{userId} or user_account_id=#{userAccountId} or attention_user_account_id=#{userAccountId} or user_account_id=#{userId} and mutual_attention=1
</select> </select>
<select id="selectGambitAndDynamic" resultType="java.lang.Integer"> <select id="selectGambitAndDynamic" resultType="java.lang.Integer">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论