mitao
2025-05-20 179c4d64313c9b7572778da4aaaf6c6584fe457d
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EldersAuthDAO.java
@@ -42,7 +42,7 @@
        + " LEFT JOIN com_act ac ON u.community_id = ac.community_id\n" + " <where> " +
        "<if test='pageEldersAuthDTO.communityId != null'>"
        + "  AND ac.community_id = #{pageEldersAuthDTO.communityId} " + " </if> " +
        + "  AND ac.community_id = ${pageEldersAuthDTO.communityId} " + " </if> " +
        "<if test='pageEldersAuthDTO.sumitUserId != null'>"
        + " AND ea.submit_user_id = #{pageEldersAuthDTO.sumitUserId} " + " </if> "
@@ -84,7 +84,7 @@
        + " LEFT JOIN com_act ac ON u.community_id = ac.community_id\n" + " <where> " +
        "<if test='pageEldersAuthDTO.communityId != null'>"
        + "  AND ac.community_id = #{pageEldersAuthDTO.communityId} " + " </if> " +
        + "  AND ac.community_id = ${pageEldersAuthDTO.communityId} " + " </if> " +
        "<if test='pageEldersAuthDTO.ids != null and pageEldersAuthDTO.ids.length>0 '>" + " AND ea.id in "
        + "<foreach collection='pageEldersAuthDTO.ids' item='id' index='index' open='(' close=')' separator=',' >\n"
@@ -133,22 +133,22 @@
    @Select("select user_id,id_card,name from sys_user where user_id = #{userId}")
    SysUserVO getSysUserByUserId(@Param("userId") Long userId);
    @Select("<script> "
        + " SELECT e.id,e.CREATE_BY,e.create_at, e.update_by, e.update_at, e.id_card, e.auth_user_name, e.video_url,"
        + " e.submit_user_id, e.domicile, e.STATUS, e.birth_day, e.type, e.age, e.verification_result, u.name as sumitUserName, u.phone as sumitUserAccount  "
        + " FROM ( " + "       SELECT MAX(id) AS id , DATE_FORMAT(create_at, '%Y-%m') AS yearMonth "
        + "        FROM com_elders_auth " + "        GROUP BY id_card, yearMonth " + "       ) t "
        + " left join com_elders_auth e on t.id = e.id " + " LEFT JOIN sys_user u ON e.submit_user_id = u.user_id  "
        + "<where>" + " <if test='pageEldersAuthRecordDTO.name!=null'>\n"
        + " AND e.auth_user_name like concat('%', #{pageEldersAuthRecordDTO.name}, '%')" + "</if>"
        + " <if test='pageEldersAuthRecordDTO.idCard!=null and pageEldersAuthRecordDTO.idCard!=&quot;&quot;'>\n"
        + " AND e.id_card = #{pageEldersAuthRecordDTO.idCard}\n" + "</if>"
        + " <if test='pageEldersAuthRecordDTO.type!=null'>\n" + " AND e.type = #{pageEldersAuthRecordDTO.type}\n"
        + "</if>" + " <if test='pageEldersAuthRecordDTO.month!=null'>\n"
        + " AND month(e.create_at) = #{pageEldersAuthRecordDTO.month}\n" + "</if>\n" + "</where>\n"
        + "<if test='pageEldersAuthRecordDTO.sortColumns!=null'>\n"
        + "ORDER BY e.${pageEldersAuthRecordDTO.sortColumns} ${pageEldersAuthRecordDTO.sortType}\n" + "</if> "
        + "</script>")
//    @Select("<script> "
//        + " SELECT e.id,e.CREATE_BY,e.create_at, e.update_by, e.update_at, e.id_card, e.auth_user_name, e.video_url,"
//        + " e.submit_user_id, e.domicile, e.STATUS, e.birth_day, e.type, e.age, e.verification_result, u.name as sumitUserName, u.phone as sumitUserAccount  "
//        + " FROM ( " + "       SELECT MAX(id) AS id , DATE_FORMAT(create_at, '%Y-%m') AS yearMonth "
//        + "        FROM com_elders_auth " + "        GROUP BY id_card, yearMonth " + "       ) t "
//        + " left join com_elders_auth e on t.id = e.id " + " LEFT JOIN sys_user u ON e.submit_user_id = u.user_id  "
//        + "<where>" + " <if test='pageEldersAuthRecordDTO.name!=null'>\n"
//        + " AND e.auth_user_name like concat('%', #{pageEldersAuthRecordDTO.name}, '%')" + "</if>"
//        + " <if test='pageEldersAuthRecordDTO.idCard!=null and pageEldersAuthRecordDTO.idCard!=&quot;&quot;'>\n"
//        + " AND e.id_card = #{pageEldersAuthRecordDTO.idCard}\n" + "</if>"
//        + " <if test='pageEldersAuthRecordDTO.type!=null'>\n" + " AND e.type = #{pageEldersAuthRecordDTO.type}\n"
//        + "</if>" + " <if test='pageEldersAuthRecordDTO.month!=null'>\n"
//        + " AND month(e.create_at) = #{pageEldersAuthRecordDTO.month}\n" + "</if>\n" + "</where>\n"
//        + "<if test='pageEldersAuthRecordDTO.sortColumns!=null'>\n"
//        + "ORDER BY e.${pageEldersAuthRecordDTO.sortColumns} ${pageEldersAuthRecordDTO.sortType}\n" + "</if> "
//        + "</script>")
    IPage<ComEldersAuthRecordForCommunityVO> selectCommunityEldersRecordByPage(Page page,
        @Param("pageEldersAuthRecordDTO") PageEldersAuthRecordDTO pageEldersAuthRecordDTO);