DriverSchedulingExpandSmartMapper.xml
3.45 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?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.mapper.DriverSchedulingExpandSmartMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.DriverSchedulingExpandSmart">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="expandId" column="expand_id" jdbcType="VARCHAR"/>
<result property="masterJobCode" column="master_job_code" jdbcType="VARCHAR"/>
<result property="slaveJobCode" column="slave_job_code" jdbcType="VARCHAR"/>
<result property="startDate" column="start_date" jdbcType="DATE"/>
<result property="endDate" column="end_date" jdbcType="DATE"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="SmartExpandVo" type="com.ruoyi.pojo.vo.SmartExpandVo">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="slaveJobCode" column="slave_job_code" jdbcType="VARCHAR"/>
<result property="type" column="type" jdbcType="TINYINT"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<collection property="activities" ofType="com.ruoyi.pojo.vo.SmartExpandVo$Activity">
<result column="name" property="name" jdbcType="VARCHAR"/>
<result column="smart_id" property="uuId" jdbcType="VARCHAR"/>
<result column="master_job_code" property="masterJobCode" jdbcType="VARCHAR"/>
<result column="start_date" property="startDate" jdbcType="DATE"/>
<result column="end_date" property="endDate" jdbcType="DATE"/>
</collection>
</resultMap>
<sql id="Base_Column_List">
id,expand_id,`name`,master_job_code,
slave_job_code,start_date,end_date,
create_by,update_by,create_time,
update_time,remark
</sql>
<select id="querySmartExpand" resultMap="SmartExpandVo" resultType="com.ruoyi.pojo.vo.SmartExpandVo">
SELECT
expand.id,
expand.slave_job_code,
expand.type,
expand.remark,
smart.id smart_id,
smart.start_date,
smart.end_date,
smart.master_job_code,
smart.`name`
FROM
driver_scheduling_expand expand,
driver_scheduling_expand_smart smart
WHERE
expand.id = smart.expand_id
AND expand.id = #{id}
</select>
<select id="querySmartExpandAll" resultMap="SmartExpandVo" resultType="com.ruoyi.pojo.vo.SmartExpandVo">
SELECT
expand.id,
expand.slave_job_code,
expand.type,
expand.remark,
smart.id smart_id,
smart.start_date,
smart.end_date,
smart.master_job_code,
smart.`name`
FROM
driver_scheduling_expand expand,
driver_scheduling_expand_smart smart
WHERE
expand.id = smart.expand_id
</select>
</mapper>