大声道撒旦
This commit is contained in:
parent
dab7eb177d
commit
9441d2a7a5
@ -44,15 +44,6 @@ public class ExternalSystemApiController extends BaseController<ExternalSystem,
|
|||||||
return Response.success(externalSystemService.testConnection(id));
|
return Response.success(externalSystemService.testConnection(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "同步数据")
|
|
||||||
@PostMapping("/{id}/sync")
|
|
||||||
public Response<Void> syncData(
|
|
||||||
@Parameter(description = "系统ID", required = true) @PathVariable Long id
|
|
||||||
) {
|
|
||||||
externalSystemService.syncData(id);
|
|
||||||
return Response.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "更新状态")
|
@Operation(summary = "更新状态")
|
||||||
@PutMapping("/{id}/status")
|
@PutMapping("/{id}/status")
|
||||||
public Response<Void> updateStatus(
|
public Response<Void> updateStatus(
|
||||||
|
|||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.qqchen.deploy.backend.deploy.api;
|
||||||
|
|
||||||
|
import com.qqchen.deploy.backend.framework.controller.BaseController;
|
||||||
|
import com.qqchen.deploy.backend.deploy.entity.RepositoryGroup;
|
||||||
|
import com.qqchen.deploy.backend.deploy.dto.RepositoryGroupDTO;
|
||||||
|
import com.qqchen.deploy.backend.deploy.query.RepositoryGroupQuery;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GIT分组 Controller
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/v1/repo-group")
|
||||||
|
@Tag(name = "GIT分组管理", description = "GIT分组管理相关接口")
|
||||||
|
public class RepositoryGroupApiController extends BaseController<RepositoryGroup, RepositoryGroupDTO, Long, RepositoryGroupQuery> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void exportData(HttpServletResponse response, List<RepositoryGroupDTO> data) {
|
||||||
|
// TODO: 实现导出逻辑
|
||||||
|
log.info("导出GIT分组数据,数据量:{}", data.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.qqchen.deploy.backend.deploy.converter;
|
||||||
|
|
||||||
|
import com.qqchen.deploy.backend.framework.converter.BaseConverter;
|
||||||
|
import com.qqchen.deploy.backend.deploy.entity.RepositoryGroup;
|
||||||
|
import com.qqchen.deploy.backend.deploy.dto.RepositoryGroupDTO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GIT分组 Converter
|
||||||
|
*/
|
||||||
|
@Mapper(config = BaseConverter.class)
|
||||||
|
public interface RepositoryGroupConverter extends BaseConverter<RepositoryGroup, RepositoryGroupDTO> {
|
||||||
|
}
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
package com.qqchen.deploy.backend.deploy.dto;
|
||||||
|
|
||||||
|
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GIT分组 DTO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class RepositoryGroupDTO extends BaseDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库组名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库组描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外部系统中的组ID
|
||||||
|
*/
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级仓库组ID
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库组路径
|
||||||
|
*/
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外部系统ID
|
||||||
|
*/
|
||||||
|
private Long externalSystemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像URL
|
||||||
|
*/
|
||||||
|
private String avatarUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网页URL
|
||||||
|
*/
|
||||||
|
private String webUrl;
|
||||||
|
|
||||||
|
private String visibility;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
private Boolean enabled;
|
||||||
|
|
||||||
|
}
|
||||||
@ -12,46 +12,47 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@jakarta.persistence.Entity
|
@jakarta.persistence.Entity
|
||||||
@Table(name = "deploy_repository_branch")
|
@Table(name = "deploy_repo_branch")
|
||||||
@LogicDelete
|
@LogicDelete
|
||||||
public class RepositoryBranch extends Entity<Long> {
|
public class RepositoryBranch extends Entity<Long> {
|
||||||
|
|
||||||
@Column(name = "external_system_id")
|
|
||||||
private Long externalSystemId;
|
|
||||||
|
|
||||||
@Column(name = "project_id", nullable = false)
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Column(name = "commit_id")
|
@Column(name = "commit_id")
|
||||||
private String commitId;
|
private String commitId;
|
||||||
|
|
||||||
@Column(name = "commit_message", columnDefinition = "TEXT")
|
@Column(name = "commit_message", columnDefinition = "TEXT")
|
||||||
private String commitMessage;
|
private String commitMessage;
|
||||||
|
|
||||||
@Column(name = "commit_author")
|
@Column(name = "commit_author")
|
||||||
private String commitAuthor;
|
private String commitAuthor;
|
||||||
|
|
||||||
@Column(name = "commit_date")
|
@Column(name = "commit_date")
|
||||||
private LocalDateTime commitDate;
|
private LocalDateTime commitDate;
|
||||||
|
|
||||||
@Column(name = "is_protected")
|
@Column(name = "is_protected")
|
||||||
private Boolean isProtected = false;
|
private Boolean isProtected = false;
|
||||||
|
|
||||||
@Column(name = "developers_can_push")
|
@Column(name = "developers_can_push")
|
||||||
private Boolean developersCanPush = true;
|
private Boolean developersCanPush = true;
|
||||||
|
|
||||||
@Column(name = "developers_can_merge")
|
@Column(name = "developers_can_merge")
|
||||||
private Boolean developersCanMerge = true;
|
private Boolean developersCanMerge = true;
|
||||||
|
|
||||||
@Column(name = "can_push")
|
@Column(name = "can_push")
|
||||||
private Boolean canPush = true;
|
private Boolean canPush = true;
|
||||||
|
|
||||||
@Column(name = "is_default_branch")
|
@Column(name = "is_default_branch")
|
||||||
private Boolean isDefaultBranch = false;
|
private Boolean isDefaultBranch = false;
|
||||||
|
|
||||||
@Column(name = "web_url")
|
@Column(name = "web_url")
|
||||||
private String webUrl;
|
private String webUrl;
|
||||||
}
|
|
||||||
|
@Column(name = "project_id", nullable = false)
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
@Column(name = "external_system_id")
|
||||||
|
private Long externalSystemId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -19,34 +19,27 @@ import lombok.EqualsAndHashCode;
|
|||||||
@Table(name = "deploy_repo_group")
|
@Table(name = "deploy_repo_group")
|
||||||
@LogicDelete
|
@LogicDelete
|
||||||
public class RepositoryGroup extends Entity<Long> {
|
public class RepositoryGroup extends Entity<Long> {
|
||||||
|
|
||||||
@Column(name = "external_system_id")
|
|
||||||
private Long externalSystemId;
|
|
||||||
|
|
||||||
@Column(name = "group_id", nullable = false)
|
|
||||||
private Long groupId;
|
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
private String visibility;
|
private String visibility;
|
||||||
|
|
||||||
@Column(name = "parent_id")
|
@Column(name = "parent_id")
|
||||||
private Long parentId;
|
private Long parentId;
|
||||||
|
|
||||||
@Column(name = "web_url")
|
@Column(name = "web_url")
|
||||||
private String webUrl;
|
private String webUrl;
|
||||||
|
|
||||||
@Column(name = "avatar_url")
|
@Column(name = "avatar_url")
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(name = "external_system_id")
|
||||||
private Boolean enabled = true;
|
private Long externalSystemId;
|
||||||
|
|
||||||
private Integer sort = 0;
|
}
|
||||||
}
|
|
||||||
@ -12,46 +12,42 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@jakarta.persistence.Entity
|
@jakarta.persistence.Entity
|
||||||
@Table(name = "deploy_repository_project")
|
@Table(name = "deploy_repo_project")
|
||||||
@LogicDelete
|
@LogicDelete
|
||||||
public class RepositoryProject extends Entity<Long> {
|
public class RepositoryProject extends Entity<Long> {
|
||||||
|
|
||||||
@Column(name = "external_system_id")
|
|
||||||
private Long externalSystemId;
|
|
||||||
|
|
||||||
@Column(name = "project_id", nullable = false)
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
private String visibility;
|
private String visibility;
|
||||||
|
|
||||||
@Column(name = "group_id")
|
@Column(name = "group_id")
|
||||||
private Long groupId;
|
private Long groupId;
|
||||||
|
|
||||||
@Column(name = "is_default_branch")
|
@Column(name = "is_default_branch")
|
||||||
private String isDefaultBranch;
|
private String isDefaultBranch;
|
||||||
|
|
||||||
@Column(name = "web_url")
|
@Column(name = "web_url")
|
||||||
private String webUrl;
|
private String webUrl;
|
||||||
|
|
||||||
@Column(name = "ssh_url")
|
@Column(name = "ssh_url")
|
||||||
private String sshUrl;
|
private String sshUrl;
|
||||||
|
|
||||||
@Column(name = "http_url")
|
@Column(name = "http_url")
|
||||||
private String httpUrl;
|
private String httpUrl;
|
||||||
|
|
||||||
@Column(name = "last_activity_at")
|
@Column(name = "last_activity_at")
|
||||||
private LocalDateTime lastActivityAt;
|
private LocalDateTime lastActivityAt;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(name = "external_system_id")
|
||||||
private Boolean enabled = true;
|
private Long externalSystemId;
|
||||||
|
|
||||||
private Integer sort = 0;
|
@Column(name = "project_id", nullable = false)
|
||||||
|
private Long projectId;
|
||||||
}
|
}
|
||||||
@ -14,7 +14,7 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@jakarta.persistence.Entity
|
@jakarta.persistence.Entity
|
||||||
@Table(name = "deploy_repository_sync_history")
|
@Table(name = "deploy_repo_sync_history")
|
||||||
@LogicDelete
|
@LogicDelete
|
||||||
public class RepositorySyncHistory extends Entity<Long> {
|
public class RepositorySyncHistory extends Entity<Long> {
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,83 @@
|
|||||||
|
package com.qqchen.deploy.backend.deploy.query;
|
||||||
|
|
||||||
|
import com.qqchen.deploy.backend.framework.annotation.QueryField;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GIT分组查询对象
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class RepositoryGroupQuery extends BaseQuery {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库组名
|
||||||
|
*/
|
||||||
|
@QueryField(field = "name", type = QueryType.LIKE)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库组描述
|
||||||
|
*/
|
||||||
|
@QueryField(field = "description", type = QueryType.LIKE)
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外部系统中的组ID
|
||||||
|
*/
|
||||||
|
@QueryField(field = "group_id")
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级仓库组ID
|
||||||
|
*/
|
||||||
|
@QueryField(field = "parent_id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库组路径
|
||||||
|
*/
|
||||||
|
@QueryField(field = "path", type = QueryType.LIKE)
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外部系统ID
|
||||||
|
*/
|
||||||
|
@QueryField(field = "external_system_id")
|
||||||
|
private Long externalSystemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像URL
|
||||||
|
*/
|
||||||
|
@QueryField(field = "avatar_url", type = QueryType.LIKE)
|
||||||
|
private String avatarUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网页URL
|
||||||
|
*/
|
||||||
|
@QueryField(field = "web_url", type = QueryType.LIKE)
|
||||||
|
private String webUrl;
|
||||||
|
|
||||||
|
@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);
|
||||||
|
|
||||||
|
}
|
||||||
@ -2,21 +2,11 @@ package com.qqchen.deploy.backend.deploy.repository;
|
|||||||
|
|
||||||
import com.qqchen.deploy.backend.framework.repository.IBaseRepository;
|
import com.qqchen.deploy.backend.framework.repository.IBaseRepository;
|
||||||
import com.qqchen.deploy.backend.deploy.entity.RepositoryGroup;
|
import com.qqchen.deploy.backend.deploy.entity.RepositoryGroup;
|
||||||
import org.springframework.data.jpa.repository.Modifying;
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GIT分组 Repository
|
||||||
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface IRepositoryGroupRepository extends IBaseRepository<RepositoryGroup, Long> {
|
public interface IRepositoryGroupRepository extends IBaseRepository<RepositoryGroup, Long> {
|
||||||
|
|
||||||
@Modifying
|
|
||||||
@Transactional
|
|
||||||
void deleteByExternalSystemId(Long externalSystemId);
|
|
||||||
|
|
||||||
Optional<RepositoryGroup> findByExternalSystemIdAndGroupId(Long externalSystemId, Long groupId);
|
|
||||||
|
|
||||||
List<RepositoryGroup> findByExternalSystemIdAndDeletedFalseOrderBySortAsc(Long externalSystemId);
|
|
||||||
}
|
}
|
||||||
@ -15,13 +15,7 @@ public interface IExternalSystemService extends IBaseService<ExternalSystem, Ext
|
|||||||
*/
|
*/
|
||||||
boolean testConnection(Long id);
|
boolean testConnection(Long id);
|
||||||
|
|
||||||
/**
|
|
||||||
* 同步系统数据
|
|
||||||
*
|
|
||||||
* @param id 系统ID
|
|
||||||
*/
|
|
||||||
void syncData(Long id);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启用/禁用系统
|
* 启用/禁用系统
|
||||||
*
|
*
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.qqchen.deploy.backend.deploy.service;
|
||||||
|
|
||||||
|
import com.qqchen.deploy.backend.framework.service.IBaseService;
|
||||||
|
import com.qqchen.deploy.backend.deploy.entity.RepositoryGroup;
|
||||||
|
import com.qqchen.deploy.backend.deploy.dto.RepositoryGroupDTO;
|
||||||
|
import com.qqchen.deploy.backend.deploy.query.RepositoryGroupQuery;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GIT分组 Service接口
|
||||||
|
*/
|
||||||
|
public interface IRepositoryGroupService extends IBaseService<RepositoryGroup, RepositoryGroupDTO, RepositoryGroupQuery, Long> {
|
||||||
|
}
|
||||||
@ -121,36 +121,6 @@ public class ExternalSystemServiceImpl extends BaseServiceImpl<ExternalSystem, E
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public void syncData(Long id) {
|
|
||||||
ExternalSystem system = findEntityById(id);
|
|
||||||
if (!system.getEnabled()) {
|
|
||||||
throw new BusinessException(ResponseCode.EXTERNAL_SYSTEM_DISABLED);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
system.setSyncStatus(ExternalSystemSyncStatusEnum.RUNNING);
|
|
||||||
externalSystemRepository.save(system);
|
|
||||||
|
|
||||||
// TODO: 根据不同的系统类型调用不同的同步方法
|
|
||||||
switch (system.getType()) {
|
|
||||||
case JENKINS -> syncJenkinsData(system);
|
|
||||||
case GIT -> syncGitData(system);
|
|
||||||
case ZENTAO -> syncZentaoData(system);
|
|
||||||
}
|
|
||||||
|
|
||||||
system.setSyncStatus(ExternalSystemSyncStatusEnum.SUCCESS);
|
|
||||||
system.setLastSyncTime(LocalDateTime.now());
|
|
||||||
} catch (Exception e) {
|
|
||||||
system.setSyncStatus(ExternalSystemSyncStatusEnum.FAILED);
|
|
||||||
log.error("Sync data failed for external system: {}", system.getName(), e);
|
|
||||||
throw new BusinessException(ResponseCode.EXTERNAL_SYSTEM_SYNC_FAILED);
|
|
||||||
} finally {
|
|
||||||
externalSystemRepository.save(system);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updateStatus(Long id, boolean enabled) {
|
public void updateStatus(Long id, boolean enabled) {
|
||||||
@ -159,29 +129,4 @@ public class ExternalSystemServiceImpl extends BaseServiceImpl<ExternalSystem, E
|
|||||||
externalSystemRepository.save(system);
|
externalSystemRepository.save(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 私有辅助方法,后续实现具体的连接测试逻辑
|
}
|
||||||
private void testJenkinsConnection(ExternalSystem system) {
|
|
||||||
// TODO: 实现Jenkins连接测试
|
|
||||||
}
|
|
||||||
|
|
||||||
private void testGitConnection(ExternalSystem system) {
|
|
||||||
// TODO: 实现Git连接测试
|
|
||||||
}
|
|
||||||
|
|
||||||
private void testZentaoConnection(ExternalSystem system) {
|
|
||||||
// TODO: 实现禅道连接测试
|
|
||||||
}
|
|
||||||
|
|
||||||
// 私有辅助方法,后续实现具体的数据同步逻辑
|
|
||||||
private void syncJenkinsData(ExternalSystem system) {
|
|
||||||
// TODO: 实现Jenkins数据同步
|
|
||||||
}
|
|
||||||
|
|
||||||
private void syncGitData(ExternalSystem system) {
|
|
||||||
// TODO: 实现Git数据同步
|
|
||||||
}
|
|
||||||
|
|
||||||
private void syncZentaoData(ExternalSystem system) {
|
|
||||||
// TODO: 实现禅道数据同步
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.qqchen.deploy.backend.deploy.service.impl;
|
||||||
|
|
||||||
|
import com.qqchen.deploy.backend.framework.service.impl.BaseServiceImpl;
|
||||||
|
import com.qqchen.deploy.backend.deploy.entity.RepositoryGroup;
|
||||||
|
import com.qqchen.deploy.backend.deploy.dto.RepositoryGroupDTO;
|
||||||
|
import com.qqchen.deploy.backend.deploy.query.RepositoryGroupQuery;
|
||||||
|
import com.qqchen.deploy.backend.deploy.service.IRepositoryGroupService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GIT分组 Service实现
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class RepositoryGroupServiceImpl extends BaseServiceImpl<RepositoryGroup, RepositoryGroupDTO, RepositoryGroupQuery, Long>
|
||||||
|
implements IRepositoryGroupService {
|
||||||
|
}
|
||||||
@ -4,7 +4,7 @@ import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 事件节点基础配置
|
* 每次使用基本都是会变的变量
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class BaseDeployNodeFormVariables {
|
public class BaseDeployNodeFormVariables {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 事件节点基础配置
|
* 系统需要使用的变量
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class BaseNodeLocalVariables {
|
public class BaseNodeLocalVariables {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 事件节点基础配置
|
* 节点可配置变量(比如:配置一次就不需要再变)
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class BaseNodePanelVariables {
|
public class BaseNodePanelVariables {
|
||||||
|
|||||||
@ -175,8 +175,7 @@ public class WorkflowInstanceServiceImpl extends BaseServiceImpl<WorkflowInstanc
|
|||||||
@Transactional
|
@Transactional
|
||||||
public WorkflowInstanceDTO startWorkflow(WorkflowInstanceStartRequest request) {
|
public WorkflowInstanceDTO startWorkflow(WorkflowInstanceStartRequest request) {
|
||||||
try {
|
try {
|
||||||
WorkflowDefinition workflowDefinition = workflowDefinitionRepository.findByKey(request.getProcessKey())
|
WorkflowDefinition workflowDefinition = workflowDefinitionRepository.findByKey(request.getProcessKey()).orElseThrow(() -> new RuntimeException("Workflow definition process key not found: " + request.getProcessKey()));
|
||||||
.orElseThrow(() -> new RuntimeException("Workflow definition process key not found: " + request.getProcessKey()));
|
|
||||||
ProcessInstance processInstance = runtimeService.createProcessInstanceBuilder()
|
ProcessInstance processInstance = runtimeService.createProcessInstanceBuilder()
|
||||||
.processDefinitionKey(request.getProcessKey())
|
.processDefinitionKey(request.getProcessKey())
|
||||||
.businessKey(request.getBusinessKey())
|
.businessKey(request.getBusinessKey())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user