|
@@ -4,6 +4,7 @@ package com.flow.dao;
|
|
import com.flow.common.mybatis.dao.BaseDao;
|
|
import com.flow.common.mybatis.dao.BaseDao;
|
|
import com.flow.entity.Dept;
|
|
import com.flow.entity.Dept;
|
|
import com.flow.entity.User;
|
|
import com.flow.entity.User;
|
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Select;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -11,7 +12,7 @@ import java.util.List;
|
|
public interface DeptDao extends BaseDao<Dept> {
|
|
public interface DeptDao extends BaseDao<Dept> {
|
|
|
|
|
|
@Select("select * from sys_user where username = (select leader from sys_dept where id =#{id})")
|
|
@Select("select * from sys_user where username = (select leader from sys_dept where id =#{id})")
|
|
- User getLeader(String id);
|
|
|
|
|
|
+ User getLeader(@Param("id") String id);
|
|
|
|
|
|
@Select({
|
|
@Select({
|
|
"<script>",
|
|
"<script>",
|
|
@@ -21,10 +22,10 @@ public interface DeptDao extends BaseDao<Dept> {
|
|
"</foreach>)",
|
|
"</foreach>)",
|
|
"</script>"
|
|
"</script>"
|
|
})
|
|
})
|
|
- List<User> getLeader(List<String> ids);
|
|
|
|
|
|
+ List<User> getLeader(@Param("ids") List<String> ids);
|
|
|
|
|
|
@Select("select * from sys_user where dept_id = #{id}")
|
|
@Select("select * from sys_user where dept_id = #{id}")
|
|
- List<User> getUsers(String id);
|
|
|
|
|
|
+ List<User> getUsers(@Param("id") String id);
|
|
|
|
|
|
@Select({
|
|
@Select({
|
|
"<script>",
|
|
"<script>",
|
|
@@ -34,5 +35,5 @@ public interface DeptDao extends BaseDao<Dept> {
|
|
"</foreach>",
|
|
"</foreach>",
|
|
"</script>"
|
|
"</script>"
|
|
})
|
|
})
|
|
- List<User> getUsers(List<String> ids);
|
|
|
|
|
|
+ List<User> getUsers(@Param("ids") List<String> ids);
|
|
}
|
|
}
|