TContingencyPlanContent.xml 1.38 KB
<?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.testor.module.emergency.dao.TContingencyPlanContentDao">
    <!-- 开启二级缓存 -->
    <!-- <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/> -->
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.testor.module.emergency.model.domain.TContingencyPlanContent">
        <id column="plan_id" property="planId"/>
        <id column="specific_work" property="specificWork"/>
        <id column="ground_work" property="groundWork"/>
        <id column="group_key" property="groupKey"/>
        <id column="id" property="id"/>
        <id column="org_id" property="orgId"/>
    </resultMap>
    <select id="getList" resultType="com.testor.module.emergency.model.vo.TContingencyPlanContentVO">
        select
            a.id,
            a.plan_id,
            a.specific_work,
            a.ground_work,
            a.group_key,
            b.name,
            b.id as smallId,
            c.dict_value as groupName
        from t_contingency_plan_content a
        left join t_emergency_working_group b on a.group_key = b.id
        left join t_sys_dict_data c on b.group_id = c.dict_data_id
        where a.status = 0 and a.plan_id = #{id} and b.status = 0 and c.status = 0

    </select>
</mapper>