大声道撒旦

This commit is contained in:
dengqichen 2024-12-30 15:54:53 +08:00
parent 9441d2a7a5
commit 725175d069
16 changed files with 61 additions and 65 deletions

View File

@ -5,6 +5,7 @@ import com.qqchen.deploy.backend.framework.enums.QueryType;
import com.qqchen.deploy.backend.framework.query.BaseQuery;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
@ -65,19 +66,5 @@ public class RepositoryGroupQuery extends BaseQuery {
@QueryField(field = "visibility", type = QueryType.LIKE)
private String visibility;
/**
* 排序号
*/
@QueryField(field = "sort")
private Integer sort;
@QueryField(field = "enabled")
private Boolean enabled;
/**
* 外部系统下路径唯一
*/
@QueryField(field = "path)", type = QueryType.LIKE)
private String path);
}

View File

@ -12,11 +12,4 @@ import java.util.Optional;
@Repository
public interface IRepositoryBranchRepository extends IBaseRepository<RepositoryBranch, Long> {
@Modifying
@Transactional
void deleteByExternalSystemId(Long externalSystemId);
Optional<RepositoryBranch> findByExternalSystemIdAndProjectIdAndName(Long externalSystemId, Long projectId, String name);
List<RepositoryBranch> findByExternalSystemIdAndProjectIdAndDeletedFalse(Long externalSystemId, Long projectId);
}

View File

@ -12,11 +12,4 @@ import java.util.Optional;
@Repository
public interface IRepositoryProjectRepository extends IBaseRepository<RepositoryProject, Long> {
@Modifying
@Transactional
void deleteByExternalSystemId(Long externalSystemId);
Optional<RepositoryProject> findByExternalSystemIdAndProjectId(Long externalSystemId, Long projectId);
List<RepositoryProject> findByExternalSystemIdAndGroupIdAndDeletedFalseOrderBySortAsc(Long externalSystemId, Long groupId);
}

View File

@ -9,5 +9,4 @@ import java.util.List;
@Repository
public interface IRepositorySyncHistoryRepository extends IBaseRepository<RepositorySyncHistory, Long> {
List<RepositorySyncHistory> findTop50ByOrderByStartTimeDesc();
}

View File

@ -103,4 +103,9 @@ public @interface SchemaProperty {
* 代码编辑器配置用于配置Monaco Editor等代码编辑器的行为
*/
CodeEditorConfig codeEditor() default @CodeEditorConfig;
/**
* 是否只读
*/
boolean readOnly() default false;
}

View File

@ -23,6 +23,11 @@ import java.util.Optional;
*
* @param <P> Panel变量类型
* @param <L> Local变量类型
* <p>
* <p>
* panelVariables: 节点配置一次配置长期有效
* localVariables: 运行时变量每次执行都会变化
* fromVariables: 表单输入每次执行需要用户填写
*/
@Slf4j
public abstract class BaseNodeDelegate<P, L> implements JavaDelegate {

View File

@ -8,12 +8,5 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class DeployNodeLocalVariables extends BaseNodeLocalVariables {
@SchemaProperty(
title = "委派者",
description = "委派者",
defaultValue = "${deployNodeDelegate}",
required = true
)
private String delegate;
}

View File

@ -8,12 +8,5 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class GatewayNodeLocalVariables extends BaseNodeLocalVariables {
@SchemaProperty(
title = "委派者",
description = "委派者",
defaultValue = "${gatewayNodeDelegate}",
required = true
)
private String delegate;
}

View File

@ -8,12 +8,5 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class NotificationNodeLocalVariables extends BaseNodeLocalVariables {
@SchemaProperty(
title = "委派者",
description = "委派者",
defaultValue = "${notificationNodeDelegate}",
required = true
)
private String delegate;
}

View File

@ -8,12 +8,5 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class ScriptNodeLocalVariables extends BaseNodeLocalVariables {
@SchemaProperty(
title = "委派者",
description = "委派者",
defaultValue = "${shellNodeDelegate}",
required = true
)
private String delegate;
}

View File

@ -9,11 +9,12 @@ import lombok.Data;
@Data
public class BaseNodePanelVariables {
@SchemaProperty(
title = "节点编码",
description = "工作流节点的编码",
required = true,
order = 1
order = 2
)
private String code;
@ -24,7 +25,7 @@ public class BaseNodePanelVariables {
title = "节点名称",
description = "工作流节点的显示名称",
required = true,
order = 2
order = 3
)
private String name;
@ -34,7 +35,7 @@ public class BaseNodePanelVariables {
@SchemaProperty(
title = "节点描述",
description = "工作流节点的详细描述",
order = 3
order = 4
)
private String description;
}

View File

@ -1,5 +1,6 @@
package com.qqchen.deploy.backend.workflow.dto.definition.node.panelVariables;
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -11,4 +12,13 @@ import lombok.EqualsAndHashCode;
public class DeployNodePanelVariables extends BaseNodePanelVariables {
@SchemaProperty(
title = "委派者",
description = "委派者",
defaultValue = "${deployNodeDelegate}",
readOnly = true,
order = 1
)
private String delegate;
}

View File

@ -10,6 +10,15 @@ import java.util.List;
@EqualsAndHashCode(callSuper = true)
public class GatewayNodePanelVariables extends BaseNodePanelVariables {
@SchemaProperty(
title = "委派者",
description = "委派者",
defaultValue = "${gatewayNodeDelegate}",
readOnly = true,
order = 1
)
private String delegate;
@SchemaProperty(
title = "网关类型",
description = "网关类型",
@ -24,7 +33,8 @@ public class GatewayNodePanelVariables extends BaseNodePanelVariables {
"并行网关",
"包容网关"
},
defaultValue = "exclusiveGateway"
defaultValue = "exclusiveGateway",
order = 5
)
private String gatewayType;
}

View File

@ -11,6 +11,15 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class NotificationNodePanelVariables extends BaseNodePanelVariables {
@SchemaProperty(
title = "委派者",
description = "委派者",
defaultValue = "${notificationNodeDelegate}",
required = true,
readOnly = true,
order = 1
)
private String delegate;
@SchemaProperty(
title = "测试输出",

View File

@ -14,6 +14,15 @@ import java.util.List;
@EqualsAndHashCode(callSuper = true)
public class ScriptNodePanelVariables extends BaseNodePanelVariables {
@SchemaProperty(
title = "委派者",
description = "委派者",
defaultValue = "${shellNodeDelegate}",
required = true,
readOnly = true,
order = 1
)
private String delegate;
/**
* 脚本语言

View File

@ -61,6 +61,9 @@ public class GenerateSchemaUtils {
if (!annotation.description().isEmpty()) {
property.put("description", annotation.description());
}
if (annotation.readOnly()) {
property.put("readOnly", true);
}
if (!annotation.format().isEmpty()) {
property.put("format", annotation.format());