提交 468236ec 作者: 刘明祎-运维用途

统计话题

上级 a7cf3021
...@@ -59,6 +59,11 @@ public class GambitController extends BaseController{ ...@@ -59,6 +59,11 @@ public class GambitController extends BaseController{
return ResultBody.success(gambitService.listGambit(forumGambitQO)); return ResultBody.success(gambitService.listGambit(forumGambitQO));
} }
@ApiOperation(value = "后台统计话题总数")
@GetMapping("/getGambitSum")
public ResultBody getGambitSum(){
return gambitService.getGambitSum();
}
@ApiOperation(value = "关注") @ApiOperation(value = "关注")
@GetMapping("/attention") @GetMapping("/attention")
......
...@@ -30,6 +30,7 @@ public interface GambitDao { ...@@ -30,6 +30,7 @@ public interface GambitDao {
List<ForumGambitDO> listGambit(ForumGambitQO forumGambitQO); List<ForumGambitDO> listGambit(ForumGambitQO forumGambitQO);
int getGambitSum();
int listGambitCount(ForumGambitQO forumGambitQO); int listGambitCount(ForumGambitQO forumGambitQO);
List<ForumGambitDO> recommendCount(ForumGambitDO forumGambitDO); List<ForumGambitDO> recommendCount(ForumGambitDO forumGambitDO);
......
...@@ -21,6 +21,7 @@ public interface GambitService { ...@@ -21,6 +21,7 @@ public interface GambitService {
PageResult listGambit(ForumGambitQO forumGambitQO); PageResult listGambit(ForumGambitQO forumGambitQO);
ResultBody getGambitSum();
ResultBody attention(Boolean status, Integer userAccountId,Integer attentionUserAccountId); ResultBody attention(Boolean status, Integer userAccountId,Integer attentionUserAccountId);
ResultBody transPond(Integer dynamicId, Integer userAccountId); ResultBody transPond(Integer dynamicId, Integer userAccountId);
......
...@@ -134,6 +134,12 @@ public class GambitServiceImpl implements GambitService { ...@@ -134,6 +134,12 @@ public class GambitServiceImpl implements GambitService {
} }
@Override @Override
public ResultBody getGambitSum() {
int gambitSum = gambitDao.getGambitSum();
return ResultBody.success(gambitSum);
}
@Override
public ResultBody attention( Boolean status, Integer userAccountId,Integer attentionUserAccountId) { public ResultBody attention( Boolean status, Integer userAccountId,Integer attentionUserAccountId) {
if (status.equals(true)){ if (status.equals(true)){
//插入用户 //插入用户
......
...@@ -353,6 +353,10 @@ ...@@ -353,6 +353,10 @@
limit #{pageNo}, #{pageSize} limit #{pageNo}, #{pageSize}
</select> </select>
<select id="getGambitSum" resultType="java.lang.Integer">
select count(id) from forum_gambit where 1=1
</select>
<select id="listGambitCount" parameterType="com.mmc.csf.release.gambit.qo.ForumGambitQO" resultType="java.lang.Integer"> <select id="listGambitCount" parameterType="com.mmc.csf.release.gambit.qo.ForumGambitQO" resultType="java.lang.Integer">
select count(*) from forum_gambit where 1=1 and check_status=1 select count(*) from forum_gambit where 1=1 and check_status=1
<if test="gambitName!='' and gambitName!=null "> <if test="gambitName!='' and gambitName!=null ">
...@@ -722,4 +726,5 @@ ...@@ -722,4 +726,5 @@
select id,user_account_id,like_count,fans_count,attention_count,create_time,update_time select id,user_account_id,like_count,fans_count,attention_count,create_time,update_time
from forum_count where user_account_id=#{userAccountId} from forum_count where user_account_id=#{userAccountId}
</select> </select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论