dev:岗位管理-删除校验文案修改
parent
7360322ec4
commit
d7e75502ea
|
|
@ -29,13 +29,13 @@ public class PostRemoveExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long id) {
|
||||
// todo 校验是否有人员使用该岗位
|
||||
// 校验是否有人员使用该岗位
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("post_id", id);
|
||||
queryWrapper.eq("delete_enum", "FALSE");
|
||||
List userPostList = userRepository.list(queryWrapper);
|
||||
if (userPostList != null && userPostList.size() > 0) {
|
||||
throw new BizException("删除失败,该岗位正在被使用");
|
||||
throw new BizException("岗位有相应人员,请解除相关岗位信息后删除。");
|
||||
}
|
||||
|
||||
boolean res = postGateway.deletedPostById(id);
|
||||
|
|
@ -53,13 +53,13 @@ public class PostRemoveExe {
|
|||
throw new BizException("岗位ID不能为空");
|
||||
}
|
||||
|
||||
// todo 校验是否有人员使用该岗位
|
||||
// 校验是否有人员使用该岗位
|
||||
QueryWrapper<UserDO> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.in("post_id", ids);
|
||||
queryWrapper.eq("delete_enum", "FALSE");
|
||||
List<UserDO> userPostList = userRepository.list(queryWrapper);
|
||||
if (userPostList != null && userPostList.size() > 0) {
|
||||
throw new BizException("删除失败,有岗位正在被使用");
|
||||
throw new BizException("岗位有相应人员,请解除相关岗位信息后删除。");
|
||||
}
|
||||
|
||||
boolean res = postGateway.deletedPostByIds(ids);
|
||||
|
|
|
|||
Loading…
Reference in New Issue