101captain
2022-01-12 add5e643cbda3191fd3189d5754c205841191c37
返攀登记优化
1个文件已修改
39 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveAnswerContentMapper.xml 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveAnswerContentMapper.xml
@@ -88,24 +88,17 @@
    </select>
    <select id="export" resultType="com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO">
        select  ac.*,t.nick_name from (  SELECT
        qs.type as optionType,ac.*,ac.create_at as `time`
        FROM
        com_act_reserve_record carr
        LEFT JOIN com_act_reserve qn ON carr.reserve_id = qn.id
        LEFT JOIN com_act_reserve_sub qs ON carr.reserve_id = qs.reserve_id
        LEFT JOIN com_act_reserve_answer_content ac ON qs.id = ac.reserve_sub_id
        WHERE
        carr.id in (
        SELECT distinct
        select ac.*,ac.create_at as time,u.nick_name,cars.type as optionType from com_act_reserve_record carr
        left join com_act_reserve_answer_content ac  on ac.reserve_record_id = carr.id
        left join sys_user u on carr.user_id = u.user_id
        left join com_act_reserve_sub cars on ac.reserve_sub_id = cars.id
        where carr.reserve_id = #{detailedAdminDTO.reserveId} and  ac.reserve_record_id in (  SELECT DISTINCT
        carr.id
        FROM
        com_act_reserve_record carr
        LEFT JOIN com_act_reserve qn ON carr.reserve_id = qn.id
        LEFT JOIN sys_user su ON carr.user_id = su.user_id
        LEFT JOIN com_act_reserve_sub qs ON carr.id = qs.reserve_id
        LEFT JOIN com_act_reserve_answer_content ac ON carr.id = ac.reserve_record_id
        where qn.id =#{detailedAdminDTO.reserveId}
        WHERE
        carr.reserve_id =#{detailedAdminDTO.reserveId}
        <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != &quot;&quot;'>
            AND carr.create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime}
        </if>
@@ -120,23 +113,7 @@
        </if>
        <if test="detailedAdminDTO.keyword!=null and detailedAdminDTO.keyword != &quot;&quot;">
            AND ac.answer_content like concat ('%',#{detailedAdminDTO.keyword},'%')
        </if>
        )and ac.reserve_record_id in (select distinct reserve_record_id from com_act_reserve_answer_content where answer_content like concat('%',#{detailedAdminDTO.keyword},'%')
        <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != &quot;&quot;'>
            AND create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime}
        </if>
        <if test='detailedAdminDTO.endTime != null and detailedAdminDTO.endTime != &quot;&quot;'>
            AND create_at <![CDATA[ <= ]]> #{detailedAdminDTO.endTime}
        </if>
        <if test='detailedAdminDTO.beginTime != null and detailedAdminDTO.beginTime != &quot;&quot;'>
            AND STR_TO_DATE(answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{detailedAdminDTO.beginTime}
        </if>
        <if test='detailedAdminDTO.stopTime != null and detailedAdminDTO.stopTime != &quot;&quot;'>
            AND STR_TO_DATE(answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{detailedAdminDTO.stopTime}
        </if>
        )
        GROUP BY ac.id ) ac left join sys_user t on ac.user_id = t.user_id
        order by ac.reserve_record_id desc,ac.id asc
        </if> order by ac.reserve_record_id DESC,ac.id ASC
    </select>
    <select id="pageRegisterHomeQuarantine" resultType="java.lang.String">
        SELECT answer_content FROM (