提交 | 用户 | 时间
|
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.sys.modular.system.mapper.PositionMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.sys.modular.system.entity.Position"> |
|
7 |
<id column="position_id" property="positionId"/> |
|
8 |
<result column="name" property="name"/> |
|
9 |
<result column="code" property="code"/> |
|
10 |
<result column="sort" property="sort"/> |
|
11 |
<result column="status" property="status"/> |
|
12 |
<result column="remark" property="remark"/> |
|
13 |
<result column="create_time" property="createTime"/> |
|
14 |
<result column="update_user" property="updateUser"/> |
|
15 |
<result column="update_time" property="updateTime"/> |
|
16 |
<result column="create_user" property="createUser"/> |
|
17 |
</resultMap> |
|
18 |
|
|
19 |
<!-- 通用查询结果列 --> |
|
20 |
<sql id="Base_Column_List"> |
|
21 |
position_id AS "positionId", name AS "name", code AS "code", sort AS "sort", status AS "status", remark AS "remark", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime", create_user AS "createUser" |
|
22 |
</sql> |
|
23 |
|
|
24 |
<select id="getAllPositionMap" resultType="java.util.Map"> |
|
25 |
select |
|
26 |
position_id AS "positionId", name AS "name" |
|
27 |
from sys_position |
|
28 |
</select> |
|
29 |
|
|
30 |
<select id="customList" resultType="cn.stylefeng.guns.sys.modular.system.model.result.PositionResult" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam"> |
|
31 |
select |
|
32 |
<include refid="Base_Column_List"/> |
|
33 |
from sys_position where 1 = 1 |
|
34 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
35 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
36 |
</if> |
|
37 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
38 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
39 |
</if> |
|
40 |
order by sort asc |
|
41 |
</select> |
|
42 |
|
|
43 |
<select id="customList" resultType="cn.stylefeng.guns.sys.modular.system.model.result.PositionResult" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam" databaseId="pgsql"> |
|
44 |
select |
|
45 |
<include refid="Base_Column_List"/> |
|
46 |
from sys_position where 1 = 1 |
|
47 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
48 |
and name like '%' || #{paramCondition.name} || '%' |
|
49 |
</if> |
|
50 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
51 |
and code like '%' || #{paramCondition.code} || '%' |
|
52 |
</if> |
|
53 |
order by sort asc |
|
54 |
</select> |
|
55 |
|
|
56 |
<select id="customList" resultType="cn.stylefeng.guns.sys.modular.system.model.result.PositionResult" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam" databaseId="oracle"> |
|
57 |
select |
|
58 |
<include refid="Base_Column_List"/> |
|
59 |
from sys_position where 1 = 1 |
|
60 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
61 |
and name like '%' || #{paramCondition.name} || '%' |
|
62 |
</if> |
|
63 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
64 |
and code like '%' || #{paramCondition.code} || '%' |
|
65 |
</if> |
|
66 |
order by sort asc |
|
67 |
</select> |
|
68 |
|
|
69 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam"> |
|
70 |
select |
|
71 |
<include refid="Base_Column_List"/> |
|
72 |
from sys_position where 1 = 1 |
|
73 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
74 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
75 |
</if> |
|
76 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
77 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
78 |
</if> |
|
79 |
order by sort asc |
|
80 |
</select> |
|
81 |
|
|
82 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam" databaseId="pgsql"> |
|
83 |
select |
|
84 |
<include refid="Base_Column_List"/> |
|
85 |
from sys_position where 1 = 1 |
|
86 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
87 |
and name like '%' || #{paramCondition.name} || '%' |
|
88 |
</if> |
|
89 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
90 |
and code like '%' || #{paramCondition.code} || '%' |
|
91 |
</if> |
|
92 |
order by sort asc |
|
93 |
</select> |
|
94 |
|
|
95 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam" databaseId="oracle"> |
|
96 |
select |
|
97 |
<include refid="Base_Column_List"/> |
|
98 |
from sys_position where 1 = 1 |
|
99 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
100 |
and name like '%' || #{paramCondition.name} || '%' |
|
101 |
</if> |
|
102 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
103 |
and code like '%' || #{paramCondition.code} || '%' |
|
104 |
</if> |
|
105 |
order by sort asc |
|
106 |
</select> |
|
107 |
|
|
108 |
<select id="customPageList" resultType="cn.stylefeng.guns.sys.modular.system.model.result.PositionResult" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam"> |
|
109 |
select |
|
110 |
<include refid="Base_Column_List"/> |
|
111 |
from sys_position |
|
112 |
<where> |
|
113 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
114 |
name like CONCAT('%',#{paramCondition.name},'%') |
|
115 |
</if> |
|
116 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
117 |
or code like CONCAT('%',#{paramCondition.code},'%') |
|
118 |
</if> |
|
119 |
</where> |
|
120 |
order by sort asc |
|
121 |
</select> |
|
122 |
|
|
123 |
<select id="customPageList" resultType="cn.stylefeng.guns.sys.modular.system.model.result.PositionResult" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam" databaseId="pgsql"> |
|
124 |
select |
|
125 |
<include refid="Base_Column_List"/> |
|
126 |
from sys_position |
|
127 |
<where> |
|
128 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
129 |
and name like '%' || #{paramCondition.name} || '%' |
|
130 |
</if> |
|
131 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
132 |
or code like '%' || #{paramCondition.code} || '%' |
|
133 |
</if> |
|
134 |
</where> |
|
135 |
order by sort asc |
|
136 |
</select> |
|
137 |
|
|
138 |
<select id="customPageList" resultType="cn.stylefeng.guns.sys.modular.system.model.result.PositionResult" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam" databaseId="oracle"> |
|
139 |
select |
|
140 |
<include refid="Base_Column_List"/> |
|
141 |
from sys_position |
|
142 |
<where> |
|
143 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
144 |
and name like '%' || #{paramCondition.name} || '%' |
|
145 |
</if> |
|
146 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
147 |
or code like '%' || #{paramCondition.code} || '%' |
|
148 |
</if> |
|
149 |
</where> |
|
150 |
order by sort asc |
|
151 |
</select> |
|
152 |
|
|
153 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam"> |
|
154 |
select |
|
155 |
<include refid="Base_Column_List"/> |
|
156 |
from sys_position where 1 = 1 |
|
157 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
158 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
159 |
</if> |
|
160 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
161 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
162 |
</if> |
|
163 |
order by sort asc |
|
164 |
</select> |
|
165 |
|
|
166 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam" databaseId="pgsql"> |
|
167 |
select |
|
168 |
<include refid="Base_Column_List"/> |
|
169 |
from sys_position where 1 = 1 |
|
170 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
171 |
and name like '%' || #{paramCondition.name} || '%' |
|
172 |
</if> |
|
173 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
174 |
and code like '%' || #{paramCondition.code} || '%' |
|
175 |
</if> |
|
176 |
order by sort asc |
|
177 |
</select> |
|
178 |
|
|
179 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.sys.modular.system.model.params.PositionParam" databaseId="oracle"> |
|
180 |
select |
|
181 |
<include refid="Base_Column_List"/> |
|
182 |
from sys_position where 1 = 1 |
|
183 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
184 |
and name like '%' || #{paramCondition.name} || '%' |
|
185 |
</if> |
|
186 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
187 |
and code like '%' || #{paramCondition.code} || '%' |
|
188 |
</if> |
|
189 |
order by sort asc |
|
190 |
</select> |
|
191 |
|
|
192 |
</mapper> |