Commit 7acc9793b3f5a4c5941ef767f6201111d2c7ce8f
Exists in
master
and in
8 other branches
Merge remote-tracking branch 'origin/master'
Showing 4 changed files
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UsersMapper.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UsersServiceImpl.java
- platform-biz-service/src/main/resources/mainOrm/Users.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/UsersMapper.java
View file @
7acc979
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UsersServiceImpl.java
View file @
7acc979
... | ... | @@ -31,8 +31,12 @@ |
31 | 31 | |
32 | 32 | @Override |
33 | 33 | public List<Users> queryUsers2(UsersQuery query) { |
34 | + if (query.getNeed() != null) { | |
35 | + query.mysqlBuild(usersMapper.queryUsersCount2(query)); | |
36 | + } | |
34 | 37 | return usersMapper.queryUsers2(query); |
35 | 38 | } |
39 | + | |
36 | 40 | |
37 | 41 | @Override |
38 | 42 | public Users getUsersByLoginCenterId(Integer id) { |
platform-biz-service/src/main/resources/mainOrm/Users.xml
View file @
7acc979
... | ... | @@ -217,6 +217,37 @@ |
217 | 217 | </select> |
218 | 218 | |
219 | 219 | |
220 | + | |
221 | + <select id="queryUsersCount2" resultType="int" parameterType="com.lyms.platform.permission.model.UsersQuery"> | |
222 | + select count(DISTINCT u.id) | |
223 | + from users u LEFT JOIN user_role_maps ur | |
224 | + on u.id = ur.user_id | |
225 | + where 1=1 | |
226 | + <if test="keyword != null and keyword != ''"> | |
227 | + and name like CONCAT(#{keyword}, '%') | |
228 | + </if> | |
229 | + <if test="ksId != null and ksId != ''"> | |
230 | + and u.ks_id = #{ksId,jdbcType=INTEGER} | |
231 | + </if> | |
232 | + <if test="orgId != null and orgId != ''"> | |
233 | + and u.org_id = #{orgId,jdbcType=INTEGER} | |
234 | + </if> | |
235 | + <if test="deptId != null and deptId != ''"> | |
236 | + and u.dept_id = #{deptId,jdbcType=INTEGER} | |
237 | + </if> | |
238 | + <if test="roleId != null and roleId != ''"> | |
239 | + and ur.role_id = #{roleId,jdbcType=INTEGER} | |
240 | + </if> | |
241 | + <if test="yn != null and yn != ''"> | |
242 | + and u.yn = #{yn,jdbcType=INTEGER} | |
243 | + and ur.yn = #{yn,jdbcType=INTEGER} | |
244 | + </if> | |
245 | + <if test="type != null and type != ''"> | |
246 | + and u.type = #{type,jdbcType=INTEGER} | |
247 | + </if> | |
248 | + </select> | |
249 | + | |
250 | + | |
220 | 251 | <select id="queryUsersCount" resultType="int" parameterType="com.lyms.platform.permission.model.UsersQuery"> |
221 | 252 | select count(1) from users |
222 | 253 | <include refid="UsersCondition" /> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
7acc979