解决直播间时间不正确问题

This commit is contained in:
lifenlong
2021-06-29 17:01:55 +08:00
4 changed files with 9 additions and 7 deletions

View File

@@ -84,7 +84,7 @@ public class ManagerTokenGenerate extends AbstractTokenGenerate {
//for循环路径集合
for (String path : paths) {
//如果是超级权限 则计入超级权限
if (menu.getIsSupper()) {
if (menu.getIsSupper() != null && menu.getIsSupper()) {
//如果已有超级权限,则这里就不做权限的累加
if (!superPermissions.contains(path)) {
superPermissions.add(path);

View File

@@ -200,7 +200,7 @@ public class StudioServiceImpl extends ServiceImpl<StudioMapper, Studio> impleme
.eq(recommend != null, "recommend", true)
.eq(status != null, "status", status)
.orderByDesc("create_time");
if (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);

View File

@@ -199,13 +199,12 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
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);
}