Commit d5e1da8d by fudahua

部门搜索

parent 19ccdf19
...@@ -181,7 +181,7 @@ public interface DepartmentApiService { ...@@ -181,7 +181,7 @@ public interface DepartmentApiService {
* @param wxEnterpriseId * @param wxEnterpriseId
* @return * @return
*/ */
List<DepartmentDTO> searchDepartment(String search, String wxEnterpriseId); List<DepartmentShortDTO> searchDepartment(String search, String wxEnterpriseId);
/** /**
* 获取所有部门 * 获取所有部门
......
...@@ -80,5 +80,12 @@ public interface DepartmentMapper { ...@@ -80,5 +80,12 @@ public interface DepartmentMapper {
*/ */
public List<TabHaobanDepartment> listAllDepartment(String wxEnterpriseId); 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 { ...@@ -79,7 +79,7 @@ public interface DepartmentService {
* @param wxEnterpriseId * @param wxEnterpriseId
* @return * @return
*/ */
List<DepartmentDTO> searchDepartment(String search,String wxEnterpriseId); List<DepartmentShortDTO> searchDepartment(String search,String wxEnterpriseId);
/** /**
* 获取搜友部门 * 获取搜友部门
......
...@@ -209,8 +209,8 @@ public class DepartmentServiceImpl implements DepartmentService { ...@@ -209,8 +209,8 @@ public class DepartmentServiceImpl implements DepartmentService {
} }
@Override @Override
public List<DepartmentDTO> searchDepartment(String search, String wxEnterpriseId) { public List<DepartmentShortDTO> searchDepartment(String search, String wxEnterpriseId) {
return null; return EntityUtil.changeEntityListByJSON(DepartmentShortDTO.class, mapper.searchDepartment(search,wxEnterpriseId));
} }
@Override @Override
......
...@@ -790,8 +790,8 @@ public class DepartmentApiServiceImpl implements DepartmentApiService { ...@@ -790,8 +790,8 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
} }
@Override @Override
public List<DepartmentDTO> searchDepartment(String search, String wxEnterpriseId) { public List<DepartmentShortDTO> searchDepartment(String search, String wxEnterpriseId) {
return null; return departmentService.searchDepartment(search,wxEnterpriseId);
} }
@Override @Override
......
...@@ -535,4 +535,12 @@ ...@@ -535,4 +535,12 @@
from tab_haoban_department from tab_haoban_department
where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1 where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1
</select> </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> </mapper>
\ No newline at end of file
...@@ -842,7 +842,7 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -842,7 +842,7 @@ public class DepartmentContoller extends WebBaseController{
if (StringUtils.isBlank(wxEnterpriseId)) { if (StringUtils.isBlank(wxEnterpriseId)) {
return resultResponse(HaoBanErrCode.ERR_6); 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); 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