Commit d5e1da8d by fudahua

部门搜索

parent 19ccdf19
......@@ -181,7 +181,7 @@ public interface DepartmentApiService {
* @param wxEnterpriseId
* @return
*/
List<DepartmentDTO> searchDepartment(String search, String wxEnterpriseId);
List<DepartmentShortDTO> searchDepartment(String search, String wxEnterpriseId);
/**
* 获取所有部门
......
......@@ -80,5 +80,12 @@ public interface DepartmentMapper {
*/
public List<TabHaobanDepartment> listAllDepartment(String wxEnterpriseId);
/**
* 查询所有部门
* @param wxEnterpriseId
* @return
*/
public List<TabHaobanDepartment> searchDepartment(String search,String wxEnterpriseId);
}
\ No newline at end of file
......@@ -79,7 +79,7 @@ public interface DepartmentService {
* @param wxEnterpriseId
* @return
*/
List<DepartmentDTO> searchDepartment(String search,String wxEnterpriseId);
List<DepartmentShortDTO> searchDepartment(String search,String wxEnterpriseId);
/**
* 获取搜友部门
......
......@@ -209,8 +209,8 @@ public class DepartmentServiceImpl implements DepartmentService {
}
@Override
public List<DepartmentDTO> searchDepartment(String search, String wxEnterpriseId) {
return null;
public List<DepartmentShortDTO> searchDepartment(String search, String wxEnterpriseId) {
return EntityUtil.changeEntityListByJSON(DepartmentShortDTO.class, mapper.searchDepartment(search,wxEnterpriseId));
}
@Override
......
......@@ -790,8 +790,8 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
}
@Override
public List<DepartmentDTO> searchDepartment(String search, String wxEnterpriseId) {
return null;
public List<DepartmentShortDTO> searchDepartment(String search, String wxEnterpriseId) {
return departmentService.searchDepartment(search,wxEnterpriseId);
}
@Override
......
......@@ -535,4 +535,12 @@
from tab_haoban_department
where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1
</select>
<select id="searchDepartment" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List_short" />
from tab_haoban_department
where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1
and department_name likelike CONCAT('%',#{search},'%')
</select>
</mapper>
\ No newline at end of file
......@@ -842,7 +842,7 @@ public class DepartmentContoller extends WebBaseController{
if (StringUtils.isBlank(wxEnterpriseId)) {
return resultResponse(HaoBanErrCode.ERR_6);
}
List<DepartmentDTO> list = departmentApiService.searchDepartment(search, wxEnterpriseId);
List<DepartmentShortDTO> list = departmentApiService.searchDepartment(search, wxEnterpriseId);
return resultResponse(HaoBanErrCode.ERR_1,list);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment