<?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.ruoyi.zhdd.mapper.PlanMapper">

    <resultMap type="com.ruoyi.zhdd.domain.Plan" id="PlanResult">
        <result property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="type" column="type"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="createDept" column="create_dept"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="delFlag" column="del_flag"/>
    </resultMap>

    <select id="queryTask" resultType="com.ruoyi.zhdd.domain.PlanTask">
        select t2.task_name taskName, t2.task_des taskDes
        from b_plan t1
                 left join b_plan_task t2 on t1.id = t2.plan_id
        where t1.type = #{type}
          and t2.level = #{level}
          and create_dept = #{dept}
    </select>


</mapper>
