@@ -189,5 +189,8 @@ public class DeptController extends BladeController {
return R.data(list);
}
-
+ @GetMapping("selectDeptByParentId")
+ public R selectDeptByParentId(Long parentId) {
+ return R.data(deptService.selectDeptByParentId(parentId));
+ }
@@ -74,4 +74,5 @@ public interface DeptMapper extends BaseMapper<Dept> {
*/
List<String> getDeptNames(Long[] ids);
+ List<Dept> selectDeptByParentId(Long parentId);
@@ -112,4 +112,7 @@
and is_deleted = 0
</select>
+ <select id="selectDeptByParentId" resultMap="deptResultMap">
+ select * from jdrh.blade_dept where parent_id = #{parentId} and is_deleted = 0
+ </select>
</mapper>
@@ -125,4 +125,5 @@ public interface IDeptService extends IService<Dept> {
List<DeptVO> search(String deptName, Long parentId);
@@ -179,4 +179,9 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
return DeptWrapper.build().listNodeVO(deptList);
+ @Override
+ public List<Dept> selectDeptByParentId(Long parentId) {
+ return baseMapper.selectDeptByParentId(parentId);
+