Skip to content

Commit

Permalink
新增管理员即赋予权限无法生效问题处理。直播间未登录用户报错问题处理
Browse files Browse the repository at this point in the history
  • Loading branch information
chopper711 committed Jun 29, 2021
1 parent 3ee3e49 commit c1b9f28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public IPage<Studio> studioList(PageVO pageVO, Integer recommend, String status)
.eq(recommend != null, "recommend", true)
.eq(status != null, "status", status)
.orderByDesc("create_time");
if (UserContext.getCurrentUser()!=null&&UserContext.getCurrentUser().getRole().equals(UserEnums.STORE)) {
if (UserContext.getCurrentUser() != null && UserContext.getCurrentUser().getRole().equals(UserEnums.STORE)) {
queryWrapper.eq("store_id", UserContext.getCurrentUser().getStoreId());
}
return this.page(PageUtil.initPage(pageVO), queryWrapper);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,12 @@ public void saveAdminUser(AdminUserDTO adminUser, List<String> roles) {
if (roles.size() > 10) {
throw new ServiceException(ResultCode.PERMISSION_BEYOND_TEN);
}
if (roles != null && roles.size() > 0) {
if (roles.size() > 0) {
dbUser.setRoleIds(StringUtils.join(",", roles));
}


this.save(dbUser);
updateRole(adminUser.getId(), roles);
dbUser = this.findByUsername(dbUser.getUsername());
updateRole(dbUser.getId(), roles);
}


Expand Down

0 comments on commit c1b9f28

Please sign in to comment.