提交 78578cb9 作者: 张小凤

GambitDao(update)

上级 867b0e1a
......@@ -149,4 +149,6 @@ public interface GambitDao {
void updateGambits(Integer gambitId);
List<MyFansDO> myFansLists(UserTopicDynamicsQO userTopicDynamicsQO);
int selectAttentionCount(Integer userAccountId, Integer userId);
}
......@@ -449,9 +449,14 @@ public class DynamicServiceImpl implements DynamicService {
for (DynamicVO dynamicVO : dynamicVOList) {
Integer userAccountId = dynamicVO.getUserAccountId();
int countAttention= gambitDao.selectCountAttentions(userAccountId,userId);
if (countAttention!=0){
int i = gambitDao.selectAttentionCount(userAccountId, userId);
if (countAttention!=0){
dynamicVO.setStatus(true);
}
if (i!=0){
dynamicVO.setStatus(true);
}
}
return PageResult.buildPage(pageNo, pageSize, count, dynamicVOList);
}
......
......@@ -204,6 +204,10 @@
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>
<select id="selectGambitAndDynamic" resultType="java.lang.Integer">
select count(*) from forum_dynamic_gambit where gambit_id=#{id}
</select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论