代码调整

This commit is contained in:
2022-12-12 15:18:48 +08:00
parent 9b8af7945a
commit d043ab478b
10 changed files with 60 additions and 4 deletions

View File

@@ -359,6 +359,21 @@ public class DeptController extends BaseController {
}
/**
* 获取所有本部单位
* @author cdf
* @date 2022/12/8
*/
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
@GetMapping("/getSpecialDeptList")
@ApiOperation("获取所有本部单位")
public HttpResult<List<Dept>> getSpecialDeptList(){
String methodDescribe = getMethodDescribe("getSpecialDeptList");
List<Dept> deptList = deptService.getSpecialDeptList();
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptList, methodDescribe);
}
}

View File

@@ -186,4 +186,11 @@ public interface IDeptService extends IService<Dept> {
* @date 2022/12/1
*/
List<Dept> getDirectSonSelf(String deptId);
/**
* 获取所有本部
* @author cdf
* @date 2022/12/8
*/
List<Dept> getSpecialDeptList();
}

View File

@@ -357,4 +357,11 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
or().eq(Dept::getId,deptId);
return this.list(lambdaQueryWrapper);
}
@Override
public List<Dept> getSpecialDeptList() {
LambdaQueryWrapper<Dept> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(Dept::getSpecialType,1).eq(Dept::getState, DataStateEnum.ENABLE.getCode());
return this.list(lambdaQueryWrapper);
}
}