<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.unis.emergencySupportCenter.modular.esEdExecutionProcess.mapper.EsEdExecutionProcessMapper">

    <select id="selectMyMapsPage" resultType="com.unis.emergencySupportCenter.modular.esEdExecutionProcess.entity.VO.EsEdExecutionProcessVO">
        SELECT
        b.id,
        b.es_ed_process_design_id,
        b.create_time,
        b.create_user,
        b.update_time,
        b.update_user,
        a.drill_theme,
        a.responsible_leader,
        a.responsible_department,
        a.drill_personnel,
        a.drill_process,
        a.drill_content,
        a.attachment
        FROM
        biz_es_ed_process_design a
        inner JOIN biz_es_ed_execution_process b on a.id = b.es_ed_process_design_id
        <if test="ew.sqlSegment != null and ew.sqlSegment != ''">
            where ${ew.sqlSegment}
        </if>
        ORDER BY b.create_time desc
    </select>
    <select id="getDetail" resultType="com.unis.emergencySupportCenter.modular.esEdExecutionProcess.entity.VO.EsEdExecutionProcessVO">
      SELECT
        b.id,
        b.es_ed_process_design_id,
        b.create_time,
        b.create_user,
        b.update_time,
        b.update_user,
        b.content_analysis,
        b.behavior_analysis,
        a.drill_theme,
        a.responsible_leader,
        a.responsible_department,
        a.drill_personnel,
        a.drill_process,
        a.drill_content,
        a.attachment
        FROM
            biz_es_ed_process_design a
        inner JOIN biz_es_ed_execution_process b on a.id = b.es_ed_process_design_id
        where b.id  = #{id}
    </select>
</mapper>