提交 | 用户 | 时间
|
1ac2bc
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
懒 |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
3 |
<mapper namespace="cn.stylefeng.guns.workflow.modular.mapper.MyleaveMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.workflow.modular.entity.Myleave"> |
|
7 |
<id column="myleave_id" property="myleaveId"/> |
|
8 |
<result column="username" property="username"/> |
|
9 |
<result column="type" property="type"/> |
|
10 |
<result column="starttime" property="starttime"/> |
|
11 |
<result column="endtime" property="endtime"/> |
|
12 |
<result column="whenlong" property="whenlong"/> |
|
13 |
<result column="reason" property="reason"/> |
|
14 |
</resultMap> |
|
15 |
|
|
16 |
<!-- 通用查询结果列 --> |
|
17 |
<sql id="Base_Column_List"> |
|
18 |
myleave_id AS "myleaveId", username AS "username", type AS "type", starttime AS "starttime", endtime AS "endtime", whenlong AS "whenlong", reason AS "reason" |
|
19 |
</sql> |
|
20 |
|
|
21 |
<select id="customList" resultType="cn.stylefeng.guns.workflow.modular.model.result.MyleaveResult" parameterType="cn.stylefeng.guns.workflow.modular.model.params.MyLeaveParam"> |
|
22 |
select |
|
23 |
<include refid="Base_Column_List"/> |
|
24 |
from oa_myleave where 1 = 1 |
|
25 |
</select> |
|
26 |
|
|
27 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.workflow.modular.model.params.MyLeaveParam"> |
|
28 |
select |
|
29 |
<include refid="Base_Column_List"/> |
|
30 |
from oa_myleave where 1 = 1 |
|
31 |
</select> |
|
32 |
|
|
33 |
<select id="customPageList" resultType="cn.stylefeng.guns.workflow.modular.model.result.MyleaveResult" parameterType="cn.stylefeng.guns.workflow.modular.model.params.MyLeaveParam"> |
|
34 |
select |
|
35 |
<include refid="Base_Column_List"/> |
|
36 |
from oa_myleave where 1 = 1 |
|
37 |
</select> |
|
38 |
|
|
39 |
<!-- 列表 --> |
|
40 |
<select id="datalistPage" resultType="map"> |
|
41 |
select |
|
42 |
l.username as username, |
|
43 |
l.type as type, |
|
44 |
l.starttime as starttime, |
|
45 |
l.endtime as endtime, |
|
46 |
l.whenlong as whenlong, |
|
47 |
l.myleave_id as myleaveId, |
|
48 |
l.reason as reason |
|
49 |
from |
|
50 |
oa_myleave l |
|
51 |
where 1=1 |
|
52 |
<if test="pd.keywords!= null and pd.keywords != ''"> |
|
53 |
and |
|
54 |
( |
|
55 |
l.reason LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') |
|
56 |
or |
|
57 |
l.username LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') |
|
58 |
) |
|
59 |
</if> |
|
60 |
<if test="pd.username!= null and pd.username != ''"> |
|
61 |
and l.username = #{pd.username} |
|
62 |
</if> |
|
63 |
<if test="pd.type != null and pd.type != ''"> |
|
64 |
and l.type=#{pd.type} |
|
65 |
</if> |
|
66 |
order by l.endtime desc |
|
67 |
</select> |
|
68 |
|
|
69 |
<select id="datalistPage" resultType="map" databaseId="mssql"> |
|
70 |
select |
|
71 |
l.username as username, |
|
72 |
l.type as type, |
|
73 |
l.starttime as starttime, |
|
74 |
l.endtime as endtime, |
|
75 |
l.whenlong as whenlong, |
|
76 |
l.myleave_id as myleaveId, |
|
77 |
l.reason as reason |
|
78 |
from |
|
79 |
oa_myleave l |
|
80 |
where 1=1 |
|
81 |
<if test="pd.keywords!= null and pd.keywords != ''"> |
|
82 |
and |
|
83 |
( |
|
84 |
l.reason LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') |
|
85 |
or |
|
86 |
l.username LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') |
|
87 |
) |
|
88 |
</if> |
|
89 |
<if test="pd.username!= null and pd.username != ''"> |
|
90 |
and l.username = #{pd.username} |
|
91 |
</if> |
|
92 |
<if test="pd.type != null and pd.type != ''"> |
|
93 |
and l.type=#{pd.type} |
|
94 |
</if> |
|
95 |
order by l.endtime desc |
|
96 |
</select> |
|
97 |
|
|
98 |
<select id="datalistPage" resultType="map" databaseId="pgsql"> |
|
99 |
select |
|
100 |
l.username as "username", |
|
101 |
l.type as "type", |
|
102 |
l.starttime as "starttime", |
|
103 |
l.endtime as "endtime", |
|
104 |
l.whenlong as "whenlong", |
|
105 |
l.myleave_id as "myleaveId", |
|
106 |
l.reason as "reason" |
|
107 |
from |
|
108 |
oa_myleave l |
|
109 |
where 1=1 |
|
110 |
<if test="pd.keywords!= null and pd.keywords != ''"> |
|
111 |
and |
|
112 |
( |
|
113 |
l.reason LIKE '%' || #{pd.keywords} || '%' |
|
114 |
or |
|
115 |
l.username LIKE '%' || #{pd.keywords} || '%' |
|
116 |
) |
|
117 |
</if> |
|
118 |
<if test="pd.username!= null and pd.username != ''"> |
|
119 |
and l.username = #{pd.username} |
|
120 |
</if> |
|
121 |
<if test="pd.type != null and pd.type != ''"> |
|
122 |
and l.type=#{pd.type} |
|
123 |
</if> |
|
124 |
order by l.endtime desc |
|
125 |
</select> |
|
126 |
|
|
127 |
<select id="datalistPage" resultType="map" databaseId="oracle"> |
|
128 |
select |
|
129 |
l.username as "username", |
|
130 |
l.type as "type", |
|
131 |
l.starttime as "starttime", |
|
132 |
l.endtime as "endtime", |
|
133 |
l.whenlong as "whenlong", |
|
134 |
l.myleave_id as "myleaveId", |
|
135 |
l.reason as "reason" |
|
136 |
from |
|
137 |
oa_myleave l |
|
138 |
where 1=1 |
|
139 |
<if test="pd.keywords!= null and pd.keywords != ''"> |
|
140 |
and |
|
141 |
( |
|
142 |
l.reason LIKE '%' || #{pd.keywords} || '%' |
|
143 |
or |
|
144 |
l.username LIKE '%' || #{pd.keywords} || '%' |
|
145 |
) |
|
146 |
</if> |
|
147 |
<if test="pd.username!= null and pd.username != ''"> |
|
148 |
and l.username = #{pd.username} |
|
149 |
</if> |
|
150 |
<if test="pd.type != null and pd.type != ''"> |
|
151 |
and l.type=#{pd.type} |
|
152 |
</if> |
|
153 |
order by l.endtime desc |
|
154 |
</select> |
|
155 |
|
|
156 |
|
|
157 |
<!--查询请假类型--> |
|
158 |
<select id="getLeaves" resultType="map"> |
|
159 |
select dict.dict_id dictId, |
|
160 |
dict.name dictName |
|
161 |
from sys_dict dict |
|
162 |
where dict.dict_type_id = '1160532886713155585' |
|
163 |
</select> |
|
164 |
|
|
165 |
<select id="getLeaves" resultType="map" databaseId="mssql"> |
|
166 |
select dict.dict_id dictId, |
|
167 |
dict.name dictName |
|
168 |
from sys_dict dict |
|
169 |
where dict.dict_type_id = '1160532886713155585' |
|
170 |
</select> |
|
171 |
|
|
172 |
<select id="getLeaves" resultType="map" databaseId="pgsql"> |
|
173 |
select dict.dict_id "dictId", |
|
174 |
dict.name "dictName" |
|
175 |
from sys_dict dict |
|
176 |
where dict.dict_type_id = '1160532886713155585' |
|
177 |
</select> |
|
178 |
|
|
179 |
<select id="getLeaves" resultType="map" databaseId="oracle"> |
|
180 |
select dict.dict_id "dictId", |
|
181 |
dict.name "dictName" |
|
182 |
from sys_dict dict |
|
183 |
where dict.dict_type_id = '1160532886713155585' |
|
184 |
</select> |
|
185 |
|
|
186 |
</mapper> |