增加验证机构orgid是否存在方法
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
d1ea385a78
commit
8ca760dccf
@ -52,6 +52,12 @@ public class DeptController {
|
|||||||
deptService.deleteDept(id);
|
deptService.deleteDept(id);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/verifyOrgid")
|
||||||
|
@Operation(summary = "验证机构ID是否存在")
|
||||||
|
public CommonResult<Boolean> validateOrgIdExists(String orgId) {
|
||||||
|
boolean isExist = deptService.validateOrgIdExists(orgId);
|
||||||
|
return success(isExist);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@Operation(summary = "获取部门列表")
|
@Operation(summary = "获取部门列表")
|
||||||
|
|||||||
@ -35,6 +35,10 @@ public interface DeptService {
|
|||||||
* @param id 部门编号
|
* @param id 部门编号
|
||||||
*/
|
*/
|
||||||
void deleteDept(Long id);
|
void deleteDept(Long id);
|
||||||
|
/*
|
||||||
|
* 验证机构orgid是否存在
|
||||||
|
* */
|
||||||
|
Boolean validateOrgIdExists(String orgId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得部门信息
|
* 获得部门信息
|
||||||
|
|||||||
@ -87,6 +87,21 @@ public class DeptServiceImpl implements DeptService {
|
|||||||
// 删除部门
|
// 删除部门
|
||||||
deptMapper.deleteById(id);
|
deptMapper.deleteById(id);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean validateOrgIdExists(String orgId)
|
||||||
|
{
|
||||||
|
if (orgId == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
DeptDO dept = deptMapper.selectOne(DeptDO::getOrgid, orgId);
|
||||||
|
if (dept == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
void validateDeptExists(Long id) {
|
void validateDeptExists(Long id) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user