反序列化问题。
This commit is contained in:
parent
1e852ba818
commit
8dbc917ff3
@ -1,5 +1,7 @@
|
||||
package com.qqchen.deploy.backend.deploy.dto;
|
||||
|
||||
import com.qqchen.deploy.backend.deploy.enums.BuildTypeEnum;
|
||||
import com.qqchen.deploy.backend.deploy.enums.DeployTypeEnum;
|
||||
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
@ -16,7 +18,6 @@ import lombok.EqualsAndHashCode;
|
||||
public class EnvironmentDTO extends BaseDTO {
|
||||
|
||||
@Schema(description = "租户编码")
|
||||
@NotBlank(message = "租户编码不能为空")
|
||||
private String tenantCode;
|
||||
|
||||
@Schema(description = "项目ID")
|
||||
@ -34,6 +35,12 @@ public class EnvironmentDTO extends BaseDTO {
|
||||
@Schema(description = "环境描述")
|
||||
private String envDesc;
|
||||
|
||||
@Schema(description = "构建方式:JENKINS-Jenkins构建, GITLAB_RUNNER-GitLab Runner构建, GITHUB_ACTION-GitHub Action构建")
|
||||
private BuildTypeEnum buildType;
|
||||
|
||||
@Schema(description = "部署方式:K8S-Kubernetes集群部署, DOCKER-Docker容器部署, VM-虚拟机部署")
|
||||
private DeployTypeEnum deployType;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
@NotNull(message = "排序号不能为空")
|
||||
private Integer sort;
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
package com.qqchen.deploy.backend.deploy.entity;
|
||||
|
||||
import com.qqchen.deploy.backend.deploy.enums.BuildTypeEnum;
|
||||
import com.qqchen.deploy.backend.deploy.enums.DeployTypeEnum;
|
||||
import com.qqchen.deploy.backend.framework.domain.Entity;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@ -18,7 +22,7 @@ public class Environment extends Entity<Long> {
|
||||
/**
|
||||
* 租户编码
|
||||
*/
|
||||
@Column(name = "tenant_code", nullable = false)
|
||||
@Column(name = "tenant_code")
|
||||
private String tenantCode;
|
||||
|
||||
/**
|
||||
@ -45,6 +49,20 @@ public class Environment extends Entity<Long> {
|
||||
@Column(name = "env_desc")
|
||||
private String envDesc;
|
||||
|
||||
/**
|
||||
* 构建方式
|
||||
*/
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "build_type")
|
||||
private BuildTypeEnum buildType;
|
||||
|
||||
/**
|
||||
* 部署方式
|
||||
*/
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "deploy_type")
|
||||
private DeployTypeEnum deployType;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package com.qqchen.deploy.backend.deploy.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 构建方式枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum BuildTypeEnum {
|
||||
|
||||
JENKINS("Jenkins构建"),
|
||||
GITLAB_RUNNER("GitLab Runner构建"),
|
||||
GITHUB_ACTION("GitHub Action构建");
|
||||
|
||||
private final String description;
|
||||
|
||||
BuildTypeEnum(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.qqchen.deploy.backend.deploy.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 部署方式枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum DeployTypeEnum {
|
||||
|
||||
K8S("Kubernetes集群部署"),
|
||||
DOCKER("Docker容器部署"),
|
||||
VM("虚拟机部署");
|
||||
|
||||
private final String description;
|
||||
|
||||
DeployTypeEnum(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
@ -607,21 +607,23 @@ CREATE TABLE deploy_application
|
||||
CREATE TABLE deploy_environment
|
||||
(
|
||||
-- 业务字段
|
||||
tenant_code VARCHAR(50) NOT NULL COMMENT '租户编码',
|
||||
project_id BIGINT NOT NULL COMMENT '项目ID',
|
||||
env_code VARCHAR(50) NOT NULL COMMENT '环境编码',
|
||||
env_name VARCHAR(100) NOT NULL COMMENT '环境名称',
|
||||
env_desc VARCHAR(255) NULL COMMENT '环境描述',
|
||||
sort INT NOT NULL DEFAULT 0 COMMENT '排序号',
|
||||
tenant_code VARCHAR(50) DEFAULT NULL COMMENT '租户编码',
|
||||
build_type VARCHAR(50) NULL COMMENT '构建方式:JENKINS-Jenkins构建,GITLAB_RUNNER-GitLab Runner构建,GITHUB_ACTION-GitHub Action构建',
|
||||
deploy_type VARCHAR(50) NULL COMMENT '部署方式:K8S-Kubernetes集群部署,DOCKER-Docker容器部署,VM-虚拟机部署',
|
||||
project_id BIGINT NOT NULL COMMENT '项目ID',
|
||||
env_code VARCHAR(50) NOT NULL COMMENT '环境编码',
|
||||
env_name VARCHAR(100) NOT NULL COMMENT '环境名称',
|
||||
env_desc VARCHAR(255) NULL COMMENT '环境描述',
|
||||
sort INT NOT NULL DEFAULT 0 COMMENT '排序号',
|
||||
|
||||
-- 基础字段
|
||||
id BIGINT AUTO_INCREMENT PRIMARY KEY COMMENT '主键ID',
|
||||
create_by VARCHAR(100) NULL COMMENT '创建人',
|
||||
create_time DATETIME(6) NULL COMMENT '创建时间',
|
||||
update_by VARCHAR(100) NULL COMMENT '更新人',
|
||||
update_time DATETIME(6) NULL COMMENT '更新时间',
|
||||
version INT NOT NULL DEFAULT 1 COMMENT '版本号',
|
||||
deleted BIT NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
-- 基础字段
|
||||
id BIGINT AUTO_INCREMENT PRIMARY KEY COMMENT '主键ID',
|
||||
create_by VARCHAR(100) NULL COMMENT '创建人',
|
||||
create_time DATETIME(6) NULL COMMENT '创建时间',
|
||||
update_by VARCHAR(100) NULL COMMENT '更新人',
|
||||
update_time DATETIME(6) NULL COMMENT '更新时间',
|
||||
version INT NOT NULL DEFAULT 1 COMMENT '版本号',
|
||||
deleted BIT NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
|
||||
-- 索引
|
||||
INDEX idx_project_id (project_id) COMMENT '项目ID索引',
|
||||
|
||||
@ -75,14 +75,15 @@ VALUES
|
||||
|
||||
(200, '部署管理', '/deploy', '', 'DeploymentUnitOutlined', 2, 0, 50, FALSE, TRUE, 'system', '2024-01-01 00:00:00', 0, FALSE),
|
||||
|
||||
(201, '项目组管理', '/deploy/project', '/src/pages/Deploy/Project/List/index', 'ProjectOutlined', 2, 200, 1, FALSE, TRUE, 'system', '2024-01-01 00:00:00', 0, FALSE),
|
||||
(201, '环境管理', '/deploy/environments', '/src/pages/Deploy/Environment/List/index', 'CloudOutlined', 2, 200, 3, FALSE, TRUE, 'system', '2024-01-01 00:00:00', 0, FALSE),
|
||||
|
||||
(202, '应用管理', '/deploy/application', '/src/pages/Deploy/Application/List/index', 'AppstoreOutlined', 2, 200, 2, FALSE, TRUE, 'system', '2024-01-01 00:00:00', 0, FALSE),
|
||||
(203, '项目组管理', '/deploy/projects', '/src/pages/Deploy/Project/List/index', 'ProjectOutlined', 2, 200, 1, FALSE, TRUE, 'system', '2024-01-01 00:00:00', 0, FALSE),
|
||||
|
||||
(202, '应用管理', '/deploy/applications', '/src/pages/Deploy/Application/List/index', 'AppstoreOutlined', 2, 200, 2, FALSE, TRUE, 'system', '2024-01-01 00:00:00', 0, FALSE);
|
||||
|
||||
(203, '环境管理', '/deploy/environment', '/src/pages/Deploy/Environment/List/index', 'CloudOutlined', 2, 200, 3, FALSE, TRUE, 'system', '2024-01-01 00:00:00', 0, FALSE);
|
||||
-- 初始化角色数据
|
||||
INSERT INTO sys_role (id, create_time, code, name, type, description, sort)
|
||||
VALUES
|
||||
VALUES
|
||||
(1, NOW(), 'SUPER_ADMIN', '超级管理员', 1, '系统超级管理员,拥有所有权限', 1),
|
||||
(2, NOW(), 'SYSTEM_ADMIN', '系统管理员', 1, '系统管理员,拥有大部分系统管理权限', 2),
|
||||
(3, NOW(), 'COMMON_USER', '普通用户', 2, '普通用,仅拥有基本操作权限', 3);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user