diff --git a/web-app/src/main/java/com/zcloud/basic/info/command/PostRemoveExe.java b/web-app/src/main/java/com/zcloud/basic/info/command/PostRemoveExe.java index 036080c..2341637 100644 --- a/web-app/src/main/java/com/zcloud/basic/info/command/PostRemoveExe.java +++ b/web-app/src/main/java/com/zcloud/basic/info/command/PostRemoveExe.java @@ -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 queryWrapper = new QueryWrapper(); queryWrapper.in("post_id", ids); 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.deletedPostByIds(ids);