修复新增租户后,租户管理员更改资料报错异常,前台传入岗位参数为null时会出现本错误,后台增加为空时创建空集合,避免空指针异常 #I8910U : https://gitee.com/zhijiantianya/yudao-cloud/issues/I8910U
parent
522ab17902
commit
3d5da3e3ff
|
|
@ -118,6 +118,9 @@ public class AdminUserServiceImpl implements AdminUserService {
|
|||
Set<Long> dbPostIds = convertSet(userPostMapper.selectListByUserId(userId), UserPostDO::getPostId);
|
||||
// 计算新增和删除的岗位编号
|
||||
Set<Long> postIds = updateObj.getPostIds();
|
||||
if (postIds==null) {
|
||||
postIds = new LinkedHashSet<>();
|
||||
}
|
||||
Collection<Long> createPostIds = CollUtil.subtract(postIds, dbPostIds);
|
||||
Collection<Long> deletePostIds = CollUtil.subtract(dbPostIds, postIds);
|
||||
// 执行新增和删除。对于已经授权的菜单,不用做任何处理
|
||||
|
|
|
|||
Loading…
Reference in New Issue