101captain
2021-12-29 018af6bed3da8be2e7b846aa3e654f16f8f71654
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussDAO.java
@@ -4,6 +4,7 @@
import java.util.List;
import java.util.Map;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@@ -48,7 +49,7 @@
//        + "COUNT( DISTINCT c.id ) commentNum, " + "u.name userName, " + "u.nick_name userNickName, " + "d.create_at  "
//        + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id "
//        + "LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id  "
//        + " where d.community_id=#{pageComActDiscussDTO.communityId}"
//        + " where d.community_id = #{pageComActDiscussDTO.communityId}"
//        + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != &quot;&quot;'>"
//        + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' )  " + " </if> "
//        + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin}  "
@@ -106,7 +107,7 @@
//        + "LEFT JOIN com_act_discuss_user du ON d.id = du.discuss_id  "
//        + "<if test='pageComActDiscussDTO.loginUserId != null '>"
//        + "LEFT JOIN com_act_discuss_option_user ou on do.id=ou.discuss_option_id and ou.user_id=#{pageComActDiscussDTO.loginUserId} "
//        + " </if> " + " where d.community_id=#{pageComActDiscussDTO.communityId}" + " and d.is_del = 2"
//        + " </if> " + " where d.community_id = #{pageComActDiscussDTO.communityId}" + " and d.is_del = 2"
//        + "<if test='pageComActDiscussDTO.type != null '>"
//        + " and d.`type` = #{pageComActDiscussDTO.type}  " + " </if> "
//        + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != &quot;&quot;'>"
@@ -141,7 +142,7 @@
    IPage<ComActDiscussCommentVO> pageDiscussCommentApplets(Page page,
        @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO);
    @Select("select name,address from com_act where community_id=#{communityId}")
    @Select("select name,address from com_act where community_id = #{communityId}")
    ComActVO selectCommunity(Long communityId);
    @Select("SELECT  " + "if(du.id is not null,1,0)haveSign, " + "if(ou.id is not null,1,0)haveVote " + "FROM "
@@ -209,4 +210,20 @@
     * @return
     */
    int batchUpdateViewNum(@Param("needDealMap") HashMap<Long, Integer> needDealMap);
    /**
     * 居民自治-议事投票类型占比统计
     * @param communityId
     * @return
     */
    List<StatisticsCommVO> selectTypePercent(@Param("communityId") Long communityId);
    /**
     * 获取一起议标题
     * @param type
     * @param communityId
     * @param pageSize
     * @return
     */
    List<String> getTitles(@Param("type") int type, @Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
}