LearningCenterTrainingPlanCourseMapper.xml
1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?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="cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterTrainingPlanCourseMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanCourse" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="plan_id" property="planId" jdbcType="INTEGER" />
<result column="exam_level_id" property="examLevelId" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="TINYINT" />
<result column="course_id" property="courseId" jdbcType="VARCHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, plan_id, exam_level_id, type, course_id, created_by, created_date, updated_by,
updated_date, deleted_flag
</sql>
<select id="findTransPlanCourseList"
resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM dj_car_life_learning_center_training_plan_course
WHERE deleted_flag = 'N'
AND (
<foreach collection="trainingPlanCourses" item="item" separator=" OR " open="(" close=")">
<choose>
<when test="item.examLevelId != null">
(plan_id = #{item.planId} AND exam_level_id = #{item.examLevelId})
</when>
<otherwise>
(plan_id = #{item.planId})
</otherwise>
</choose>
</foreach>
)
</select>
</mapper>