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
| <?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.gkhy.exam.system.mapper.TrainPlanMapper">
|
| <select id="selectTrainPlan" resultType="com.gkhy.exam.system.domain.TrainPlan">
| SELECT
| tp.`id`,
| tp.`company_id`,
| sc.`name` as company_name,
| tp.`train_name`,
| tp.`train_time`,
| tp.`dept_id`,
| sd.dept_name,
| tp.`train_object`,
| tp.`num`,
| tp.`hour`,
| tp.`money`,
| tp.`modality`,
| tp.`status`,
| tp.`del_flag`,
| tp.`create_by`,
| tp.`create_time`,
| tp.`update_by`,
| tp.`update_time`
|
| FROM `train_plan` tp
| LEFT JOIN sys_company sc on tp.company_id = sc.id
| LEFT JOIN sys_dept sd on tp.dept_id = sd.dept_id
| WHERE tp.del_flag = 1
| <if test="companyId!=null">
| and tp.company_id = #{companyId}
| </if>
| ORDER BY tp.create_time ASC
| </select>
| </mapper>
|
|