增加构建通知
This commit is contained in:
parent
49c65b6886
commit
41c7a88542
@ -34,16 +34,31 @@ public class TeamEnvironmentNotificationConfigDTO extends BaseDTO {
|
|||||||
*/
|
*/
|
||||||
private Boolean deployNotificationEnabled;
|
private Boolean deployNotificationEnabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部署通知模板ID
|
||||||
|
*/
|
||||||
|
private Long deployNotificationTemplateId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否启用构建通知
|
* 是否启用构建通知
|
||||||
*/
|
*/
|
||||||
private Boolean buildNotificationEnabled;
|
private Boolean buildNotificationEnabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建通知模板ID
|
||||||
|
*/
|
||||||
|
private Long buildNotificationTemplateId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建失败时是否发送日志文件到企业微信
|
* 构建失败时是否发送日志文件到企业微信
|
||||||
*/
|
*/
|
||||||
private Boolean buildFailureFileEnabled;
|
private Boolean buildFailureFileEnabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建失败通知模板ID
|
||||||
|
*/
|
||||||
|
private Long buildFailureNotificationTemplateId;
|
||||||
|
|
||||||
// ===== 扩展字段(非数据库字段) =====
|
// ===== 扩展字段(非数据库字段) =====
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -25,18 +25,36 @@ public class UserTeamEnvironmentNotificationConfigDTO {
|
|||||||
@Schema(description = "是否启用部署通知")
|
@Schema(description = "是否启用部署通知")
|
||||||
private Boolean deployNotificationEnabled;
|
private Boolean deployNotificationEnabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部署通知模板ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "部署通知模板ID")
|
||||||
|
private Long deployNotificationTemplateId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否启用构建通知
|
* 是否启用构建通知
|
||||||
*/
|
*/
|
||||||
@Schema(description = "是否启用构建通知")
|
@Schema(description = "是否启用构建通知")
|
||||||
private Boolean buildNotificationEnabled;
|
private Boolean buildNotificationEnabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建通知模板ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "构建通知模板ID")
|
||||||
|
private Long buildNotificationTemplateId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建失败时是否发送日志文件到企业微信
|
* 构建失败时是否发送日志文件到企业微信
|
||||||
*/
|
*/
|
||||||
@Schema(description = "构建失败时是否发送日志文件到企业微信")
|
@Schema(description = "构建失败时是否发送日志文件到企业微信")
|
||||||
private Boolean buildFailureFileEnabled;
|
private Boolean buildFailureFileEnabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建失败通知模板ID
|
||||||
|
*/
|
||||||
|
@Schema(description = "构建失败通知模板ID")
|
||||||
|
private Long buildFailureNotificationTemplateId;
|
||||||
|
|
||||||
// ===== 扩展字段(非数据库字段) =====
|
// ===== 扩展字段(非数据库字段) =====
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -13,14 +13,14 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 团队环境配置实体
|
* 团队环境配置实体
|
||||||
*
|
*
|
||||||
* <p>定义团队对特定环境的配置:
|
* <p>定义团队对特定环境的配置:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>审批配置:是否需要审批、审批人列表</li>
|
* <li>审批配置:是否需要审批、审批人列表</li>
|
||||||
* <li>通知配置:通知渠道、是否启用</li>
|
* <li>通知配置:通知渠道、是否启用</li>
|
||||||
* <li>安全策略:代码审查要求</li>
|
* <li>安全策略:代码审查要求</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* <p>数据迁移说明:
|
* <p>数据迁移说明:
|
||||||
* 本表由 deploy_team_config 重构而来,将原来的 JSON 数组结构展开为标准表结构:
|
* 本表由 deploy_team_config 重构而来,将原来的 JSON 数组结构展开为标准表结构:
|
||||||
* <pre>
|
* <pre>
|
||||||
@ -39,7 +39,7 @@ import java.util.List;
|
|||||||
public class TeamEnvironmentConfig extends Entity<Long> {
|
public class TeamEnvironmentConfig extends Entity<Long> {
|
||||||
|
|
||||||
// ===== 关联关系 =====
|
// ===== 关联关系 =====
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 团队ID
|
* 团队ID
|
||||||
*/
|
*/
|
||||||
@ -53,7 +53,7 @@ public class TeamEnvironmentConfig extends Entity<Long> {
|
|||||||
private Long environmentId;
|
private Long environmentId;
|
||||||
|
|
||||||
// ===== 审批配置 =====
|
// ===== 审批配置 =====
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否需要审批
|
* 是否需要审批
|
||||||
* <p>对应原 TeamConfig.environmentApprovalRequired[i]
|
* <p>对应原 TeamConfig.environmentApprovalRequired[i]
|
||||||
@ -70,23 +70,7 @@ public class TeamEnvironmentConfig extends Entity<Long> {
|
|||||||
@Column(name = "approver_user_ids", columnDefinition = "JSON")
|
@Column(name = "approver_user_ids", columnDefinition = "JSON")
|
||||||
private List<Long> approverUserIds;
|
private List<Long> approverUserIds;
|
||||||
|
|
||||||
// ===== 通知配置 =====
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通知渠道ID
|
|
||||||
* <p>关联 sys_notification_channel 表
|
|
||||||
*/
|
|
||||||
@Column(name = "notification_channel_id")
|
|
||||||
private Long notificationChannelId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否启用部署通知
|
|
||||||
*/
|
|
||||||
@Column(name = "notification_enabled", nullable = false, columnDefinition = "BOOLEAN DEFAULT TRUE")
|
|
||||||
private Boolean notificationEnabled = true;
|
|
||||||
|
|
||||||
// ===== 安全策略 =====
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否要求代码审查通过才能部署
|
* 是否要求代码审查通过才能部署
|
||||||
*/
|
*/
|
||||||
@ -94,7 +78,7 @@ public class TeamEnvironmentConfig extends Entity<Long> {
|
|||||||
private Boolean requireCodeReview = false;
|
private Boolean requireCodeReview = false;
|
||||||
|
|
||||||
// ===== 备注 =====
|
// ===== 备注 =====
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注信息
|
* 备注信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -51,15 +51,33 @@ public class TeamEnvironmentNotificationConfig extends Entity<Long> {
|
|||||||
@Column(name = "deploy_notification_enabled", nullable = false, columnDefinition = "BIT DEFAULT 1")
|
@Column(name = "deploy_notification_enabled", nullable = false, columnDefinition = "BIT DEFAULT 1")
|
||||||
private Boolean deployNotificationEnabled = true;
|
private Boolean deployNotificationEnabled = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部署通知模板ID(关联sys_notification_template)
|
||||||
|
*/
|
||||||
|
@Column(name = "deploy_notification_template_id")
|
||||||
|
private Long deployNotificationTemplateId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否启用构建通知
|
* 是否启用构建通知
|
||||||
*/
|
*/
|
||||||
@Column(name = "build_notification_enabled", nullable = false)
|
@Column(name = "build_notification_enabled", nullable = false)
|
||||||
private Boolean buildNotificationEnabled = false;
|
private Boolean buildNotificationEnabled = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建通知模板ID(关联sys_notification_template)
|
||||||
|
*/
|
||||||
|
@Column(name = "build_notification_template_id")
|
||||||
|
private Long buildNotificationTemplateId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建失败时是否发送日志文件到企业微信
|
* 构建失败时是否发送日志文件到企业微信
|
||||||
*/
|
*/
|
||||||
@Column(name = "build_failure_file_enabled", nullable = false)
|
@Column(name = "build_failure_file_enabled", nullable = false)
|
||||||
private Boolean buildFailureFileEnabled = false;
|
private Boolean buildFailureFileEnabled = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建失败通知模板ID(关联sys_notification_template)
|
||||||
|
*/
|
||||||
|
@Column(name = "build_failure_notification_template_id")
|
||||||
|
private Long buildFailureNotificationTemplateId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -869,13 +869,16 @@ CREATE TABLE deploy_team_environment_notification_config
|
|||||||
version INT NOT NULL DEFAULT 1 COMMENT '版本号',
|
version INT NOT NULL DEFAULT 1 COMMENT '版本号',
|
||||||
deleted BIT NOT NULL DEFAULT 0 COMMENT '是否删除',
|
deleted BIT NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||||
|
|
||||||
team_id BIGINT NOT NULL COMMENT '团队ID',
|
team_id BIGINT NOT NULL COMMENT '团队ID',
|
||||||
environment_id BIGINT NOT NULL COMMENT '环境ID',
|
environment_id BIGINT NOT NULL COMMENT '环境ID',
|
||||||
|
|
||||||
notification_channel_id BIGINT NULL COMMENT '通知渠道ID(关联sys_notification_channel)',
|
notification_channel_id BIGINT NULL COMMENT '通知渠道ID(关联sys_notification_channel)',
|
||||||
deploy_notification_enabled BIT NOT NULL DEFAULT 1 COMMENT '是否启用部署通知',
|
deploy_notification_enabled BIT NOT NULL DEFAULT 1 COMMENT '是否启用部署通知',
|
||||||
build_notification_enabled BIT NOT NULL DEFAULT 0 COMMENT '是否启用构建通知',
|
deploy_notification_template_id BIGINT NULL COMMENT '部署通知模板ID(关联sys_notification_template)',
|
||||||
build_failure_log_enabled BIT NOT NULL DEFAULT 0 COMMENT '构建失败时是否附加错误日志到通知(0:不附加,1:附加)',
|
build_notification_enabled BIT NOT NULL DEFAULT 0 COMMENT '是否启用构建通知',
|
||||||
|
build_notification_template_id BIGINT NULL COMMENT '构建通知模板ID(关联sys_notification_template)',
|
||||||
|
build_failure_log_enabled BIT NOT NULL DEFAULT 0 COMMENT '构建失败时是否附加错误日志到通知(0:不附加,1:附加)',
|
||||||
|
build_failure_notification_template_id BIGINT NULL COMMENT '构建失败通知模板ID(关联sys_notification_template)',
|
||||||
|
|
||||||
UNIQUE INDEX uk_team_env (team_id, environment_id),
|
UNIQUE INDEX uk_team_env (team_id, environment_id),
|
||||||
INDEX idx_team (team_id),
|
INDEX idx_team (team_id),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user