Revert "支持角色父子继承,允许子角色单独调整自己有的权限"

This commit is contained in:
陈博文
2025-06-23 09:35:03 +08:00
parent 6b4979dab0
commit 40863d00d2
19 changed files with 21 additions and 700 deletions

View File

@@ -8,6 +8,9 @@ import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
/**
* @author chenbowen
*/
@Schema(description = "管理后台 - 登录 Response VO")
@Data
@NoArgsConstructor
@@ -27,4 +30,6 @@ public class AuthLoginRespVO {
@Schema(description = "过期时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime expiresTime;
@Schema(description = "租户编号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long tenantId;
}

View File

@@ -39,9 +39,6 @@ public class DeptRespVO {
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "时间戳格式")
private LocalDateTime createTime;
@Schema(description = "组织机构是否租户", example = "true")
private Boolean isTenant = false;
@Schema(description = "租户编号", example = "1024")
private Long tenantId;

View File

@@ -48,9 +48,6 @@ public class DeptSaveReqVO {
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
private Integer status;
@Schema(description = "组织机构是否租户", example = "true")
private Boolean isTenant = false;
@Schema(description = "租户编号", example = "1024")
private Long tenantId;

View File

@@ -10,6 +10,11 @@ import cn.iocoder.yudao.module.system.service.tenant.TenantService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Set;

View File

@@ -1,26 +0,0 @@
package cn.iocoder.yudao.module.system.controller.admin.usertenant.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 用户-租户关系分页 Request VO")
@Data
public class UserTenantPageReqVO extends PageParam {
@Schema(description = "用户ID", example = "32426")
private Long userId;
@Schema(description = "租户ID", example = "30027")
private Long tenantId;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@@ -1,27 +0,0 @@
package cn.iocoder.yudao.module.system.controller.admin.usertenant.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 用户-租户关系 Response VO")
@Data
@ExcelIgnoreUnannotated
public class UserTenantRespVO {
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26967")
@ExcelProperty("主键ID")
private Long id;
@Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32426")
@ExcelProperty("用户ID")
private Long userId;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@@ -1,22 +0,0 @@
package cn.iocoder.yudao.module.system.controller.admin.usertenant.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
@Schema(description = "管理后台 - 用户-租户关系新增/修改 Request VO")
@Data
public class UserTenantSaveReqVO {
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26967")
private Long id;
@Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32426")
@NotNull(message = "用户ID不能为空")
private Long userId;
@Schema(description = "租户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30027")
@NotNull(message = "租户ID不能为空")
private Long tenantId;
}

View File

@@ -62,10 +62,5 @@ public class DeptDO extends TenantBaseDO {
* 枚举 {@link CommonStatusEnum}
*/
private Integer status;
/**
* 组织机构是否为租户
*/
private Boolean isTenant;
}

View File

@@ -40,14 +40,12 @@ public interface DeptMapper extends BaseMapperX<DeptDO> {
default DeptDO selectByTenantIdAndIsTenant(Long tenantId) {
return selectOne(new LambdaQueryWrapperX<DeptDO>()
.eq(DeptDO::getTenantId, tenantId)
.eq(DeptDO::getIsTenant, true));
.eq(DeptDO::getTenantId, tenantId));
}
default DeptDO selectByTenantIdAndIsTenantExcludeId(Long tenantId, Long excludeId) {
return selectOne(new LambdaQueryWrapperX<DeptDO>()
.eq(DeptDO::getTenantId, tenantId)
.eq(DeptDO::getIsTenant, true)
.ne(DeptDO::getId, excludeId));
}

Some files were not shown because too many files have changed in this diff Show More