用户岗位校验修复
This commit is contained in:
parent
8037a5566b
commit
f345b0ffd2
@ -518,10 +518,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
*/
|
||||
private void insertUserPost(SysUserBo user, boolean clear) {
|
||||
Long[] posts = user.getPostIds();
|
||||
if (posts.length >1) {
|
||||
throw new ServiceException("用户" + user.getUserName() + "不能添加多个岗位");
|
||||
}
|
||||
if (ArrayUtil.isNotEmpty(posts)) {
|
||||
if (posts.length >1) {
|
||||
throw new ServiceException("用户" + user.getUserName() + "不能添加多个岗位");
|
||||
}
|
||||
if (clear) {
|
||||
// 删除用户与岗位关联
|
||||
userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId, user.getUserId()));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user