SalaryMapper.xml
7.98 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<?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.bootdo.activiti.dao.SalaryDao">
<select id="get" resultType="com.bootdo.activiti.domain.SalaryDO">
select `id`,`PROC_INS_ID`,`USER_ID`,`OFFICE_ID`,`POST`,`AGE`,`EDU`,`CONTENT`,`OLDA`,`OLDB`,`OLDC`,`NEWA`,`NEWB`,`NEWC`,`ADD_NUM`,`EXE_DATE`,`HR_TEXT`,`LEAD_TEXT`,`MAIN_LEAD_TEXT`,`create_by`,`create_date`,`update_by`,`update_date`,`remarks`,`del_flag` from salary where id = #{value}
</select>
<select id="list" resultType="com.bootdo.activiti.domain.SalaryDO">
select `id`,`PROC_INS_ID`,`USER_ID`,`OFFICE_ID`,`POST`,`AGE`,`EDU`,`CONTENT`,`OLDA`,`OLDB`,`OLDC`,`NEWA`,`NEWB`,`NEWC`,`ADD_NUM`,`EXE_DATE`,`HR_TEXT`,`LEAD_TEXT`,`MAIN_LEAD_TEXT`,`create_by`,`create_date`,`update_by`,`update_date`,`remarks`,`del_flag` from salary
<where>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="procInsId != null and procInsId != ''"> and PROC_INS_ID = #{procInsId} </if>
<if test="userId != null and userId != ''"> and USER_ID = #{userId} </if>
<if test="officeId != null and officeId != ''"> and OFFICE_ID = #{officeId} </if>
<if test="post != null and post != ''"> and POST = #{post} </if>
<if test="age != null and age != ''"> and AGE = #{age} </if>
<if test="edu != null and edu != ''"> and EDU = #{edu} </if>
<if test="content != null and content != ''"> and CONTENT = #{content} </if>
<if test="olda != null and olda != ''"> and OLDA = #{olda} </if>
<if test="oldb != null and oldb != ''"> and OLDB = #{oldb} </if>
<if test="oldc != null and oldc != ''"> and OLDC = #{oldc} </if>
<if test="newa != null and newa != ''"> and NEWA = #{newa} </if>
<if test="newb != null and newb != ''"> and NEWB = #{newb} </if>
<if test="newc != null and newc != ''"> and NEWC = #{newc} </if>
<if test="addNum != null and addNum != ''"> and ADD_NUM = #{addNum} </if>
<if test="exeDate != null and exeDate != ''"> and EXE_DATE = #{exeDate} </if>
<if test="hrText != null and hrText != ''"> and HR_TEXT = #{hrText} </if>
<if test="leadText != null and leadText != ''"> and LEAD_TEXT = #{leadText} </if>
<if test="mainLeadText != null and mainLeadText != ''"> and MAIN_LEAD_TEXT = #{mainLeadText} </if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy} </if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate} </if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy} </if>
<if test="updateDate != null and updateDate != ''"> and update_date = #{updateDate} </if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks} </if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag} </if>
</where>
<choose>
<when test="sort != null and sort.trim() != ''">
order by ${sort} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="count" resultType="int">
select count(*) from salary
<where>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="procInsId != null and procInsId != ''"> and PROC_INS_ID = #{procInsId} </if>
<if test="userId != null and userId != ''"> and USER_ID = #{userId} </if>
<if test="officeId != null and officeId != ''"> and OFFICE_ID = #{officeId} </if>
<if test="post != null and post != ''"> and POST = #{post} </if>
<if test="age != null and age != ''"> and AGE = #{age} </if>
<if test="edu != null and edu != ''"> and EDU = #{edu} </if>
<if test="content != null and content != ''"> and CONTENT = #{content} </if>
<if test="olda != null and olda != ''"> and OLDA = #{olda} </if>
<if test="oldb != null and oldb != ''"> and OLDB = #{oldb} </if>
<if test="oldc != null and oldc != ''"> and OLDC = #{oldc} </if>
<if test="newa != null and newa != ''"> and NEWA = #{newa} </if>
<if test="newb != null and newb != ''"> and NEWB = #{newb} </if>
<if test="newc != null and newc != ''"> and NEWC = #{newc} </if>
<if test="addNum != null and addNum != ''"> and ADD_NUM = #{addNum} </if>
<if test="exeDate != null and exeDate != ''"> and EXE_DATE = #{exeDate} </if>
<if test="hrText != null and hrText != ''"> and HR_TEXT = #{hrText} </if>
<if test="leadText != null and leadText != ''"> and LEAD_TEXT = #{leadText} </if>
<if test="mainLeadText != null and mainLeadText != ''"> and MAIN_LEAD_TEXT = #{mainLeadText} </if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy} </if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate} </if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy} </if>
<if test="updateDate != null and updateDate != ''"> and update_date = #{updateDate} </if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks} </if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag} </if>
</where>
</select>
<insert id="save" parameterType="com.bootdo.activiti.domain.SalaryDO">
insert into salary
(
`id`,
`PROC_INS_ID`,
`USER_ID`,
`OFFICE_ID`,
`POST`,
`AGE`,
`EDU`,
`CONTENT`,
`OLDA`,
`OLDB`,
`OLDC`,
`NEWA`,
`NEWB`,
`NEWC`,
`ADD_NUM`,
`EXE_DATE`,
`HR_TEXT`,
`LEAD_TEXT`,
`MAIN_LEAD_TEXT`,
`create_by`,
`create_date`,
`update_by`,
`update_date`,
`remarks`,
`del_flag`
)
values
(
#{id},
#{procInsId},
#{userId},
#{officeId},
#{post},
#{age},
#{edu},
#{content},
#{olda},
#{oldb},
#{oldc},
#{newa},
#{newb},
#{newc},
#{addNum},
#{exeDate},
#{hrText},
#{leadText},
#{mainLeadText},
#{createBy},
#{createDate},
#{updateBy},
#{updateDate},
#{remarks},
#{delFlag}
)
</insert>
<update id="update" parameterType="com.bootdo.activiti.domain.SalaryDO">
update salary
<set>
<if test="procInsId != null">`PROC_INS_ID` = #{procInsId}, </if>
<if test="userId != null">`USER_ID` = #{userId}, </if>
<if test="officeId != null">`OFFICE_ID` = #{officeId}, </if>
<if test="post != null">`POST` = #{post}, </if>
<if test="age != null">`AGE` = #{age}, </if>
<if test="edu != null">`EDU` = #{edu}, </if>
<if test="content != null">`CONTENT` = #{content}, </if>
<if test="olda != null">`OLDA` = #{olda}, </if>
<if test="oldb != null">`OLDB` = #{oldb}, </if>
<if test="oldc != null">`OLDC` = #{oldc}, </if>
<if test="newa != null">`NEWA` = #{newa}, </if>
<if test="newb != null">`NEWB` = #{newb}, </if>
<if test="newc != null">`NEWC` = #{newc}, </if>
<if test="addNum != null">`ADD_NUM` = #{addNum}, </if>
<if test="exeDate != null">`EXE_DATE` = #{exeDate}, </if>
<if test="hrText != null">`HR_TEXT` = #{hrText}, </if>
<if test="leadText != null">`LEAD_TEXT` = #{leadText}, </if>
<if test="mainLeadText != null">`MAIN_LEAD_TEXT` = #{mainLeadText}, </if>
<if test="createBy != null">`create_by` = #{createBy}, </if>
<if test="createDate != null">`create_date` = #{createDate}, </if>
<if test="updateBy != null">`update_by` = #{updateBy}, </if>
<if test="updateDate != null">`update_date` = #{updateDate}, </if>
<if test="remarks != null">`remarks` = #{remarks}, </if>
<if test="delFlag != null">`del_flag` = #{delFlag}</if>
</set>
where id = #{id}
</update>
<delete id="remove">
delete from salary where id = #{value}
</delete>
<delete id="batchRemove">
delete from salary where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>