update 优化 岗位如果绑定了用户则不允许禁用

This commit is contained in:
疯狂的狮子Li
2023-08-07 18:14:03 +08:00
parent dc752ade25
commit 2f3dbbfe32
3 changed files with 17 additions and 2 deletions

View File

@ -147,7 +147,7 @@ public class SysPostServiceImpl implements ISysPostService {
for (Long postId : postIds) {
SysPost post = selectPostById(postId);
if (countUserPostById(postId) > 0) {
throw new ServiceException(String.format("%1$s已分配,不能删除", post.getPostName()));
throw new ServiceException(String.format("%1$s已分配不能删除!", post.getPostName()));
}
}
return baseMapper.deleteBatchIds(Arrays.asList(postIds));