1550076451 лет назад: 2
Родитель
Сommit
1cebfeb35e
1 измененных файлов с 6 добавлено и 3 удалено
  1. 6 3
      zxkf-api/src/main/java/api/controller/system/UserController.java

+ 6 - 3
zxkf-api/src/main/java/api/controller/system/UserController.java

@@ -57,9 +57,12 @@ public class UserController extends BaseController {
57 57
         if (input.getDeptId() != null &&input.getDeptId()>0)
58 58
         {
59 59
             //查询下级部门所有人员
60
-            qw.inSql(User::getDeptId, "select dept_id from sys_dept where  " +
61
-                    " ancestors REGEXP CONCAT((select  ancestors from sys_dept where dept_id="+input.getDeptId()+"),',',"
62
-                    +input.getDeptId()+") ") ;
60
+            qw.and(wq->{
61
+                wq.inSql(User::getDeptId, "select dept_id from sys_dept where  " +
62
+                        " ancestors REGEXP CONCAT((select  ancestors from sys_dept where dept_id="+input.getDeptId()+"),',',"
63
+                        +input.getDeptId()+") ") ;
64
+                wq.or().like(User::getDeptId,input.getDeptId());
65
+            });
63 66
         }
64 67
         qw.like(!StringHelper.isEmpty(input.getUserName()), User::getUserName, input.getUserName());
65 68
         qw.like(!StringHelper.isEmpty(input.getNickName()), User::getNickName, input.getNickName());