1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?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.zhongzheng.modules.course.mapper.CourseBusinessMapper">
- <resultMap type="com.zhongzheng.modules.course.domain.CourseBusiness" id="CourseBusinessResult">
- <result property="id" column="id"/>
- <result property="businessName" column="business_name"/>
- <result property="remark" column="remark"/>
- <result property="projectId" column="project_id"/>
- <result property="schoolYear" column="school_year"/>
- <result property="status" column="status"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- </resultMap>
- <resultMap type="com.zhongzheng.modules.course.vo.CourseBusinessVo" id="CourseBusinessVoResult">
- <result property="id" column="id"/>
- <result property="businessName" column="business_name"/>
- <result property="remark" column="remark"/>
- <result property="projectId" column="project_id"/>
- <result property="schoolYear" column="school_year"/>
- <result property="status" column="status"/>
- <result property="educationName" column="education_name"/>
- <result property="projectName" column="project_name"/>
- <result property="educationId" column="education_id"/>
- </resultMap>
- <select id="queryList" parameterType="com.zhongzheng.modules.course.bo.CourseBusinessQueryBo" resultMap="CourseBusinessVoResult">
- SELECT
- b.*,
- e.education_name,
- e.id as education_id,
- p.project_name
- FROM
- course_business b
- LEFT JOIN course_project_type p on b.project_id =p.id
- LEFT JOIN course_education_type e ON p.education_id = e.id
- and p.status != -1
- and e.status != -1
- <if test="status != null and status.size()!=0 ">
- AND b.status in
- <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="businessName != null and businessName != ''">
- AND b.business_name = #{businessName}
- </if>
- <if test="encoder != null and encoder != ''">
- AND b.encoder = #{encoder}
- </if>
- <if test="projectId != null and projectId != ''">
- AND b.project_id = #{projectId}
- </if>
- <if test="educationId != null and educationId != ''">
- AND e.education_id = #{educationId}
- </if>
- </select>
- </mapper>
|