LineConfigMapper.xml
7 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?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.config.mapper.LineConfigMapper">
<resultMap type="LineConfig" id="LineConfigResult">
<result property="id" column="id"/>
<result property="lineName" column="line_name"/>
<result property="lpName" column="lp_name"/>
<result property="firstSignInTime" column="first_sign_in_time"/>
<result property="firstSignOutTime" column="first_sign_out_time"/>
<result property="firstSignTodayTomorrow" column="first_sign_today_tomorrow"/>
<result property="secondFlag" column="second_flag"/>
<result property="secondSignInTime" column="second_sign_in_time"/>
<result property="secondSignOutTime" column="second_sign_out_time"/>
<result property="secondSignTodayTomorrow" column="second_sign_today_tomorrow"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="createBy" column="create_by"/>
<result property="updateBy" column="update_by"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectLineConfigVo">
select id,
line_name,
lp_name,
first_sign_in_time,
first_sign_out_time,
first_sign_today_tomorrow,
second_flag,
second_sign_in_time,
second_sign_out_time,
second_sign_today_tomorrow,
create_time,
update_time,
create_by,
update_by,
remark
from line_config
</sql>
<select id="selectLineConfigList" parameterType="LineConfig" resultMap="LineConfigResult">
<include refid="selectLineConfigVo"/>
<where>
<if test="lineName != null and lineName != ''">and line_name like concat('%', #{lineName}, '%')</if>
<if test="lpName != null and lpName != ''">and lp_name like concat('%', #{lpName}, '%')</if>
<if test="firstSignInTime != null and firstSignInTime != ''">and first_sign_in_time = #{firstSignInTime}
</if>
<if test="firstSignOutTime != null and firstSignOutTime != ''">and first_sign_out_time =
#{firstSignOutTime}
</if>
<if test="firstSignTodayTomorrow != null ">and first_sign_today_tomorrow = #{firstSignTodayTomorrow}</if>
<if test="secondFlag != null ">and second_flag = #{secondFlag}</if>
<if test="secondSignInTime != null and secondSignInTime != ''">and second_sign_in_time =
#{secondSignInTime}
</if>
<if test="secondSignOutTime != null and secondSignOutTime != ''">and second_sign_out_time =
#{secondSignOutTime}
</if>
<if test="secondSignTodayTomorrow != null ">and second_sign_today_tomorrow = #{secondSignTodayTomorrow}</if>
</where>
</select>
<select id="selectLineConfigById" parameterType="Long" resultMap="LineConfigResult">
<include refid="selectLineConfigVo"/>
where id = #{id}
</select>
<insert id="insertLineConfig" parameterType="LineConfig" useGeneratedKeys="true" keyProperty="id">
insert into line_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="lineName != null and lineName != ''">line_name,</if>
<if test="lpName != null">lp_name,</if>
<if test="firstSignInTime != null">first_sign_in_time,</if>
<if test="firstSignOutTime != null">first_sign_out_time,</if>
<if test="firstSignTodayTomorrow != null">first_sign_today_tomorrow,</if>
<if test="secondFlag != null">second_flag,</if>
<if test="secondSignInTime != null">second_sign_in_time,</if>
<if test="secondSignOutTime != null">second_sign_out_time,</if>
<if test="secondSignTodayTomorrow != null">second_sign_today_tomorrow,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="lineName != null and lineName != ''">#{lineName},</if>
<if test="lpName != null">#{lpName},</if>
<if test="firstSignInTime != null">#{firstSignInTime},</if>
<if test="firstSignOutTime != null">#{firstSignOutTime},</if>
<if test="firstSignTodayTomorrow != null">#{firstSignTodayTomorrow},</if>
<if test="secondFlag != null">#{secondFlag},</if>
<if test="secondSignInTime != null">#{secondSignInTime},</if>
<if test="secondSignOutTime != null">#{secondSignOutTime},</if>
<if test="secondSignTodayTomorrow != null">#{secondSignTodayTomorrow},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateLineConfig" parameterType="LineConfig">
update line_config
<trim prefix="SET" suffixOverrides=",">
<if test="lineName != null and lineName != ''">line_name = #{lineName},</if>
<if test="lpName != null">lp_name = #{lpName},</if>
<if test="firstSignInTime != null">first_sign_in_time = #{firstSignInTime},</if>
<if test="firstSignOutTime != null">first_sign_out_time = #{firstSignOutTime},</if>
<if test="firstSignTodayTomorrow != null">first_sign_today_tomorrow = #{firstSignTodayTomorrow},</if>
<if test="secondFlag != null">second_flag = #{secondFlag},</if>
second_sign_in_time = #{secondSignInTime},
second_sign_out_time = #{secondSignOutTime},
second_sign_today_tomorrow = #{secondSignTodayTomorrow},
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteLineConfigById" parameterType="Long">
delete
from line_config
where id = #{id}
</delete>
<delete id="deleteLineConfigByIds" parameterType="String">
delete from line_config where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>