提交 640ea460 作者: 张小凤

GambitDao(update)

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