|
@@ -16,10 +16,10 @@ public interface DeptDao extends BaseDao<Dept> {
|
|
|
|
|
|
@Select({
|
|
|
"<script>",
|
|
|
- "select * from sys_user where username in (select leader from sys_dept where id in ",
|
|
|
- "<foreach item='id' collection='ids' open='(' separator=',' close=')'>",
|
|
|
- "#{id}",
|
|
|
- "</foreach>)",
|
|
|
+ "select * from sys_user where username in (select leader from sys_dept where id in "
|
|
|
+ + "<foreach item='id' collection='ids' open='(' separator=',' close=')'>"
|
|
|
+ + "#{id}"
|
|
|
+ + "</foreach>)",
|
|
|
"</script>"
|
|
|
})
|
|
|
List<User> getLeader(@Param("ids") List<String> ids);
|
|
@@ -29,10 +29,10 @@ public interface DeptDao extends BaseDao<Dept> {
|
|
|
|
|
|
@Select({
|
|
|
"<script>",
|
|
|
- "select * from sys_user where dept_id in",
|
|
|
- "<foreach item='id' collection='ids' open='(' separator=',' close=')'>",
|
|
|
- "#{roleId}",
|
|
|
- "</foreach>",
|
|
|
+ "select * from sys_user where dept_id in"
|
|
|
+ + "<foreach item='id' collection='ids' open='(' separator=',' close=')'>"
|
|
|
+ + "#{roleId}"
|
|
|
+ + "</foreach>",
|
|
|
"</script>"
|
|
|
})
|
|
|
List<User> getUsers(@Param("ids") List<String> ids);
|
|
@@ -40,14 +40,14 @@ public interface DeptDao extends BaseDao<Dept> {
|
|
|
|
|
|
@Select({
|
|
|
"<script>",
|
|
|
- "select * from sys_user where dept_id in",
|
|
|
- "<foreach item='id' collection='ids' open='(' separator=',' close=')'>",
|
|
|
- "#{id}",
|
|
|
- "</foreach>",
|
|
|
- "and username in",
|
|
|
- "<foreach item='id' collection='roleIds' open='(' separator=',' close=')'>",
|
|
|
- "#{id}",
|
|
|
- "</foreach>",
|
|
|
+ "select * from sys_user where dept_id in"
|
|
|
+ + "<foreach item='id' collection='ids' open='(' separator=',' close=')'>"
|
|
|
+ + "#{id}"
|
|
|
+ + "</foreach>"
|
|
|
+ + "and username in"
|
|
|
+ + "<foreach item='id' collection='roleIds' open='(' separator=',' close=')'>"
|
|
|
+ + "#{id}"
|
|
|
+ + "</foreach>",
|
|
|
"</script>"
|
|
|
})
|
|
|
List<User> getRoleUsers(@Param("ids") List<String> ids, @Param("roleIds") List<String> roleIds);
|