大声道撒旦

This commit is contained in:
dengqichen 2025-01-08 15:37:54 +08:00
parent 2c7aff7ba1
commit b49c21942a
4 changed files with 8 additions and 31 deletions

View File

@ -1,7 +1,7 @@
package com.qqchen.deploy.backend.deploy.api;
import com.qqchen.deploy.backend.deploy.dto.GitInstanceDTO;
import com.qqchen.deploy.backend.deploy.service.IGitManagerService;
import com.qqchen.deploy.backend.deploy.service.IRepositoryManagerService;
import com.qqchen.deploy.backend.framework.api.Response;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
public class RepositoryManagerApiController {
@Resource
private IGitManagerService gitManagerService;
private IRepositoryManagerService gitManagerService;
@Operation(summary = "同步Git仓库组", description = "同步指定外部系统的所有仓库组")
@PostMapping("/{externalSystemId}/sync-groups")
@ -32,7 +32,7 @@ public class RepositoryManagerApiController {
}
@Operation(summary = "同步Git项目", description = "同步指定外部系统下指定仓库组的所有项目")
@PostMapping("/{externalSystemId}/groups/{groupId}/sync-projects")
@PostMapping("/{externalSystemId}/groups/sync-projects")
public Response<Void> syncProjects(
@Parameter(description = "外部系统ID", required = true) @PathVariable Long externalSystemId
) {
@ -41,7 +41,7 @@ public class RepositoryManagerApiController {
}
@Operation(summary = "同步Git分支", description = "同步指定外部系统下指定项目的所有分支")
@PostMapping("/{externalSystemId}/projects/{projectId}/sync-branches")
@PostMapping("/{externalSystemId}/projects/sync-branches")
public Response<Void> syncBranches(
@Parameter(description = "外部系统ID", required = true) @PathVariable Long externalSystemId
) {

View File

@ -5,7 +5,7 @@ import com.qqchen.deploy.backend.deploy.dto.GitInstanceDTO;
/**
* Git管理服务接口
*/
public interface IGitManagerService {
public interface IRepositoryManagerService {
/**
* 同步Git组

View File

@ -20,14 +20,13 @@ import java.util.List;
import static com.qqchen.deploy.backend.framework.enums.ResponseCode.REPOSITORY_BRANCH_SYNC_FAILED;
import static com.qqchen.deploy.backend.framework.enums.ResponseCode.REPOSITORY_PROJECT_SYNC_FAILED;
import static com.qqchen.deploy.backend.framework.enums.ResponseCode.REPOSITORY_SYNC_FAILED;
/**
* Git管理服务实现
*/
@Slf4j
@Service
public class GitManagerServiceImpl implements IGitManagerService {
public class RepositoryManagerServiceImpl implements IRepositoryManagerService {
@Resource
private IRepositoryGroupService repositoryGroupService;

View File

@ -328,19 +328,8 @@ CREATE TABLE deploy_repo_project
ssh_url VARCHAR(255) NULL COMMENT 'SSH克隆地址',
web_url VARCHAR(255) NULL COMMENT '网页URL',
last_activity_at DATETIME(6) NULL COMMENT '最后活动时间',
sort INT DEFAULT 0 COMMENT '排序号',
sort INT DEFAULT 0 COMMENT '排序号'
-- 索引
INDEX idx_external_system_project_id (external_system_id, project_id) COMMENT '外部系统项目ID索引',
INDEX idx_group_id (group_id) COMMENT '组ID索引',
INDEX idx_path ( PATH) COMMENT '路径索引',
UNIQUE INDEX uk_external_system_project_path (external_system_id, PATH) COMMENT '外部系统下路径唯一',
-- 外键约束
CONSTRAINT fk_project_group FOREIGN KEY (group_id)
REFERENCES deploy_repo_group (id),
CONSTRAINT fk_project_external_system FOREIGN KEY (external_system_id)
REFERENCES sys_external_system (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代码仓库项目表';
-- 代码仓库分支表
@ -368,19 +357,8 @@ CREATE TABLE deploy_repo_branch
commit_message TEXT NULL COMMENT '最新提交信息',
commit_author VARCHAR(100) NULL COMMENT '最新提交作者',
commit_date DATETIME(6) NULL COMMENT '最新提交时间',
web_url VARCHAR(255) NULL COMMENT '网页URL',
web_url VARCHAR(255) NULL COMMENT '网页URL'
-- 索引
INDEX idx_project_id (project_id) COMMENT '项目ID索引',
INDEX idx_external_system_id (external_system_id) COMMENT '外部系统ID索引',
INDEX idx_name ( NAME) COMMENT '分支名称索引',
UNIQUE INDEX uk_project_branch_name (project_id, NAME) COMMENT '项目下分支名称唯一',
-- 外键约束
CONSTRAINT fk_branch_project FOREIGN KEY (project_id)
REFERENCES deploy_repo_project (id),
CONSTRAINT fk_branch_external_system FOREIGN KEY (external_system_id)
REFERENCES sys_external_system (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代码仓库分支表';
-- --------------------------------------------------------------------------------------