| | |
| | | IPage<ComActDiscussCommentVO> pageDiscussComment(Page page, |
| | | @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | IPage<ComActDiscussCommentVO> pageDiscussCommentAdmin(Page page, |
| | | @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 默认查询评论下两条回复信息 |
| | | * @param commentId 评论id |
| | | * @return 回复列表 |
| | | */ |
| | | List<ComActDiscussCommentVO> getDiscussCommentReplyList(@Param("commentId") Long commentId); |
| | | |
| | | |
| | | // @Select("<script> " + "select t.* from (" + "SELECT " + "d.id, " + "d.vote_title, " |
| | | // + "if(d.address is null or d.address='null',a.name,d.address )address, " + "d.photo_pah, " |
| | | // + "d.`discuss_subject`, " + "d.type, " + "d.end_time, " + "d.status, " + "d.views_num, " + "d.join_num, " |
| | |
| | | + "WHERE " + "d.id =#{id} " + "GROUP BY d.id") |
| | | ComActDiscussVO selectHaveSignAndHaveVote(@Param("id") Long id, @Param("loginUserId") Long loginUserId); |
| | | |
| | | @Select(" SELECT COUNT(id) AS totalNum," |
| | | + "(SELECT COUNT(id) FROM com_act_discuss WHERE community_id = #{communityId} AND create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now())AS currentNum," |
| | | + "(SELECT COUNT(id) FROM com_act_discuss WHERE community_id = #{communityId} AND TYPE = 1)AS imgNum," + "(" |
| | | + "SELECT " + " count(distinct cadc.user_id) " + "FROM " + " com_act_discuss_comment AS cadc " |
| | | + " LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id " |
| | | + " where cad.type = 1 and cad.community_id = #{communityId} " + ")AS imgPeopleNum," + "(" |
| | | + "select count(user_id) from ( " + "SELECT " + " distinct cadc.user_id " + "FROM " |
| | | + " com_act_discuss_comment AS cadc " + " LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id " |
| | | + " where cad.type = 2 and cad.community_id = #{communityId} " + " union all " |
| | | + " SELECT DISTINCT cadou.user_id FROM com_act_discuss_option_user AS cadou LEFT JOIN com_act_discuss_option AS cado ON cado.id = cadou.discuss_option_id left join com_act_discuss as cad on cad.id = cado.discuss_id where cad.community_id = #{communityId}" |
| | | + ") t" + ")AS votePeopleNum " + " FROM com_act_discuss") |
| | | |
| | | Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("date") String date); |
| | | |
| | | @Select(" SELECT id,discuss_subject AS content,IF(type = 1,'图文','投票') AS typeName FROM com_act_discuss WHERE community_id = #{communityId} ORDER BY create_at DESC LIMIT #{pageSize}") |
| | |
| | | List<ComActDiscussOptionVO> getScreenDiscussOptionList(@Param("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 添加议事投票评论数 |
| | | * @param discussId 议事投票 |
| | | * @param num 添加数量 |
| | | */ |
| | | void addCommentCount(@Param("discussId") Long discussId,@Param("num") Integer num); |
| | | |
| | | /** |
| | | * 更新一起议主题状态 |
| | | * @param discussId |
| | | * @param status |