dao层(一部分)相关,部分有问题的用TODO标记
This commit is contained in:
parent
39a40c23b5
commit
35ab058b90
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/modules/module-ci-process-biz/module-ci-process-biz.iml" filepath="$PROJECT_DIR$/modules/module-ci-process-biz/module-ci-process-biz.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
1468
.idea/mybatisx/templates.xml
generated
Normal file
1468
.idea/mybatisx/templates.xml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,11 +0,0 @@
|
|||||||
package cd.casic.ci.process.process.dal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author by mianbin
|
|
||||||
* @Classname BuildDetailDao
|
|
||||||
* @Description TODO
|
|
||||||
* @Date 2025/4/8 10:14
|
|
||||||
*/
|
|
||||||
public class BuildDetailDao {
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.atom;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineAtomReplaceBaseRecord;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线原子替换基础 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineAtomReplaceBaseDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建原子替换基础记录
|
||||||
|
*
|
||||||
|
* @param baseId 基础ID
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineIdList 流水线ID列表
|
||||||
|
* @param fromAtomCode 源原子代码
|
||||||
|
* @param toAtomCode 目标原子代码
|
||||||
|
* @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void createAtomReplaceBase(
|
||||||
|
@Param("baseId") String baseId,
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineIdList") List<String> pipelineIdList,
|
||||||
|
@Param("fromAtomCode") String fromAtomCode,
|
||||||
|
@Param("toAtomCode") String toAtomCode,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取原子替换基础记录列表
|
||||||
|
*
|
||||||
|
* @param statusList 状态列表
|
||||||
|
* @param descFlag 是否降序
|
||||||
|
* @param page 页码
|
||||||
|
* @param pageSize 每页大小
|
||||||
|
* @return 原子替换基础记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineAtomReplaceBaseRecord> getAtomReplaceBaseList(
|
||||||
|
@Param("statusList") List<String> statusList,
|
||||||
|
@Param("descFlag") boolean descFlag,
|
||||||
|
@Param("page") int page,
|
||||||
|
@Param("pageSize") int pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新原子替换基础记录
|
||||||
|
*
|
||||||
|
* @param baseId 基础ID
|
||||||
|
* @param status 状态
|
||||||
|
* @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void updateAtomReplaceBase(
|
||||||
|
@Param("baseId") String baseId,
|
||||||
|
@Param("status") String status,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.atom;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.process.pojo.PipelineAtomReplaceHistory;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineAtomReplaceHistoryRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线原子替换历史 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineAtomReplaceHistoryDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建原子替换历史
|
||||||
|
*
|
||||||
|
* @param pipelineAtomReplaceHistory 原子替换历史信息
|
||||||
|
*/
|
||||||
|
void createAtomReplaceHistory(
|
||||||
|
@Param("pipelineAtomReplaceHistory") PipelineAtomReplaceHistory pipelineAtomReplaceHistory
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取原子替换历史列表
|
||||||
|
*
|
||||||
|
* @param baseId 基础ID
|
||||||
|
* @param itemId 项ID
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param busType 业务类型
|
||||||
|
* @param statusList 状态列表
|
||||||
|
* @param descFlag 是否降序
|
||||||
|
* @param page 页码
|
||||||
|
* @param pageSize 每页大小
|
||||||
|
* @return 原子替换历史记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineAtomReplaceHistoryRecord> getAtomReplaceHistoryList(
|
||||||
|
@Param("baseId") String baseId,
|
||||||
|
@Param("itemId") String itemId,
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("busType") String busType,
|
||||||
|
@Param("statusList") List<String> statusList,
|
||||||
|
@Param("descFlag") Boolean descFlag,
|
||||||
|
@Param("page") Integer page,
|
||||||
|
@Param("pageSize") Integer pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新原子替换历史
|
||||||
|
*
|
||||||
|
* @param id ID
|
||||||
|
* @param status 状态
|
||||||
|
* @param log 日志
|
||||||
|
* @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void updateAtomReplaceHistory(
|
||||||
|
@Param("id") String id,
|
||||||
|
@Param("status") String status,
|
||||||
|
@Param("log") String log,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.atom;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineAtomReplaceItemRecord;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.pojo.AtomVersionReplaceInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线原子替换项 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineAtomReplaceItemDao {
|
||||||
|
public void createAtomReplaceItem(
|
||||||
|
@Param("baseId") String baseId,
|
||||||
|
@Param("fromAtomCode") String fromAtomCode,
|
||||||
|
@Param("toAtomCode") String toAtomCode,
|
||||||
|
@Param("versionInfoList") List<AtomVersionReplaceInfo> versionInfoList,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
TPipelineAtomReplaceItemRecord getAtomReplaceItemListByBaseId(
|
||||||
|
@Param("baseId") String baseId,
|
||||||
|
@Param("statusList") List<String> statusList,
|
||||||
|
@Param("descFlag") Boolean descFlag,
|
||||||
|
@Param("page") Integer page,
|
||||||
|
@Param("pageSize") Integer pageSize
|
||||||
|
);
|
||||||
|
// TODO 这是一个类似wrapper的拼接条件方法
|
||||||
|
// private fun TPipelineAtomReplaceItem.getAtomReplaceItemListCondition(
|
||||||
|
// baseId: String,
|
||||||
|
// statusList: List<String>?
|
||||||
|
// ): MutableList<Condition>
|
||||||
|
|
||||||
|
Long getAtomReplaceItemCountByBaseId(
|
||||||
|
@Param("baseId") String baseId,
|
||||||
|
@Param("statusList") List<String> statusList
|
||||||
|
);
|
||||||
|
TPipelineAtomReplaceItemRecord getAtomReplaceItem(
|
||||||
|
@Param("itemId") String itemId
|
||||||
|
);
|
||||||
|
int deleteByBaseId(@Param("baseId") String baseId);
|
||||||
|
|
||||||
|
int updateAtomReplaceItemByBaseId(
|
||||||
|
@Param("baseId") String baseId,
|
||||||
|
@Param("status") String status,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
int updateAtomReplaceItemByItemId(
|
||||||
|
@Param("itemId") String itemId,
|
||||||
|
@Param("status") String status,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.audit;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.process.pojo.audit.QueryAudit;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TAuditResourceRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审计记录 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface AuditDao {
|
||||||
|
|
||||||
|
Long create(
|
||||||
|
@Param("resourceType") String resourceType,
|
||||||
|
@Param("resourceId") String resourceId,
|
||||||
|
@Param("resourceName") String resourceName,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("action") String action,
|
||||||
|
@Param("actionContent") String actionContent,
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("id") String id
|
||||||
|
);
|
||||||
|
TAuditResourceRecord listByResourceTye(
|
||||||
|
@Param("queryAudit") QueryAudit queryAudit,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("limit") Integer limit
|
||||||
|
);
|
||||||
|
Long countByResourceTye(@Param("queryAudit")QueryAudit queryAudit);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,121 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.auth;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineRemoteAuthRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线远程认证 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineRemoteAuthDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建远程认证记录
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param authId 认证ID
|
||||||
|
* @param authType 认证类型
|
||||||
|
* @param authContent 认证内容
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 远程认证记录ID
|
||||||
|
*/
|
||||||
|
long create(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("authId") String authId,
|
||||||
|
@Param("authType") String authType,
|
||||||
|
@Param("authContent") String authContent,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新远程认证记录
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param authId 认证ID
|
||||||
|
* @param authType 认证类型
|
||||||
|
* @param authContent 认证内容
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int update(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("authId") String authId,
|
||||||
|
@Param("authType") String authType,
|
||||||
|
@Param("authContent") String authContent,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除远程认证记录
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param authId 认证ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int delete(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("authId") String authId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取远程认证记录列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 远程认证记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineRemoteAuthRecord> list(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取远程认证记录
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param authId 认证ID
|
||||||
|
* @return 远程认证记录
|
||||||
|
*/
|
||||||
|
TPipelineRemoteAuthRecord get(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("authId") String authId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.callback;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.event.PipelineCallbackEvent;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线回调Mapper接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineCallbackDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存流水线回调
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param list 回调事件列表
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int save(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("list") List<PipelineCallbackEvent> list
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线回调列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param event 事件类型
|
||||||
|
* @return 回调记录列表
|
||||||
|
*/
|
||||||
|
// TODO T_PIPELINE_CALLBACK 这个表找不到
|
||||||
|
// Result<TPipelineCallbackRecord> list(
|
||||||
|
// @Param("projectId") String projectId,
|
||||||
|
// @Param("pipelineId") String pipelineId,
|
||||||
|
// @Param("event") String event
|
||||||
|
// );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线回调
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param names 回调名称集合
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int delete(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("names") Set<String> names
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.callback;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TProjectPipelineCallbackRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目流水线回调 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface ProjectPipelineCallbackDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可直接更新或插入
|
||||||
|
*/
|
||||||
|
int save(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("events") String events,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("callbackUrl") String callbackUrl,
|
||||||
|
@Param("secretToken") String secretToken,
|
||||||
|
@Param("id") Long id,
|
||||||
|
@Param("secretParam") String secretParam
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
List<TProjectPipelineCallbackRecord> listProjectCallback(
|
||||||
|
@Param("projectId")String projectId,
|
||||||
|
@Param("events")String events,
|
||||||
|
@Param("enable")Boolean enable
|
||||||
|
);
|
||||||
|
|
||||||
|
List<TProjectPipelineCallbackRecord> listByPage(
|
||||||
|
@Param("projectId")String projectId,
|
||||||
|
@Param("offset")Integer offset,
|
||||||
|
@Param("limit")Integer limit
|
||||||
|
);
|
||||||
|
|
||||||
|
Long countByPage(String projectId);
|
||||||
|
|
||||||
|
TProjectPipelineCallbackRecord get(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("id") Long id
|
||||||
|
);
|
||||||
|
|
||||||
|
int deleteById(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("id") Long id
|
||||||
|
);
|
||||||
|
|
||||||
|
int deleteByProjectId(
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
int disable(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("id") Long id
|
||||||
|
);
|
||||||
|
|
||||||
|
int enable(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("id") Long id
|
||||||
|
);
|
||||||
|
|
||||||
|
List<TProjectPipelineCallbackRecord> getDisableCallbackList(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("url") String url,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("limit") Integer limit
|
||||||
|
);
|
||||||
|
|
||||||
|
int enableByIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("ids") List<Integer>ids
|
||||||
|
);
|
||||||
|
|
||||||
|
int updateFailureTime(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("id") Long id,
|
||||||
|
@Param("failureTime") LocalDateTime failureTime
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.callback;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TProjectPipelineCallbackHistoryRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目流水线回调历史 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface ProjectPipelineCallbackHistoryDao {
|
||||||
|
|
||||||
|
void create(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("callBackUrl") String callBackUrl,
|
||||||
|
@Param("events") String events,
|
||||||
|
@Param("status") String status,
|
||||||
|
@Param("errorMsg") String errorMsg,
|
||||||
|
@Param("requestHeaders") String requestHeaders,
|
||||||
|
@Param("requestBody") String requestBody,
|
||||||
|
@Param("responseCode") Integer responseCode,
|
||||||
|
@Param("responseBody") String responseBody,
|
||||||
|
@Param("startTime") Long startTime,
|
||||||
|
@Param("endTime") Long endTime,
|
||||||
|
@Param("id") Long id
|
||||||
|
);
|
||||||
|
TProjectPipelineCallbackHistoryRecord get(@Param("id") Long id);
|
||||||
|
|
||||||
|
List<TProjectPipelineCallbackHistoryRecord> list(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("callBackUrl") String callBackUrl,
|
||||||
|
@Param("events") String events,
|
||||||
|
@Param("startTime") Long startTime,
|
||||||
|
@Param("endTime") Long endTime,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("limit") Integer limit
|
||||||
|
);
|
||||||
|
|
||||||
|
Long count(
|
||||||
|
String projectId,
|
||||||
|
String callBackUrl,
|
||||||
|
String events,
|
||||||
|
Long startTime,
|
||||||
|
Long endTime
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,130 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.label;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineGroupRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线分组 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineGroupDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param name 分组名称
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return 分组ID
|
||||||
|
*/
|
||||||
|
Long createPipelineGroup(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("id") Long id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新流水线分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param groupId 分组ID
|
||||||
|
* @param name 分组名称
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 是否更新成功
|
||||||
|
*/
|
||||||
|
boolean update(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("groupId") Long groupId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param groupId 分组ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
boolean deletePipelineGroup(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("groupId") Long groupId,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下的所有分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @return 分组记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineGroupRecord> list(
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计项目下的分组数量
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @return 分组数量
|
||||||
|
*/
|
||||||
|
long count(
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计项目下指定名称的分组数量
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param name 分组名称
|
||||||
|
* @return 分组数量
|
||||||
|
*/
|
||||||
|
long countByName(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("name") String name
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID获取分组
|
||||||
|
*
|
||||||
|
* @param id 分组ID
|
||||||
|
* @return 分组记录
|
||||||
|
*/
|
||||||
|
TPipelineGroupRecord get(
|
||||||
|
@Param("id") Long id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID列表获取分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param ids 分组ID集合
|
||||||
|
* @return 分组记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineGroupRecord> listByIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("ids") Set<Long> ids
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下的指定分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param groupId 分组ID
|
||||||
|
* @return 分组记录
|
||||||
|
*/
|
||||||
|
TPipelineGroupRecord get(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("groupId") Long groupId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.label;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.process.pojo.classify.PipelineLabel;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线标签 Mapper 接口
|
||||||
|
*/
|
||||||
|
public interface PipelineLabelDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建标签
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param name 标签名称
|
||||||
|
* @param desc 标签描述
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 标签ID
|
||||||
|
*/
|
||||||
|
long create(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("desc") String desc,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新标签
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param id 标签ID
|
||||||
|
* @param name 标签名称
|
||||||
|
* @param desc 标签描述
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int update(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("id") long id,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("desc") String desc,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标签
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param id 标签ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int delete(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("id") long id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取标签列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @return 标签列表
|
||||||
|
*/
|
||||||
|
List<PipelineLabel> list(
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取标签
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param id 标签ID
|
||||||
|
* @return 标签
|
||||||
|
*/
|
||||||
|
PipelineLabel get(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("id") long id
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,150 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.label;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineLabelPipelineRecord;
|
||||||
|
import cd.casic.ci.process.process.pojo.PipelineLabelRelateInfo;
|
||||||
|
import cn.hutool.core.lang.Pair;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线和标签对应关系Mapper接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineLabelPipelineDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线标签关系
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param labelId 标签ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int create(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("labelId") Long labelId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("id") Long id
|
||||||
|
);
|
||||||
|
/**
|
||||||
|
* 批量创建流水线标签关系
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param pipelineLabelRels 流水线标签关系列表
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int batchCreate(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("pipelineLabelRels") List<Pair<Long, Long>> pipelineLabelRels,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线标签关系
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param id 主键ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int delete(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("id") Long id,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线的所有标签关系
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int deleteByPipeline(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标签的所有流水线关系
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param labelId 标签ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int deleteByLabel(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("labelId") Long labelId,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取标签关联的流水线列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param labelId 标签ID集合
|
||||||
|
* @return 流水线标签关系记录列表
|
||||||
|
*/
|
||||||
|
TPipelineLabelPipelineRecord listPipelines(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("labelId") Set<Long> labelId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线关联的标签列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 流水线标签关系记录列表
|
||||||
|
*/
|
||||||
|
TPipelineLabelPipelineRecord listLabels(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已存在标签关系的流水线ID集合
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineIds 流水线ID集合
|
||||||
|
* @return 流水线ID集合
|
||||||
|
*/
|
||||||
|
Set<String> exitsLabelPipelines(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineIds") Set<String> pipelineIds
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线标签关系列表
|
||||||
|
*
|
||||||
|
* @param pipelineIds 流水线ID集合
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @return 流水线标签关系记录列表
|
||||||
|
*/
|
||||||
|
TPipelineLabelPipelineRecord listPipelineLabelRels(
|
||||||
|
@Param("pipelineIds") List<String> pipelineIds,
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线标签关联信息列表
|
||||||
|
*
|
||||||
|
* @param projectIds 项目ID列表
|
||||||
|
* @return 流水线标签关联信息列表
|
||||||
|
*/
|
||||||
|
List<PipelineLabelRelateInfo> getPipelineLabelRelateInfos(
|
||||||
|
@Param("projectIds") List<String> projectIds
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,362 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.label;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineViewRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线视图Mapper接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineViewDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建视图(基础版)
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param name 视图名称
|
||||||
|
* @param isProject 是否项目视图
|
||||||
|
* @param filterByPipelineName 按流水线名称过滤
|
||||||
|
* @param filterByCreator 按创建者过滤
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param id 视图ID(可选)
|
||||||
|
* @return 创建的视图ID
|
||||||
|
*/
|
||||||
|
Long create(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("isProject") Boolean isProject,
|
||||||
|
@Param("filterByPipelineName") String filterByPipelineName,
|
||||||
|
@Param("filterByCreator") String filterByCreator,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("id") Long id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建视图(高级版)
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param name 视图名称
|
||||||
|
* @param logic 逻辑表达式
|
||||||
|
* @param isProject 是否项目视图
|
||||||
|
* @param filters 过滤器
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param id 视图ID(可选)
|
||||||
|
* @param viewType 视图类型
|
||||||
|
* @return 创建的视图ID
|
||||||
|
*/
|
||||||
|
Long create(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("logic") String logic,
|
||||||
|
@Param("isProject") Boolean isProject,
|
||||||
|
@Param("filters") String filters,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("id") Long id,
|
||||||
|
@Param("viewType") Integer viewType
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新视图(基础版)
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @param name 视图名称
|
||||||
|
* @param isProject 是否项目视图
|
||||||
|
* @param filterByPipelineName 按流水线名称过滤
|
||||||
|
* @param filterByCreator 按创建者过滤
|
||||||
|
* @return 是否更新成功
|
||||||
|
*/
|
||||||
|
Boolean update(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("isProject") Boolean isProject,
|
||||||
|
@Param("filterByPipelineName") String filterByPipelineName,
|
||||||
|
@Param("filterByCreator") String filterByCreator
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新视图(高级版)
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @param name 视图名称
|
||||||
|
* @param logic 逻辑表达式
|
||||||
|
* @param isProject 是否项目视图
|
||||||
|
* @param filters 过滤器
|
||||||
|
* @param viewType 视图类型
|
||||||
|
* @return 是否更新成功
|
||||||
|
*/
|
||||||
|
Boolean update(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("logic") String logic,
|
||||||
|
@Param("isProject") Boolean isProject,
|
||||||
|
@Param("filters") String filters,
|
||||||
|
@Param("viewType") Integer viewType
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除视图
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean delete(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下的所有视图
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord list(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下指定类型的视图
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewType 视图类型
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord list(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewType") Integer viewType
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下指定是否项目视图的列表
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param isProject 是否项目视图
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord list(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("isProject") Boolean isProject
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户创建的视图列表
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord list(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户创建的指定类型视图列表
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param isProject 是否项目视图
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord list(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("isProject") Boolean isProject
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户视图列表(支持多种过滤条件)
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param isProject 是否项目视图(可选)
|
||||||
|
* @param viewType 视图类型(可选)
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewRecord> list(
|
||||||
|
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("isProject") Boolean isProject,
|
||||||
|
@Param("viewType") Integer viewType
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定ID的视图列表
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID(可选)
|
||||||
|
* @param viewIds 视图ID集合
|
||||||
|
* @param viewType 视图类型(可选)
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord list(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewIds") Collection<Long> viewIds,
|
||||||
|
@Param("viewType") Integer viewType
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页获取视图列表
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param isProject 是否项目视图
|
||||||
|
* @param viewName 视图名称(可选)
|
||||||
|
* @param limit 每页数量
|
||||||
|
* @param offset 偏移量
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord listByPage(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("isProject") Boolean isProject,
|
||||||
|
@Param("viewName") String viewName,
|
||||||
|
@Param("limit") Integer limit,
|
||||||
|
@Param("offset") Integer offset
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有项目或用户视图
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param isProject 是否项目视图
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord listAll(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("isProject") Boolean isProject,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取动态项目ID列表
|
||||||
|
*
|
||||||
|
|
||||||
|
* @return 项目ID列表
|
||||||
|
*/
|
||||||
|
List<String> listDynamicProjectId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目的动态视图列表
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord listDynamicViewByProjectId(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目或用户视图列表
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param isProject 是否项目视图
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 视图记录列表
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord listProjectOrUser(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("isProject") Boolean isProject,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定视图
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @return 视图记录
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord get(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户创建的指定视图
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @return 视图记录
|
||||||
|
*/
|
||||||
|
TPipelineViewRecord get(
|
||||||
|
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计同名视图数量
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param name 视图名称
|
||||||
|
* @param creator 创建者(可选)
|
||||||
|
* @param isProject 是否项目视图
|
||||||
|
* @param excludeIds 排除的ID集合
|
||||||
|
* @return 数量
|
||||||
|
*/
|
||||||
|
Integer countByName(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("creator") String creator,
|
||||||
|
@Param("isProject") Boolean isProject,
|
||||||
|
@Param("excludeIds") Collection<Long> excludeIds
|
||||||
|
);
|
||||||
|
TPipelineViewRecord fetchAnyByName(
|
||||||
|
String projectId,
|
||||||
|
String name,
|
||||||
|
Boolean isProject
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Integer countForLimit(
|
||||||
|
@Param("projectId")String projectId,
|
||||||
|
@Param("isProject") Boolean isProject,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,216 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.label;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineViewGroupRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线视图分组 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineViewGroupDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建视图分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void create(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取视图分组列表(分页)
|
||||||
|
*
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @param offset 偏移量
|
||||||
|
* @param limit 每页数量
|
||||||
|
* @return 视图分组记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewGroupRecord> list(
|
||||||
|
@Param("viewId") Long viewId,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("limit") Integer limit
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取多个视图的分组列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewIds 视图ID列表
|
||||||
|
* @return 视图分组记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewGroupRecord> listByViewIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewIds") List<Long> viewIds
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定视图的分组列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @return 视图分组记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewGroupRecord> listByViewId(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下的所有视图分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @return 视图分组记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewGroupRecord> listByProjectId(
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线所属的视图分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 视图分组记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewGroupRecord> listByPipelineId(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线所属的视图ID列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 视图ID列表
|
||||||
|
*/
|
||||||
|
List<Long> listViewIdListByPipelineId(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取视图包含的流水线ID列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @return 流水线ID列表
|
||||||
|
*/
|
||||||
|
List<String> listPipelineIdByViewId(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取多个流水线所属的视图分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineIds 流水线ID集合
|
||||||
|
* @return 视图分组记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewGroupRecord> listByPipelineIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineIds") Collection<String> pipelineIds
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计流水线所属的视图分组数量
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 数量
|
||||||
|
*/
|
||||||
|
Integer countByPipelineId(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移除视图分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
*/
|
||||||
|
void remove(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移除视图的所有分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
*/
|
||||||
|
void remove(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量移除视图分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewId 视图ID
|
||||||
|
* @param pipelineIds 流水线ID列表
|
||||||
|
*/
|
||||||
|
void batchRemove(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewId") Long viewId,
|
||||||
|
@Param("pipelineIds") List<String> pipelineIds
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计多个视图的分组数量
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewIds 视图ID集合
|
||||||
|
* @param filterPipelineIds 过滤的流水线ID列表(可选)
|
||||||
|
* @return 视图ID到数量的映射
|
||||||
|
*/
|
||||||
|
Map<Long, Integer> countByViewId(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewIds") Collection<Long> viewIds,
|
||||||
|
@Param("filterPipelineIds") List<String> filterPipelineIds
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取不重复的流水线ID列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param viewIds 视图ID集合
|
||||||
|
* @return 流水线ID列表
|
||||||
|
*/
|
||||||
|
List<String> distinctPipelineIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("viewIds") Collection<Long> viewIds
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线的视图分组
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
boolean delete(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.label;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineViewTopRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线视图置顶Mapper接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineViewTopDao {
|
||||||
|
/**
|
||||||
|
* 添加视图置顶 * * @param projectId 项目ID * @param viewId 视图ID * @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void add(@Param("projectId") String projectId, @Param("viewId") Long viewId, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移除视图置顶 * * @param projectId 项目ID * @param viewId 视图ID * @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void remove(@Param("projectId") String projectId, @Param("viewId") Long viewId, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户的置顶视图列<EFBFBD>? * * @param projectId 项目ID * @param userId 用户ID * @return 置顶视图记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewTopRecord> list(@Param("projectId") String projectId, @Param("userId") String userId);
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
# DAO与Mapper包名映射关系
|
||||||
|
|
||||||
|
## 1. audit模块
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.audit.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.audit
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2. report模块
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.report.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.report
|
||||||
|
```
|
||||||
|
|
||||||
|
## 3. pipeline模块
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.pipeline.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.pipeline
|
||||||
|
```
|
||||||
|
|
||||||
|
## 4. template模块
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.template.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.template
|
||||||
|
```
|
||||||
|
|
||||||
|
## 5. view模块
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.view.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.view
|
||||||
|
```
|
||||||
|
|
||||||
|
## 6. label模块
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.label.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.label
|
||||||
|
```
|
||||||
|
|
||||||
|
## 7. record模块
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.record.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.record
|
||||||
|
```
|
||||||
|
|
||||||
|
## 8. trigger模块
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.trigger.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.trigger
|
||||||
|
```
|
||||||
|
|
||||||
|
## 9. atom模块
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.atom.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.atom
|
||||||
|
```
|
||||||
|
|
||||||
|
## 10. auth模块
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.auth.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.auth
|
||||||
|
```
|
||||||
|
|
||||||
|
## 包名映射规律
|
||||||
|
1. 基础包名相同:`com.tencent.devops.process`
|
||||||
|
2. 模块名相同:如`pipeline`、`template`等
|
||||||
|
3. 后缀不同:
|
||||||
|
- DAO包:`.dao`
|
||||||
|
- Mapper包:`.dal.mapper`
|
||||||
|
4. 完整映射模式:
|
||||||
|
```kotlin
|
||||||
|
com.tencent.devops.process.{module}.dao
|
||||||
|
↓
|
||||||
|
com.tencent.devops.process.dal.mapper.{module}
|
||||||
|
```
|
@ -0,0 +1,398 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildStatus;
|
||||||
|
import cd.casic.ci.common.pipeline.enums.StartType;
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.BuildParameters;
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.ErrorInfo;
|
||||||
|
import cd.casic.ci.process.api.engine.pojo.BuildInfo;
|
||||||
|
import cd.casic.ci.process.api.engine.pojo.BuildRetryInfo;
|
||||||
|
import cd.casic.ci.process.api.process.enums.HistorySearchType;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.BuildStageStatus;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.app.StartBuildContext;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public interface PipelineBuildDao {
|
||||||
|
void create( StartBuildContext startBuildContext);
|
||||||
|
|
||||||
|
void updateBuildRetryInfo(
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
String buildId,
|
||||||
|
BuildRetryInfo retryInfo
|
||||||
|
);
|
||||||
|
|
||||||
|
List<BuildInfo> getBuildTasksByStatus(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
Set<BuildStatus> statusSet
|
||||||
|
);
|
||||||
|
|
||||||
|
int countAllBuildWithStatus(
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
Set<BuildStatus> status
|
||||||
|
);
|
||||||
|
/*
|
||||||
|
* TODO Record2 是JOOQ包的对象,这个项目使用mybatis,后续具体分析
|
||||||
|
* */
|
||||||
|
// List<Record2<String, String>> getBuildTasksByConcurrencyGroup(
|
||||||
|
//
|
||||||
|
// String projectId,
|
||||||
|
// String concurrencyGroup,
|
||||||
|
// List<BuildStatus> statusSet
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// List<Record2<String, String>> getBuildTasksByConcurrencyGroupNull(
|
||||||
|
//
|
||||||
|
// String projectId,
|
||||||
|
// String pipelineId,
|
||||||
|
// List<BuildStatus> statusSet
|
||||||
|
// );
|
||||||
|
|
||||||
|
BuildInfo getBuildInfo(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId
|
||||||
|
);
|
||||||
|
|
||||||
|
BuildInfo getUserBuildInfo(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId
|
||||||
|
);
|
||||||
|
|
||||||
|
String getStartUser(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId
|
||||||
|
);
|
||||||
|
|
||||||
|
List<BuildInfo> listBuildInfoByBuildIds(
|
||||||
|
|
||||||
|
Collection<String> buildIds,
|
||||||
|
String projectId,
|
||||||
|
String startBeginTime,
|
||||||
|
String endBeginTime
|
||||||
|
);
|
||||||
|
|
||||||
|
List<BuildInfo> listBuildInfoByBuildIdsOnly(
|
||||||
|
|
||||||
|
Collection<String> buildIds
|
||||||
|
);
|
||||||
|
|
||||||
|
Collection<BuildInfo> listPipelineBuildInfo(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
int offset,
|
||||||
|
int limit,
|
||||||
|
Boolean updateTimeDesc
|
||||||
|
);
|
||||||
|
|
||||||
|
Collection<Integer> listPipelineBuildNum(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
int offset,
|
||||||
|
int limit,
|
||||||
|
Integer debugVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
BuildInfo getBuildInfoByBuildNum(
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
Integer buildNum,
|
||||||
|
Set<BuildStatus> statusSet,
|
||||||
|
boolean debug
|
||||||
|
);
|
||||||
|
|
||||||
|
BuildInfo getOneQueueBuild(
|
||||||
|
String projectId,
|
||||||
|
String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
BuildInfo getOneConcurrencyQueueBuild(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String concurrencyGroup,
|
||||||
|
String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
void startBuild(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId,
|
||||||
|
LocalDateTime startTime,
|
||||||
|
Boolean debug
|
||||||
|
);
|
||||||
|
|
||||||
|
void finishBuild(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId,
|
||||||
|
BuildStatus buildStatus,
|
||||||
|
Long executeTime,
|
||||||
|
String recommendVersion,
|
||||||
|
String remark,
|
||||||
|
List<ErrorInfo> errorInfoList,
|
||||||
|
Boolean debug
|
||||||
|
);
|
||||||
|
|
||||||
|
BuildInfo getLatestBuild(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
boolean debug
|
||||||
|
);
|
||||||
|
|
||||||
|
BuildInfo getLatestFinishedBuild(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
BuildInfo getLatestFailedBuild(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
BuildInfo getLatestSucceedBuild(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
boolean updateStatus(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId,
|
||||||
|
BuildStatus oldBuildStatus,
|
||||||
|
BuildStatus newBuildStatus,
|
||||||
|
LocalDateTime startTime,
|
||||||
|
List<ErrorInfo> errorInfoList
|
||||||
|
);
|
||||||
|
|
||||||
|
void updateExecuteCount(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId,
|
||||||
|
int executeCount
|
||||||
|
);
|
||||||
|
|
||||||
|
int count(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
List<BuildStatus> status,
|
||||||
|
Long startTimeEndTime,
|
||||||
|
Integer debugVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
int countByStatus(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
List<BuildStatus> status,
|
||||||
|
Long startTimeEndTime,
|
||||||
|
Boolean onlyDebug
|
||||||
|
);
|
||||||
|
|
||||||
|
int count(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
List<String> materialAlias,
|
||||||
|
String materialUrl,
|
||||||
|
List<String> materialBranch,
|
||||||
|
String materialCommitId,
|
||||||
|
String materialCommitMessage,
|
||||||
|
List<BuildStatus> status,
|
||||||
|
List<StartType> trigger,
|
||||||
|
Long queueTimeStartTime,
|
||||||
|
Long queueTimeEndTime,
|
||||||
|
Long startTimeStartTime,
|
||||||
|
Long startTimeEndTime,
|
||||||
|
Long endTimeStartTime,
|
||||||
|
Long endTimeEndTime,
|
||||||
|
Long totalTimeMin,
|
||||||
|
Long totalTimeMax,
|
||||||
|
String remark,
|
||||||
|
Integer buildNoStart,
|
||||||
|
Integer buildNoEnd,
|
||||||
|
String buildMsg,
|
||||||
|
List<String> startUser,
|
||||||
|
Boolean debug,
|
||||||
|
List<String> triggerAlias,
|
||||||
|
List<String> triggerBranch,
|
||||||
|
List<String> triggerUser
|
||||||
|
);
|
||||||
|
|
||||||
|
Collection<BuildInfo> listPipelineBuildInfo(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
List<String> materialAlias,
|
||||||
|
String materialUrl,
|
||||||
|
List<String> materialBranch,
|
||||||
|
String materialCommitId,
|
||||||
|
String materialCommitMessage,
|
||||||
|
List<BuildStatus> status,
|
||||||
|
List<StartType> trigger,
|
||||||
|
Long queueTimeStartTime,
|
||||||
|
Long queueTimeEndTime,
|
||||||
|
Long startTimeStartTime,
|
||||||
|
Long startTimeEndTime,
|
||||||
|
Long endTimeStartTime,
|
||||||
|
Long endTimeEndTime,
|
||||||
|
Long totalTimeMin,
|
||||||
|
Long totalTimeMax,
|
||||||
|
String remark,
|
||||||
|
int offset,
|
||||||
|
int limit,
|
||||||
|
Integer buildNoStart,
|
||||||
|
Integer buildNoEnd,
|
||||||
|
String buildMsg,
|
||||||
|
List<String> startUser,
|
||||||
|
Boolean updateTimeDesc,
|
||||||
|
Boolean debug,
|
||||||
|
List<String> triggerAlias,
|
||||||
|
List<String> triggerBranch,
|
||||||
|
List<String> triggerUser
|
||||||
|
);
|
||||||
|
|
||||||
|
void updateBuildRemark(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
String buildId,
|
||||||
|
String remark
|
||||||
|
);
|
||||||
|
|
||||||
|
void updateRecommendVersion(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId,
|
||||||
|
String recommendVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
Collection<BuildInfo> listHistorySearchOptions(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
Integer debugVersion,
|
||||||
|
HistorySearchType type
|
||||||
|
);
|
||||||
|
|
||||||
|
BuildInfo getBuildByBuildNum(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
int buildNum,
|
||||||
|
Integer debugVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
List<String> getBuilds(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
Set<BuildStatus> buildStatus,
|
||||||
|
Integer debugVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
int updateArtifactList(
|
||||||
|
|
||||||
|
String artifactList,
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
String buildId
|
||||||
|
);
|
||||||
|
|
||||||
|
void updateBuildMaterial(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId,
|
||||||
|
String material
|
||||||
|
);
|
||||||
|
|
||||||
|
int updateBuildStageStatus(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId,
|
||||||
|
List<BuildStageStatus> stageStatus,
|
||||||
|
BuildStatus oldBuildStatus,
|
||||||
|
BuildStatus newBuildStatus,
|
||||||
|
List<ErrorInfo> errorInfoList
|
||||||
|
);
|
||||||
|
|
||||||
|
String getBuildParameters(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId
|
||||||
|
);
|
||||||
|
|
||||||
|
boolean updateBuildParameters(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
String buildId,
|
||||||
|
Collection<BuildParameters> buildParameters,
|
||||||
|
boolean debug
|
||||||
|
);
|
||||||
|
|
||||||
|
int countBuildNumByTime(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
LocalDateTime startTime,
|
||||||
|
LocalDateTime endTime,
|
||||||
|
Integer debugVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
BuildInfo getBuildInfo(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
String buildId
|
||||||
|
);
|
||||||
|
|
||||||
|
int countBuildNumByVersion(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
int version
|
||||||
|
);
|
||||||
|
|
||||||
|
// List<Record2<Integer, Integer>> batchCountBuildNumByVersion(
|
||||||
|
//
|
||||||
|
// String projectId,
|
||||||
|
// String pipelineId,
|
||||||
|
// Set<Integer> versions
|
||||||
|
// );
|
||||||
|
|
||||||
|
String getDebugResourceStr(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String buildId
|
||||||
|
);
|
||||||
|
|
||||||
|
List<BuildInfo> getDebugHistory(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
Integer version
|
||||||
|
);
|
||||||
|
|
||||||
|
int clearDebugHistory(
|
||||||
|
|
||||||
|
String projectId,
|
||||||
|
String pipelineId,
|
||||||
|
Integer version
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,172 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.process.pojo.BuildTemplateAcrossInfo;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineBuildTemplateAcrossInfoRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线构建模板跨项目信息Mapper接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineBuildTemplateAcrossInfoDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建模板跨项目信息
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param templateId 模板ID
|
||||||
|
* @param templateType 模板类型
|
||||||
|
* @param templateInstancesIds 模板实例ID列表
|
||||||
|
* @param targetProjectId 目标项目ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int create(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("templateId") String templateId,
|
||||||
|
@Param("templateType") BuildTemplateAcrossInfo.TemplateAcrossInfoType templateType,
|
||||||
|
@Param("templateInstancesIds") List<String> templateInstancesIds,
|
||||||
|
@Param("targetProjectId") String targetProjectId,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量创建模板跨项目信息
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param templateAcrossInfos 模板跨项目信息列表
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int batchCreate(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("templateAcrossInfos") List<BuildTemplateAcrossInfo> templateAcrossInfos
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新模板跨项目信息
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param templateAcrossInfos 模板跨项目信息列表
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int batchUpdate(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("templateAcrossInfos") List<BuildTemplateAcrossInfo> templateAcrossInfos
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取模板跨项目信息
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param templateId 模板ID
|
||||||
|
* @return 模板跨项目信息记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineBuildTemplateAcrossInfoRecord> get(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("templateId") String templateId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据模板ID获取跨项目信息
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param templateId 模板ID
|
||||||
|
* @return 模板跨项目信息记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineBuildTemplateAcrossInfoRecord> getByTemplateId(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("templateId") String templateId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建ID
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param templateId 模板ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int updateBuildId(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("templateId") String templateId,
|
||||||
|
@Param("buildId") String buildId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除模板跨项目信息
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param templateId 模板ID
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int delete(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("templateId") String templateId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据流水线ID删除跨项目信息
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int deleteByPipelineId(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据构建ID删除跨项目信息
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int deleteByBuildId(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,136 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.BuildParameters;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线构建变量 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineBuildVarDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建构建变量
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param varName 变量名
|
||||||
|
* @param varValue 变量值
|
||||||
|
* @return 构建变量ID
|
||||||
|
*/
|
||||||
|
long save(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("varName") String varName,
|
||||||
|
@Param("varValue") String varValue,
|
||||||
|
@Param("readOnly") Boolean readOnly
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建变量
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param varType 变量类型
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int update(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("value") String value,
|
||||||
|
@Param("varType") String varType,
|
||||||
|
@Param("readOnly") Boolean readOnly
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, String> getVars(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("keys") Set<String> keys
|
||||||
|
);
|
||||||
|
|
||||||
|
List<BuildParameters> getVarsWithType(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("key") String key
|
||||||
|
);
|
||||||
|
|
||||||
|
int deleteBuildVar(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("varName") String varName,
|
||||||
|
@Param("readOnly") Boolean readOnly
|
||||||
|
);
|
||||||
|
|
||||||
|
void batchSave(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("variables") List<BuildParameters> variables
|
||||||
|
);
|
||||||
|
|
||||||
|
void batchUpdate(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("variables") List<BuildParameters> variables
|
||||||
|
);
|
||||||
|
|
||||||
|
void deleteBuildVars(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId
|
||||||
|
);
|
||||||
|
|
||||||
|
void deletePipelineBuildVar(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
Set<String> fetchVarByLikeKey(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("readOnly") Boolean readOnly,
|
||||||
|
@Param("likeStr") String likeStr
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,306 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.ChannelCode;
|
||||||
|
import cd.casic.ci.common.pipeline.enums.VersionStatus;
|
||||||
|
import cd.casic.ci.process.api.engine.pojo.PipelineInfo;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.PipelineCollation;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.PipelineSortType;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineInfoRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线信息 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineInfoDao {
|
||||||
|
|
||||||
|
int create(
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("version") int version,
|
||||||
|
@Param("pipelineName") String pipelineName,
|
||||||
|
@Param("pipelineDesc") String pipelineDesc,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("channelCode") ChannelCode channelCode,
|
||||||
|
@Param("manualStartup") boolean manualStartup,
|
||||||
|
@Param("canElementSkip") boolean canElementSkip,
|
||||||
|
@Param("taskCount") int taskCount,
|
||||||
|
@Param("id") Long id,
|
||||||
|
@Param("latestVersionStatus") VersionStatus latestVersionStatus,
|
||||||
|
@Param("pipelineDisable") Boolean pipelineDisable
|
||||||
|
);
|
||||||
|
|
||||||
|
boolean update(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("version") Integer version,
|
||||||
|
@Param("pipelineName") String pipelineName,
|
||||||
|
@Param("pipelineDesc") String pipelineDesc,
|
||||||
|
@Param("manualStartup") Boolean manualStartup,
|
||||||
|
@Param("canElementSkip") Boolean canElementSkip,
|
||||||
|
@Param("taskCount") int taskCount,
|
||||||
|
@Param("latestVersion") int latestVersion,
|
||||||
|
@Param("updateLastModifyUser") Boolean updateLastModifyUser,
|
||||||
|
@Param("latestVersionStatus") VersionStatus latestVersionStatus,
|
||||||
|
@Param("locked") Boolean locked
|
||||||
|
);
|
||||||
|
|
||||||
|
int countByPipelineIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("channelCode") ChannelCode channelCode,
|
||||||
|
@Param("pipelineIds") List<String> pipelineIds
|
||||||
|
);
|
||||||
|
|
||||||
|
int countByProjectIds(
|
||||||
|
@Param("projectIds") Collection<String> projectIds,
|
||||||
|
@Param("channelCode") ChannelCode channelCode,
|
||||||
|
@Param("keyword") String keyword
|
||||||
|
);
|
||||||
|
|
||||||
|
int countByProjectIds(
|
||||||
|
@Param("projectIds") Collection<String> projectIds,
|
||||||
|
@Param("channelCodes") List<ChannelCode> channelCodes,
|
||||||
|
@Param("keyword") String keyword
|
||||||
|
);
|
||||||
|
|
||||||
|
List<String> listPipelineIdByProject(
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord listPipelineInfoByProject(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("limit") int limit,
|
||||||
|
@Param("offset") int offset,
|
||||||
|
@Param("deleteFlag") Boolean deleteFlag,
|
||||||
|
@Param("timeDescFlag") boolean timeDescFlag,
|
||||||
|
@Param("channelCode") ChannelCode channelCode
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord searchByProject(
|
||||||
|
|
||||||
|
@Param("pipelineName") String pipelineName,
|
||||||
|
@Param("projectCode") String projectCode,
|
||||||
|
@Param("limit") int limit,
|
||||||
|
@Param("offset") int offset,
|
||||||
|
@Param("channelCode") ChannelCode channelCode
|
||||||
|
);
|
||||||
|
|
||||||
|
int countPipelineInfoByProject(
|
||||||
|
|
||||||
|
@Param("pipelineName") String pipelineName,
|
||||||
|
@Param("projectCode") String projectCode,
|
||||||
|
@Param("channelCode") ChannelCode channelCode
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord searchByProject(
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord listPipelinesByProject(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("deleteFlag") Boolean deleteFlag,
|
||||||
|
@Param("days") Long days,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("limit") Integer limit,
|
||||||
|
@Param("sortType") PipelineSortType sortType,
|
||||||
|
@Param("collation") PipelineCollation collation,
|
||||||
|
@Param("filterByPipelineName") String filterByPipelineName
|
||||||
|
);
|
||||||
|
|
||||||
|
int countPipeline(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("deleteFlag") Boolean deleteFlag,
|
||||||
|
@Param("days") Long days,
|
||||||
|
@Param("filterByPipelineName") String filterByPipelineName
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord listDeletePipelineBefore(
|
||||||
|
|
||||||
|
@Param("updateTime") LocalDateTime updateTime,
|
||||||
|
@Param("offset") Integer offset,
|
||||||
|
@Param("limit") Integer limit
|
||||||
|
);
|
||||||
|
|
||||||
|
boolean isNameExist(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineName") String pipelineName,
|
||||||
|
@Param("channelCode") ChannelCode channelCode
|
||||||
|
);
|
||||||
|
|
||||||
|
boolean isNameExist(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineName") String pipelineName,
|
||||||
|
@Param("channelCode") ChannelCode channelCode,
|
||||||
|
@Param("excludePipelineId") String excludePipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord getPipelineInfo(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("channelCode") ChannelCode channelCode
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord getPipelineInfo(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("channelCode") ChannelCode channelCode,
|
||||||
|
@Param("delete") Boolean delete,
|
||||||
|
@Param("days") Long days
|
||||||
|
);
|
||||||
|
|
||||||
|
int softDelete(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("changePipelineName") String changePipelineName,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("channelCode") ChannelCode channelCode
|
||||||
|
);
|
||||||
|
|
||||||
|
int delete(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord listInfoByPipelineIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineIds") Set<String> pipelineIds,
|
||||||
|
@Param("filterDelete") boolean filterDelete
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord getPipelineInfo(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("version") int version
|
||||||
|
);
|
||||||
|
|
||||||
|
// Record1<Int> getPipelineInfoNum(
|
||||||
|
//
|
||||||
|
// @Param("projectIds") Set<String> projectIds,
|
||||||
|
// @Param("channelCodes") Set<ChannelCode> channelCodes
|
||||||
|
// );
|
||||||
|
|
||||||
|
TPipelineInfoRecord listInfoByPipelineName(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineNames") Set<String> pipelineNames,
|
||||||
|
@Param("filterDelete") boolean filterDelete
|
||||||
|
);
|
||||||
|
|
||||||
|
PipelineInfo convert(
|
||||||
|
@Param("t") TPipelineInfoRecord t,
|
||||||
|
@Param("templateId") String templateId
|
||||||
|
);
|
||||||
|
|
||||||
|
void restore(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("channelCode") ChannelCode channelCode
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord searchByProjectId(
|
||||||
|
@Param("pipelineName") String pipelineName,
|
||||||
|
@Param("projectCode") String projectCode,
|
||||||
|
@Param("limit") int limit,
|
||||||
|
@Param("offset") int offset,
|
||||||
|
@Param("channelCodes") List<ChannelCode> channelCodes
|
||||||
|
);
|
||||||
|
|
||||||
|
int getPipelineVersion(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("channelCode") ChannelCode channelCode
|
||||||
|
);
|
||||||
|
// TODO
|
||||||
|
// Result<Record2<String, Long>> listByProject(
|
||||||
|
//
|
||||||
|
// @Param("projectId") String projectId
|
||||||
|
// );
|
||||||
|
|
||||||
|
TPipelineInfoRecord getPipelineId(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
int countExcludePipelineIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("excludePipelineIds") List<String> excludePipelineIds,
|
||||||
|
@Param("channelCode") ChannelCode channelCode,
|
||||||
|
@Param("includeDelete") boolean includeDelete,
|
||||||
|
@Param("filterPipelineIds") List<String> filterPipelineIds
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord getPipelineByAutoId(
|
||||||
|
@Param("ids") List<Long> ids,
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
void updateLatestStartTime(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("startTime") LocalDateTime startTime
|
||||||
|
);
|
||||||
|
|
||||||
|
List<String> getIdByCreateTimePeriod(
|
||||||
|
@Param("startTime") LocalDateTime startTime,
|
||||||
|
@Param("endTime") LocalDateTime endTime,
|
||||||
|
@Param("page") int page,
|
||||||
|
@Param("pageSize") int pageSize
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord listByPipelineIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("excludePipelineIds") List<String> excludePipelineIds,
|
||||||
|
@Param("channelCode") ChannelCode channelCode,
|
||||||
|
@Param("limit") int limit,
|
||||||
|
@Param("offset") int offset
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineJobMutexGroupRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线任务互斥组 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineJobMutexGroupDao {
|
||||||
|
|
||||||
|
TPipelineJobMutexGroupRecord getByProjectId(
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
boolean insert(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("jobMutexGroupName") String jobMutexGroupName
|
||||||
|
);
|
||||||
|
|
||||||
|
boolean create(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("jobMutexGroupName") String jobMutexGroupName
|
||||||
|
);
|
||||||
|
|
||||||
|
boolean exit(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("jobMutexGroupName") String jobMutexGroupName
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.engine.pojo.PipelineModelTask;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineModelTaskRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线模型任务数据访问接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineModelTaskDao {
|
||||||
|
|
||||||
|
void batchSave(
|
||||||
|
@Param("modelTasks") Collection<PipelineModelTask> modelTasks
|
||||||
|
);
|
||||||
|
|
||||||
|
void deletePipelineTasks(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
int getPipelineCountByAtomCode(
|
||||||
|
@Param("atomCode") String atomCode,
|
||||||
|
@Param("projectCode") String projectCode
|
||||||
|
);
|
||||||
|
|
||||||
|
// Result<Record2<Integer, String>> batchGetPipelineCountByAtomCode(
|
||||||
|
// @Param("dslContext") DSLContext dslContext,
|
||||||
|
// @Param("atomCodeList") List<String> atomCodeList,
|
||||||
|
// @Param("projectCode") String projectCode
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// Result<Record2<String, String>> batchGetPipelineIdByAtomCode(
|
||||||
|
// @Param("projectId") String projectId,
|
||||||
|
// @Param("atomCodeList") List<String> atomCodeList,
|
||||||
|
// @Param("limit") int limit,
|
||||||
|
// @Param("offset") int offset
|
||||||
|
// );
|
||||||
|
|
||||||
|
TPipelineModelTaskRecord getModelTasks(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("isAtomVersionNull") Boolean isAtomVersionNull
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineModelTaskRecord listByPipelineIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineIds") Collection<String> pipelineIds
|
||||||
|
);
|
||||||
|
|
||||||
|
// Result<Record> listByAtomCode(
|
||||||
|
// @Param("atomCode") String atomCode,
|
||||||
|
// @Param("projectId") String projectId,
|
||||||
|
// @Param("version") String version,
|
||||||
|
// @Param("startUpdateTime") LocalDateTime startUpdateTime,
|
||||||
|
// @Param("endUpdateTime") LocalDateTime endUpdateTime,
|
||||||
|
// @Param("page") Integer page,
|
||||||
|
// @Param("pageSize") Integer pageSize
|
||||||
|
// );
|
||||||
|
|
||||||
|
long countByAtomCode(
|
||||||
|
@Param("atomCode") String atomCode,
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("version") String version,
|
||||||
|
@Param("startUpdateTime") LocalDateTime startUpdateTime,
|
||||||
|
@Param("endUpdateTime") LocalDateTime endUpdateTime
|
||||||
|
);
|
||||||
|
|
||||||
|
// Result<Record> listByAtomCodeAndPipelineIds(
|
||||||
|
// @Param("atomCode") String atomCode,
|
||||||
|
// @Param("pipelineIds") Set<String> pipelineIds
|
||||||
|
// );
|
||||||
|
|
||||||
|
void updateTaskAtomVersion(
|
||||||
|
@Param("atomVersion") String atomVersion,
|
||||||
|
@Param("createTime") LocalDateTime createTime,
|
||||||
|
@Param("updateTime") LocalDateTime updateTime,
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("stageId") String stageId,
|
||||||
|
@Param("containerId") String containerId,
|
||||||
|
@Param("taskId") String taskId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,76 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最近使用的流水线Mapper接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineRecentUseDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增记录
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int add(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最近使用的流水线ID列表
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param limit 限制数量
|
||||||
|
* @return 流水线ID列表
|
||||||
|
*/
|
||||||
|
List<String> listRecentPipelineIds(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("limit") Integer limit
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最近使用时间列表
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param limit 限制数量
|
||||||
|
* @return 使用时间列表
|
||||||
|
*/
|
||||||
|
List<LocalDateTime> listLastUseTimes(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("limit") Integer limit
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除过期记录
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int deleteExpire(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("endTime") LocalDateTime endTime
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,209 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.Model;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.pipeline.PipelineResourceVersion;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.setting.PipelineModelVersion;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线资源数据访问接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineResourceDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线资源
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param creator 创建者
|
||||||
|
* @param version 版本号
|
||||||
|
* @param versionName 版本名称
|
||||||
|
* @param model 流水线模型
|
||||||
|
* @param yamlStr YAML字符串
|
||||||
|
* @param yamlVersion YAML版本
|
||||||
|
* @param versionNum 版本序号
|
||||||
|
* @param pipelineVersion 流水线版本
|
||||||
|
* @param triggerVersion 触发器版本
|
||||||
|
* @param settingVersion 设置版本
|
||||||
|
*/
|
||||||
|
void create(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("creator") String creator,
|
||||||
|
@Param("version") int version,
|
||||||
|
@Param("versionName") String versionName,
|
||||||
|
@Param("model") Model model,
|
||||||
|
@Param("yamlStr") String yamlStr,
|
||||||
|
@Param("yamlVersion") String yamlVersion,
|
||||||
|
@Param("versionNum") Integer versionNum,
|
||||||
|
@Param("pipelineVersion") Integer pipelineVersion,
|
||||||
|
@Param("triggerVersion") Integer triggerVersion,
|
||||||
|
@Param("settingVersion") Integer settingVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新发布版本
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param version 版本号
|
||||||
|
* @param versionName 版本名称
|
||||||
|
* @param model 流水线模型
|
||||||
|
* @param yamlStr YAML字符串
|
||||||
|
* @param yamlVersion YAML版本
|
||||||
|
* @param versionNum 版本序号
|
||||||
|
* @param pipelineVersion 流水线版本
|
||||||
|
* @param triggerVersion 触发器版本
|
||||||
|
* @param settingVersion 设置版本
|
||||||
|
*/
|
||||||
|
void updateReleaseVersion(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("version") int version,
|
||||||
|
@Param("versionName") String versionName,
|
||||||
|
@Param("model") Model model,
|
||||||
|
@Param("yamlStr") String yamlStr,
|
||||||
|
@Param("yamlVersion") String yamlVersion,
|
||||||
|
@Param("versionNum") Integer versionNum,
|
||||||
|
@Param("pipelineVersion") Integer pipelineVersion,
|
||||||
|
@Param("triggerVersion") Integer triggerVersion,
|
||||||
|
@Param("settingVersion") Integer settingVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取发布版本资源
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 流水线资源版本
|
||||||
|
*/
|
||||||
|
PipelineResourceVersion getReleaseVersionResource(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新版本模型字符串
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 模型字符串
|
||||||
|
*/
|
||||||
|
String getLatestVersionModelString(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定版本模型字符串
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param version 版本号
|
||||||
|
* @return 模型字符串
|
||||||
|
*/
|
||||||
|
String getVersionModelString(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("version") Integer version
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新模型资源列表
|
||||||
|
*
|
||||||
|
* @param pipelineIds 流水线ID集合
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @return 流水线ID、版本号、模型字符串
|
||||||
|
*/
|
||||||
|
Map<String, Map<Integer, String>> listLatestModelResource(
|
||||||
|
@Param("pipelineIds") Set<String> pipelineIds,
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除所有版本
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int deleteAllVersion(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新流水线模型
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param pipelineModelVersion 流水线模型版本
|
||||||
|
*/
|
||||||
|
void updatePipelineModel(
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("pipelineModelVersion") PipelineModelVersion pipelineModelVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新设置版本
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param settingVersion 设置版本
|
||||||
|
* @return 版本号
|
||||||
|
*/
|
||||||
|
Integer updateSettingVersion(
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("settingVersion") int settingVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取模型字符串列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineIds 流水线ID集合
|
||||||
|
* @return 流水线ID到模型字符串的映射
|
||||||
|
*/
|
||||||
|
Map<String, String> listModelString(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineIds") Collection<String> pipelineIds
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.PipelineAsCodeSettings;
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.setting.PipelineSetting;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineSettingRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public interface PipelineSettingDao {
|
||||||
|
int saveSetting(
|
||||||
|
@Param("setting") PipelineSetting setting,
|
||||||
|
@Param("isTemplate") boolean isTemplate
|
||||||
|
);
|
||||||
|
|
||||||
|
PipelineSetting getSetting(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
PipelineAsCodeSettings getPipelineAsCodeSettings(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
List<PipelineSetting> getSettings(
|
||||||
|
|
||||||
|
@Param("pipelineIds") Set<String> pipelineIds,
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
void batchUpdate(
|
||||||
|
|
||||||
|
@Param("tPipelineSettingRecords") List<TPipelineSettingRecord> tPipelineSettingRecords
|
||||||
|
);
|
||||||
|
// TODO
|
||||||
|
// Result<Record4<String, String, Integer, String>> getSimpleSettings(
|
||||||
|
//
|
||||||
|
// @Param("pipelineIds") Set<String> pipelineIds,
|
||||||
|
// @Param("projectId") String projectId
|
||||||
|
// );
|
||||||
|
|
||||||
|
List<PipelineSetting> getSetting(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("isTemplate") boolean isTemplate
|
||||||
|
);
|
||||||
|
|
||||||
|
void updateSettingName(
|
||||||
|
|
||||||
|
@Param("pipelineIdList") List<String> pipelineIdList,
|
||||||
|
@Param("name") String name
|
||||||
|
);
|
||||||
|
|
||||||
|
PipelineSetting updateSetting(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("name") String name,
|
||||||
|
@Param("desc") String desc
|
||||||
|
);
|
||||||
|
//TODO
|
||||||
|
// Record1<Integer> getSettingByName(
|
||||||
|
//
|
||||||
|
// @Param("name") String name,
|
||||||
|
// @Param("projectId") String projectId,
|
||||||
|
// @Param("pipelineId") String pipelineId,
|
||||||
|
// @Param("isTemplate") boolean isTemplate
|
||||||
|
// );
|
||||||
|
|
||||||
|
int delete(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
int updateMaxConRunningQueueSize(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("maxConRunningQueueSize") int maxConRunningQueueSize
|
||||||
|
);
|
||||||
|
|
||||||
|
int updatePipelineAsCodeSettings(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("pipelineAsCodeSettings") PipelineAsCodeSettings pipelineAsCodeSettings
|
||||||
|
);
|
||||||
|
|
||||||
|
List<String> getNonInheritedPipelineIds(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineStageTagRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线阶段标签Mapper接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineStageTagDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加阶段标签
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param id 标签ID
|
||||||
|
* @param stageTagName 阶段标签名称
|
||||||
|
* @param weight 权重
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int add(
|
||||||
|
@Param("id") String id,
|
||||||
|
@Param("stageTagName") String stageTagName,
|
||||||
|
@Param("weight") Integer weight
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除阶段标签
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param id 标签ID
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int delete(
|
||||||
|
@Param("id") String id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新阶段标签
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param id 标签ID
|
||||||
|
* @param stageTagName 阶段标签名称
|
||||||
|
* @param weight 权重
|
||||||
|
* @return 影响的行数
|
||||||
|
*/
|
||||||
|
int update(
|
||||||
|
|
||||||
|
@Param("id") String id,
|
||||||
|
@Param("stageTagName") String stageTagName,
|
||||||
|
@Param("weight") Integer weight
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取阶段标签
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param id 标签ID
|
||||||
|
* @return 阶段标签记录
|
||||||
|
*/
|
||||||
|
TPipelineStageTagRecord getStageTag(
|
||||||
|
|
||||||
|
@Param("id") String id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有阶段标签
|
||||||
|
*
|
||||||
|
* @return 所有阶段标签记录
|
||||||
|
*/
|
||||||
|
TPipelineStageTagRecord getAllStageTag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取默认阶段标签
|
||||||
|
*
|
||||||
|
* @return 默认阶段标签记录
|
||||||
|
*/
|
||||||
|
TPipelineStageTagRecord getDefaultStageTag();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据名称或权重统计标签数量
|
||||||
|
*
|
||||||
|
|
||||||
|
* @param stageTagName 阶段标签名称
|
||||||
|
* @param weight 权重
|
||||||
|
* @return 标签数量
|
||||||
|
*/
|
||||||
|
Integer countByNameOrWeight(
|
||||||
|
@Param("stageTagName") String stageTagName,
|
||||||
|
@Param("weight") Integer weight
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineYamlSyncRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PipelineYamlSyncDao {
|
||||||
|
/**
|
||||||
|
* 创建YAML同步记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param yamlContent YAML内容 * @param userId 用户ID * @return YAML同步记录ID
|
||||||
|
*/
|
||||||
|
long create(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("yamlContent") String yamlContent, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新YAML同步记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param yamlContent YAML内容 * @param userId 用户ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int update(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("yamlContent") String yamlContent, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除YAML同步记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int delete(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取YAML同步记录列表 * * @param projectId 项目ID * @return YAML同步记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineYamlSyncRecord> list(@Param("projectId") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取YAML同步记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @return YAML同步记录
|
||||||
|
*/
|
||||||
|
TPipelineYamlSyncRecord get(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineYamlViewRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线YAML视图 Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineYamlViewDao {
|
||||||
|
/**
|
||||||
|
* 创建YAML视图 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param yamlContent YAML内容 * @param userId 用户ID * @return YAML视图ID
|
||||||
|
*/
|
||||||
|
long create(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("yamlContent") String yamlContent, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新YAML视图 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param yamlContent YAML内容 * @param userId 用户ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int update(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("yamlContent") String yamlContent, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除YAML视图 * * @param projectId 项目ID * @param pipelineId 流水线ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int delete(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取YAML视图列表 * * @param projectId 项目ID * @return YAML视图列表
|
||||||
|
*/
|
||||||
|
List<TPipelineYamlViewRecord> list(@Param("projectId") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取YAML视图 * * @param projectId 项目ID * @param pipelineId 流水线ID * @return YAML视图
|
||||||
|
*/
|
||||||
|
TPipelineYamlViewRecord get(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.pipeline;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.process.pojo.pipeline.SubPipelineRef;
|
||||||
|
import org.apache.commons.lang3.tuple.Triple;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子流水线引用 Dao 接口 TODO 不知道是哪个<EFBFBD>?
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
//TODO 不知道哪个表
|
||||||
|
public interface SubPipelineRefDao {
|
||||||
|
void batchAdd(
|
||||||
|
@Param("subPipelineRefList") Collection<SubPipelineRef> subPipelineRefList
|
||||||
|
);
|
||||||
|
|
||||||
|
// Result<TPipelineSubRefRecord> list(
|
||||||
|
// @Param("projectId") String projectId,
|
||||||
|
// @Param("pipelineId") String pipelineId
|
||||||
|
// );
|
||||||
|
|
||||||
|
int deleteAll(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
int delete(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("taskId") String taskId
|
||||||
|
);
|
||||||
|
|
||||||
|
void batchDelete(
|
||||||
|
@Param("infos") Set<Triple<String, String, String>> infos
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,126 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.record;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildStatus;
|
||||||
|
import cd.casic.ci.common.pipeline.enums.StartType;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineBuildDetailRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建详情 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface BuildDetailDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建构建详情
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param startUser 启动用户
|
||||||
|
* @param startType 启动类型
|
||||||
|
* @param buildNum 构建编号
|
||||||
|
* @param model 模型
|
||||||
|
* @param buildStatus 构建状态
|
||||||
|
*/
|
||||||
|
void create(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("startUser") String startUser,
|
||||||
|
@Param("startType") StartType startType,
|
||||||
|
@Param("buildNum") Integer buildNum,
|
||||||
|
@Param("model") String model,
|
||||||
|
@Param("buildStatus") BuildStatus buildStatus
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建取消用户
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param cancelUser 取消用户
|
||||||
|
*/
|
||||||
|
void updateBuildCancelUser(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("cancelUser") String cancelUser
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建详情
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param model 模型
|
||||||
|
* @param buildStatus 构建状态
|
||||||
|
* @param cancelUser 取消用户
|
||||||
|
* @return 更新数量
|
||||||
|
*/
|
||||||
|
int update(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("model") String model,
|
||||||
|
@Param("buildStatus") BuildStatus buildStatus,
|
||||||
|
@Param("cancelUser") String cancelUser
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建状态
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param buildStatus 构建状态
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
*/
|
||||||
|
void updateStatus(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("buildStatus") BuildStatus buildStatus,
|
||||||
|
@Param("startTime") LocalDateTime startTime,
|
||||||
|
@Param("endTime") LocalDateTime endTime
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取构建详情
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @return 构建详情记录
|
||||||
|
*/
|
||||||
|
TPipelineBuildDetailRecord get(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,192 @@
|
|||||||
|
/*
|
||||||
|
* Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
|
*
|
||||||
|
* BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
|
||||||
|
*
|
||||||
|
* A copy of the MIT License is included in this file.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Terms of the MIT License:
|
||||||
|
* ---------------------------------------------------
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
* the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.record;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildStatus;
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.time.BuildTimestampType;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.pipeline.record.BuildRecordContainer;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建记录容器 Mapper 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface BuildRecordContainerDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量保存构建记录容器
|
||||||
|
*
|
||||||
|
* @param records 构建记录容器列表
|
||||||
|
*/
|
||||||
|
void batchSave(@Param("records") List<BuildRecordContainer> records);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建记录容器
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param containerId 容器ID
|
||||||
|
* @param executeCount 执行次数
|
||||||
|
* @param containerVar 容器变量
|
||||||
|
* @param buildStatus 构建状态
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param timestamps 时间戳
|
||||||
|
*/
|
||||||
|
void updateRecord(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("containerId") String containerId,
|
||||||
|
@Param("executeCount") Integer executeCount,
|
||||||
|
@Param("containerVar") Map<String, Object> containerVar,
|
||||||
|
@Param("buildStatus") BuildStatus buildStatus,
|
||||||
|
@Param("startTime") LocalDateTime startTime,
|
||||||
|
@Param("endTime") LocalDateTime endTime,
|
||||||
|
@Param("timestamps") Map<BuildTimestampType, String> timestamps
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重试时清空结束时间
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param containerId 容器ID
|
||||||
|
* @param executeCount 执行次数
|
||||||
|
*/
|
||||||
|
void flushEndTimeWhenRetry(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("containerId") String containerId,
|
||||||
|
@Param("executeCount") Integer executeCount
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取构建记录容器
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param containerId 容器ID
|
||||||
|
* @param executeCount 执行次数
|
||||||
|
* @return 构建记录容器
|
||||||
|
*/
|
||||||
|
BuildRecordContainer getRecord(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("containerId") String containerId,
|
||||||
|
@Param("executeCount") Integer executeCount
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取构建记录容器列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param executeCount 执行次数
|
||||||
|
* @param stageId 阶段ID
|
||||||
|
* @param matrixGroupId 矩阵组ID
|
||||||
|
* @param buildStatusSet 构建状态集合
|
||||||
|
* @return 构建记录容器列表
|
||||||
|
*/
|
||||||
|
List<BuildRecordContainer> getRecords(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("executeCount") Integer executeCount,
|
||||||
|
@Param("stageId") String stageId,
|
||||||
|
@Param("matrixGroupId") String matrixGroupId,
|
||||||
|
@Param("buildStatusSet") Set<BuildStatus> buildStatusSet
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建记录容器状态
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param executeCount 执行次数
|
||||||
|
* @param buildStatus 构建状态
|
||||||
|
* @param stageId 阶段ID
|
||||||
|
*/
|
||||||
|
void updateRecordStatus(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("executeCount") Integer executeCount,
|
||||||
|
@Param("buildStatus") BuildStatus buildStatus,
|
||||||
|
@Param("stageId") String stageId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新的普通构建记录容器列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param executeCount 执行次数
|
||||||
|
* @param stageId 阶段ID
|
||||||
|
* @return 构建记录容器列表
|
||||||
|
*/
|
||||||
|
List<BuildRecordContainer> getLatestNormalRecords(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("executeCount") Integer executeCount,
|
||||||
|
@Param("stageId") String stageId
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新的矩阵构建记录容器列表
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @param pipelineId 流水线ID
|
||||||
|
* @param buildId 构建ID
|
||||||
|
* @param executeCount 执行次数
|
||||||
|
* @return 构建记录容器列表
|
||||||
|
*/
|
||||||
|
List<BuildRecordContainer> getLatestMatrixRecords(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("executeCount") Integer executeCount
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.record;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildRecordTimeStamp;
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildStatus;
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.ErrorInfo;
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.time.BuildTimestampType;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.pipeline.BuildRecordInfo;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.pipeline.record.BuildRecordModel;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建记录模型Mapper接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface BuildRecordModelDao {
|
||||||
|
/**
|
||||||
|
* 创建构建记录模型 * * @param record 记录 * @return 影响行数
|
||||||
|
*/
|
||||||
|
int createBuildRecordModel(@Param("record") BuildRecordModel record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建记录模型 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param executeCount 执行次数 * @param buildStatus 构建状<EFBFBD>? * @param modelVar 模型变量 * @param startTime 开始时<EFBFBD>? * @param endTime 结束时间 * @param errorInfoList 错误信息列表 * @param cancelUser 取消用户 * @param timestamps 时间<EFBFBD>? * @return 影响行数
|
||||||
|
*/
|
||||||
|
int updateBuildRecordModel(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("executeCount") int executeCount, @Param("buildStatus") BuildStatus buildStatus, @Param("modelVar") Map<String, Object> modelVar, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("errorInfoList") List<ErrorInfo> errorInfoList, @Param("cancelUser") String cancelUser, @Param("timestamps") Map<BuildTimestampType, BuildRecordTimeStamp> timestamps);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建记录模型状<EFBFBD>? * * @param projectId 项目ID * @param buildId 构建ID * @param buildStatus 构建状<EFBFBD>? * @param executeCount 执行次数 * @return 影响行数
|
||||||
|
*/
|
||||||
|
int updateBuildRecordModelStatus(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("buildStatus") BuildStatus buildStatus, @Param("executeCount") int executeCount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取构建记录模型 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param executeCount 执行次数 * @return 记录
|
||||||
|
*/
|
||||||
|
BuildRecordModel getBuildRecordModel(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("executeCount") int executeCount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取构建记录信息列表 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @return 记录信息列表
|
||||||
|
*/
|
||||||
|
List<BuildRecordInfo> getBuildRecordInfoList(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建取消用户 * * @param projectId 项目ID * @param buildId 构建ID * @param executeCount 执行次数 * @param cancelUser 取消用户 * @return 影响行数
|
||||||
|
*/
|
||||||
|
int updateBuildCancelUser(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("executeCount") int executeCount, @Param("cancelUser") String cancelUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取构建取消用户 * * @param projectId 项目ID * @param buildId 构建ID * @param executeCount 执行次数 * @return 取消用户
|
||||||
|
*/
|
||||||
|
String getBuildCancelUser(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("executeCount") int executeCount);
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.record;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildRecordTimeStamp;
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildStatus;
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.time.BuildTimestampType;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.pipeline.record.BuildRecordStage;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建记录阶段 Dao 接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface BuildRecordStageDao {
|
||||||
|
/**
|
||||||
|
* 批量保存记录 * * @param records 记录列表 * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int batchSave(@Param("records") List<BuildRecordStage> records);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param stageId 阶段ID * @param executeCount 执行次数 * @param stageVar 阶段变量 * @param buildStatus 构建状<EFBFBD>? * @param startTime 开始时<EFBFBD>? * @param endTime 结束时间 * @param timestamps 时间<EFBFBD>? * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int updateRecord(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("stageId") String stageId, @Param("executeCount") int executeCount, @Param("stageVar") Map<String, Object> stageVar, @Param("buildStatus") BuildStatus buildStatus, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("timestamps") Map<BuildTimestampType, BuildRecordTimeStamp> timestamps);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取记录列表 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param executeCount 执行次数 * @param buildStatusSet 构建状态集<EFBFBD>? * @return 构建记录阶段列表
|
||||||
|
*/
|
||||||
|
List<BuildRecordStage> getRecords(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("executeCount") int executeCount, @Param("buildStatusSet") Set<BuildStatus> buildStatusSet);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新的记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param executeCount 执行次数 * @return 构建记录阶段列表
|
||||||
|
*/
|
||||||
|
List<BuildRecordStage> getLatestRecords(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("executeCount") int executeCount);
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.record;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildRecordTimeStamp;
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildStatus;
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.time.BuildTimestampType;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.pipeline.record.BuildRecordTask;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建记录任务 Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface BuildRecordTaskDao {
|
||||||
|
/**
|
||||||
|
* 批量保存构建记录任务 * * @param records 构建记录任务列表
|
||||||
|
*/
|
||||||
|
void batchSave(@Param("records") List<BuildRecordTask> records);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param taskId 任务ID * @param executeCount 执行次数 * @param taskVar 任务变量 * @param buildStatus 构建状<EFBFBD>? * @param startTime 开始时<EFBFBD>? * @param endTime 结束时间 * @param timestamps 时间<EFBFBD>?
|
||||||
|
*/
|
||||||
|
void updateRecord(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("taskId") String taskId, @Param("executeCount") int executeCount, @Param("taskVar") Map<String, Object> taskVar, @Param("buildStatus") BuildStatus buildStatus, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("timestamps") Map<BuildTimestampType, BuildRecordTimeStamp> timestamps);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建记录状<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param executeCount 执行次数 * @param buildStatus 构建状<EFBFBD>? * @param stageId 阶段ID * @param containerId 容器ID
|
||||||
|
*/
|
||||||
|
void updateRecordStatus(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("executeCount") int executeCount, @Param("buildStatus") BuildStatus buildStatus, @Param("stageId") String stageId, @Param("containerId") String containerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取构建记录列表 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param executeCount 执行次数 * @param containerId 容器ID * @param buildStatusSet 构建状态集<EFBFBD>? * @return 构建记录任务列表
|
||||||
|
*/
|
||||||
|
List<BuildRecordTask> getRecords(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("executeCount") int executeCount, @Param("containerId") String containerId, @Param("buildStatusSet") Set<BuildStatus> buildStatusSet);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新的普通构建记录列<EFBFBD>? * * @param projectId 项目ID * @param buildId 构建ID * @param executeCount 执行次数 * @param matrixContainerIds 矩阵容器ID列表 * @param stageId 阶段ID * @return 构建记录任务列表
|
||||||
|
*/
|
||||||
|
List<BuildRecordTask> getLatestNormalRecords(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("executeCount") int executeCount, @Param("matrixContainerIds") List<String> matrixContainerIds, @Param("stageId") String stageId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新的矩阵构建记录列表 * * @param projectId 项目ID * @param buildId 构建ID * @param executeCount 执行次数 * @param matrixContainerIds 矩阵容器ID列表 * @return 构建记录任务列表
|
||||||
|
*/
|
||||||
|
List<BuildRecordTask> getLatestMatrixRecords(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("executeCount") int executeCount, @Param("matrixContainerIds") List<String> matrixContainerIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取构建记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param taskId 任务ID * @param executeCount 执行次数 * @return 构建记录任务
|
||||||
|
*/
|
||||||
|
BuildRecordTask getRecord(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("taskId") String taskId, @Param("executeCount") int executeCount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新异步状<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param taskId 任务ID * @param executeCount 执行次数 * @param asyncStatus 异步状<EFBFBD>?
|
||||||
|
*/
|
||||||
|
void updateAsyncStatus(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("taskId") String taskId, @Param("executeCount") int executeCount, @Param("asyncStatus") String asyncStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重试时清空结束时<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param taskId 任务ID * @param executeCount 执行次数
|
||||||
|
*/
|
||||||
|
void flushEndTimeWhenRetry(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("taskId") String taskId, @Param("executeCount") int executeCount);
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.record;
|
||||||
|
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildStatus;
|
||||||
|
import cd.casic.ci.process.api.engine.pojo.PipelineBuildContainer;
|
||||||
|
import cd.casic.ci.process.api.engine.pojo.PipelineBuildContainerControlOption;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public interface PipelineBuildContainerDao {
|
||||||
|
void create(
|
||||||
|
@Param("buildContainer") PipelineBuildContainer buildContainer
|
||||||
|
);
|
||||||
|
|
||||||
|
void batchSave(
|
||||||
|
@Param("containerList") Collection<PipelineBuildContainer> containerList
|
||||||
|
);
|
||||||
|
|
||||||
|
void batchUpdate(
|
||||||
|
|
||||||
|
@Param("containerList") List<PipelineBuildContainer> containerList
|
||||||
|
);
|
||||||
|
|
||||||
|
PipelineBuildContainer getByContainerId(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("stageId") String stageId,
|
||||||
|
@Param("containerId") String containerId
|
||||||
|
);
|
||||||
|
|
||||||
|
int updateStatus(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("stageId") String stageId,
|
||||||
|
@Param("containerId") String containerId,
|
||||||
|
@Param("startTime") LocalDateTime startTime,
|
||||||
|
@Param("endTime") LocalDateTime endTime,
|
||||||
|
@Param("controlOption") PipelineBuildContainerControlOption controlOption,
|
||||||
|
@Param("buildStatus") BuildStatus buildStatus
|
||||||
|
);
|
||||||
|
|
||||||
|
int updateControlOption(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("stageId") String stageId,
|
||||||
|
@Param("containerId") String containerId,
|
||||||
|
@Param("controlOption") PipelineBuildContainerControlOption controlOption
|
||||||
|
);
|
||||||
|
|
||||||
|
List<PipelineBuildContainer> listByBuildId(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("stageId") String stageId,
|
||||||
|
@Param("containsMatrix") Boolean containsMatrix,
|
||||||
|
@Param("statusSet") Set<BuildStatus> statusSet
|
||||||
|
);
|
||||||
|
|
||||||
|
int countStageContainers(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("stageId") String stageId,
|
||||||
|
@Param("onlyMatrixGroup") boolean onlyMatrixGroup
|
||||||
|
);
|
||||||
|
|
||||||
|
List<PipelineBuildContainer> listByMatrixGroupId(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("matrixGroupId") String matrixGroupId
|
||||||
|
);
|
||||||
|
|
||||||
|
Collection<String> listBuildContainerIdsInMatrixGroup(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("matrixGroupId") String matrixGroupId,
|
||||||
|
@Param("stageId") String stageId
|
||||||
|
);
|
||||||
|
|
||||||
|
int deleteBuildContainerInMatrixGroup(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("matrixGroupId") String matrixGroupId
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.record;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.engine.pojo.PipelineBuildStage;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线构建阶<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineBuildStageDao {
|
||||||
|
/**
|
||||||
|
* 创建流水线构建阶<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param stageId 阶段ID * @param stageName 阶段名称 * @param status 状<EFBFBD>? * @param startTime 开始时<EFBFBD>? * @param endTime 结束时间 * @param controlOption 控制选项 * @return 影响行数
|
||||||
|
*/
|
||||||
|
int createPipelineBuildStage(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("stageId") String stageId, @Param("stageName") String stageName, @Param("status") String status, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("controlOption") String controlOption);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量保存流水线构建阶<EFBFBD>? * * @param stages 阶段列表 * @return 影响行数
|
||||||
|
*/
|
||||||
|
int batchSavePipelineBuildStages(@Param("stages") List<PipelineBuildStage> stages);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线构建阶<EFBFBD>? * * @param projectId 项目ID * @param buildId 构建ID * @param stageId 阶段ID * @return 构建阶段
|
||||||
|
*/
|
||||||
|
PipelineBuildStage getPipelineBuildStage(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("stageId") String stageId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线构建阶段列<EFBFBD>? * * @param projectId 项目ID * @param buildId 构建ID * @param status 状<EFBFBD>? * @return 构建阶段列表
|
||||||
|
*/
|
||||||
|
List<PipelineBuildStage> listPipelineBuildStages(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("status") String status);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线构建阶<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @return 影响行数
|
||||||
|
*/
|
||||||
|
int deletePipelineBuildStages(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新流水线构建阶段状<EFBFBD>? * * @param projectId 项目ID * @param buildId 构建ID * @param stageId 阶段ID * @param status 状<EFBFBD>? * @param startTime 开始时<EFBFBD>? * @param endTime 结束时间 * @param controlOption 控制选项 * @return 影响行数
|
||||||
|
*/
|
||||||
|
int updatePipelineBuildStageStatus(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("stageId") String stageId, @Param("status") String status, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("controlOption") String controlOption);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最大阶<EFBFBD>? * * @param projectId 项目ID * @param buildId 构建ID * @return 最大阶<EFBFBD>?
|
||||||
|
*/
|
||||||
|
PipelineBuildStage getMaxPipelineBuildStage(@Param("projectId") String projectId, @Param("buildId") String buildId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据状态获取流水线构建阶段 * * @param projectId 项目ID * @param buildId 构建ID * @param statuses 状态列<EFBFBD>? * @return 构建阶段
|
||||||
|
*/
|
||||||
|
PipelineBuildStage getPipelineBuildStageByStatus(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("statuses") List<String> statuses);
|
||||||
|
}
|
@ -0,0 +1,159 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.record;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.ChannelCode;
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.BuildNo;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.PipelineCollation;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.PipelineSortType;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineBuildSummaryRecord;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineInfoRecord;
|
||||||
|
import cd.casic.ci.process.process.pojo.LatestRunningBuild;
|
||||||
|
import cd.casic.ci.process.process.pojo.PipelineFilterParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public interface PipelineBuildSummaryDao {
|
||||||
|
void create(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildNo") BuildNo buildNo
|
||||||
|
);
|
||||||
|
|
||||||
|
void delete(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineBuildSummaryRecord get(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineBuildSummaryRecord getSummaries(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineIds") Set<String> pipelineIds
|
||||||
|
);
|
||||||
|
|
||||||
|
void resetDebugInfo(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("debugBuildNo") int debugBuildNo
|
||||||
|
);
|
||||||
|
|
||||||
|
void updateBuildNo(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildNo") int buildNo,
|
||||||
|
@Param("debug") boolean debug
|
||||||
|
);
|
||||||
|
|
||||||
|
Integer getBuildNo(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("debug") boolean debug
|
||||||
|
);
|
||||||
|
|
||||||
|
int updateBuildNum(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("debug") boolean debug,
|
||||||
|
@Param("buildNum") int buildNum,
|
||||||
|
@Param("buildNumAlias") String buildNumAlias
|
||||||
|
);
|
||||||
|
|
||||||
|
long listPipelineInfoBuildSummaryCount(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("channelCode") ChannelCode channelCode,
|
||||||
|
@Param("pipelineIds") Collection<String> pipelineIds,
|
||||||
|
@Param("viewId") String viewId,
|
||||||
|
@Param("favorPipelines") List<String> favorPipelines,
|
||||||
|
@Param("authPipelines") List<String> authPipelines,
|
||||||
|
@Param("pipelineFilterParamList") List<PipelineFilterParam> pipelineFilterParamList,
|
||||||
|
@Param("permissionFlag") Boolean permissionFlag,
|
||||||
|
@Param("includeDelete") Boolean includeDelete,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineInfoRecord listPipelineInfoBuildSummary(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("channelCode") ChannelCode channelCode,
|
||||||
|
@Param("sortType") PipelineSortType sortType,
|
||||||
|
@Param("pipelineIds") Collection<String> pipelineIds,
|
||||||
|
@Param("favorPipelines") List<String> favorPipelines,
|
||||||
|
@Param("authPipelines") List<String> authPipelines,
|
||||||
|
@Param("viewId") String viewId,
|
||||||
|
@Param("pipelineFilterParamList") List<PipelineFilterParam> pipelineFilterParamList,
|
||||||
|
@Param("permissionFlag") Boolean permissionFlag,
|
||||||
|
@Param("page") Integer page,
|
||||||
|
@Param("pageSize") Integer pageSize,
|
||||||
|
@Param("pageOffsetNum") Integer pageOffsetNum,
|
||||||
|
@Param("includeDelete") Boolean includeDelete,
|
||||||
|
@Param("collation") PipelineCollation collation,
|
||||||
|
@Param("userId") String userId
|
||||||
|
);
|
||||||
|
|
||||||
|
void updateQueueCount(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("queueIncrement") int queueIncrement
|
||||||
|
);
|
||||||
|
|
||||||
|
int startLatestRunningBuild(
|
||||||
|
|
||||||
|
@Param("latestRunningBuild") LatestRunningBuild latestRunningBuild,
|
||||||
|
@Param("executeCount") int executeCount,
|
||||||
|
@Param("debug") boolean debug
|
||||||
|
);
|
||||||
|
|
||||||
|
void updateCurrentBuildTask(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("currentTaskId") String currentTaskId,
|
||||||
|
@Param("currentTaskName") String currentTaskName
|
||||||
|
);
|
||||||
|
|
||||||
|
void finishLatestRunningBuild(
|
||||||
|
@Param("latestRunningBuild") LatestRunningBuild latestRunningBuild,
|
||||||
|
@Param("isStageFinish") boolean isStageFinish,
|
||||||
|
@Param("debug") boolean debug
|
||||||
|
);
|
||||||
|
|
||||||
|
void updateRunningCount(
|
||||||
|
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("buildId") String buildId,
|
||||||
|
@Param("runningIncrement") int runningIncrement,
|
||||||
|
@Param("debug") boolean debug
|
||||||
|
);
|
||||||
|
|
||||||
|
TPipelineBuildSummaryRecord listSummaryByPipelineIds(
|
||||||
|
|
||||||
|
@Param("pipelineIds") Collection<String> pipelineIds,
|
||||||
|
@Param("projectId") String projectId
|
||||||
|
);
|
||||||
|
|
||||||
|
boolean fixPipelineSummaryCount(
|
||||||
|
@Param("projectId") String projectId,
|
||||||
|
@Param("pipelineId") String pipelineId,
|
||||||
|
@Param("finishCount") int finishCount,
|
||||||
|
@Param("runningCount") Integer runningCount,
|
||||||
|
@Param("queueCount") Integer queueCount
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.record;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.BuildStatus;
|
||||||
|
import cd.casic.ci.process.api.engine.pojo.PipelineBuildTask;
|
||||||
|
import cd.casic.ci.process.process.pojo.UpdateTaskInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线构建任<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineBuildTaskDao {
|
||||||
|
/**
|
||||||
|
* 创建流水线构建任<EFBFBD>? * * @param buildTask 构建任务信息
|
||||||
|
*/
|
||||||
|
void create(@Param("buildTask") PipelineBuildTask buildTask);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量保存流水线构建任<EFBFBD>? * * @param taskList 构建任务列表
|
||||||
|
*/
|
||||||
|
void batchSave(@Param("taskList") Collection<PipelineBuildTask> taskList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新流水线构建任<EFBFBD>? * * @param taskList 构建任务列表
|
||||||
|
*/
|
||||||
|
void batchUpdate(@Param("taskList") List<PipelineBuildTask> taskList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线构建任<EFBFBD>? * * @param projectId 项目ID * @param buildId 构建ID * @param taskId 任务ID * @param stepId 步骤ID * @param executeCount 执行次数 * @return 构建任务信息
|
||||||
|
*/
|
||||||
|
PipelineBuildTask get(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("taskId") String taskId, @Param("stepId") String stepId, @Param("executeCount") Integer executeCount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取任务状<EFBFBD>? * * @param projectId 项目ID * @param buildId 构建ID * @param taskId 任务ID * @return 任务状<EFBFBD>?
|
||||||
|
*/
|
||||||
|
Integer getTaskStatus(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("taskId") String taskId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据构建ID获取任务列表 * * @param projectId 项目ID * @param buildId 构建ID * @return 任务列表
|
||||||
|
*/
|
||||||
|
Collection<PipelineBuildTask> getByBuildId(@Param("projectId") String projectId, @Param("buildId") String buildId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条件获取任务列表 * * @param projectId 项目ID * @param buildId 构建ID * @param containerId 容器ID * @param statusSet 状态集<EFBFBD>? * @return 任务列表
|
||||||
|
*/
|
||||||
|
List<PipelineBuildTask> getTasksInCondition(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("containerId") String containerId, @Param("statusSet") Collection<BuildStatus> statusSet);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除构建任务 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param containerId 容器ID * @return 删除数量
|
||||||
|
*/
|
||||||
|
int deleteBuildTasksByContainerSeqId(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("containerId") String containerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新子构建ID * * @param projectId 项目ID * @param buildId 构建ID * @param taskId 任务ID * @param subBuildId 子构建ID * @param subProjectId 子项目ID * @return 更新数量
|
||||||
|
*/
|
||||||
|
int updateSubBuildId(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("taskId") String taskId, @Param("subBuildId") String subBuildId, @Param("subProjectId") String subProjectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新任务信息 * * @param updateTaskInfo 更新任务信息
|
||||||
|
*/
|
||||||
|
void updateTaskInfo(@Param("updateTaskInfo") UpdateTaskInfo updateTaskInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据构建ID统计任务数量 * * @param projectId 项目ID * @param buildIds 构建ID列表 * @return 统计结果
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> countGroupByBuildId(@Param("projectId") String projectId, @Param("buildIds") Collection<String> buildIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新任务参数 * * @param projectId 项目ID * @param buildId 构建ID * @param taskId 任务ID * @param taskParam 任务参数 * @return 更新数量
|
||||||
|
*/
|
||||||
|
int updateTaskParam(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("taskId") String taskId, @Param("taskParam") String taskParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取任务列表 * * @param projectId 项目ID * @param buildId 构建ID * @return 任务列表
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> list(@Param("projectId") String projectId, @Param("buildId") String buildId);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.record;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.BuildParameters;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线构建变<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineBuildVarDao {
|
||||||
|
/**
|
||||||
|
* 保存构建变量 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param name 变量<EFBFBD>? * @param value 变量<EFBFBD>? * @param readOnly 是否只读
|
||||||
|
*/
|
||||||
|
void save(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("name") String name, @Param("value") Object value, @Param("readOnly") Boolean readOnly);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新构建变量 * * @param projectId 项目ID * @param buildId 构建ID * @param name 变量<EFBFBD>? * @param value 变量<EFBFBD>? * @param valueType 变量类型 * @param rewriteReadOnly 是否重写只读 * @return 更新数量
|
||||||
|
*/
|
||||||
|
int update(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("name") String name, @Param("value") Object value, @Param("valueType") String valueType, @Param("rewriteReadOnly") Boolean rewriteReadOnly);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取构建变量 * * @param projectId 项目ID * @param buildId 构建ID * @param keys 变量名集<EFBFBD>? * @return 变量映射
|
||||||
|
*/
|
||||||
|
Map<String, String> getVars(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("keys") Set<String> keys);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取带类型的构建变量 * * @param projectId 项目ID * @param buildId 构建ID * @param key 变量<EFBFBD>? * @return 构建参数列表
|
||||||
|
*/
|
||||||
|
List<BuildParameters> getVarsWithType(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("key") String key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除构建变量 * * @param projectId 项目ID * @param buildId 构建ID * @param varName 变量<EFBFBD>? * @param readOnly 是否只读 * @return 删除数量
|
||||||
|
*/
|
||||||
|
int deleteBuildVar(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("varName") String varName, @Param("readOnly") Boolean readOnly);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量保存构建变量 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param variables 构建参数列表
|
||||||
|
*/
|
||||||
|
void batchSave(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("variables") List<BuildParameters> variables);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新构建变量 * * @param projectId 项目ID * @param buildId 构建ID * @param variables 构建参数列表
|
||||||
|
*/
|
||||||
|
void batchUpdate(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("variables") List<BuildParameters> variables);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除构建变量 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID
|
||||||
|
*/
|
||||||
|
void deleteBuildVars(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线构建变<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID
|
||||||
|
*/
|
||||||
|
void deletePipelineBuildVar(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据关键字模糊查询变<EFBFBD>? * * @param projectId 项目ID * @param buildId 构建ID * @param readOnly 是否只读 * @param likeStr 模糊匹配字符<EFBFBD>? * @return 变量值集<EFBFBD>?
|
||||||
|
*/
|
||||||
|
Set<String> fetchVarByLikeKey(@Param("projectId") String projectId, @Param("buildId") String buildId, @Param("readOnly") Boolean readOnly, @Param("likeStr") String likeStr);
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.report;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.process.pojo.Report;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告 Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface ReportDao {
|
||||||
|
/**
|
||||||
|
* 获取原子信息 * * @param buildId 构建ID * @param taskId 任务ID * @return 原子信息
|
||||||
|
*/
|
||||||
|
Map<String, String> getAtomInfo(@Param("buildId") String buildId, @Param("taskId") String taskId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建报告 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param elementId 元素ID * @param indexFile 索引文件 * @param name 名称 * @param type 类型 * @param atomCode 原子代码 * @param taskName 任务名称 * @param id 记录ID * @return 记录ID
|
||||||
|
*/
|
||||||
|
long createReport(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("elementId") String elementId, @Param("indexFile") String indexFile, @Param("name") String name, @Param("type") String type, @Param("atomCode") String atomCode, @Param("taskName") String taskName, @Param("id") Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取报告 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param elementId 元素ID * @return 报告
|
||||||
|
*/
|
||||||
|
Report getReport(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("elementId") String elementId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取报告列表 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @return 报告列表
|
||||||
|
*/
|
||||||
|
List<Report> getReportList(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除报告 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param buildId 构建ID * @param elementId 元素ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int deleteReport(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("buildId") String buildId, @Param("elementId") String elementId);
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.setting;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.setting.PipelineSetting;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineSettingRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线设<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineSettingDao {
|
||||||
|
/**
|
||||||
|
* 获取流水线设<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @return 流水线设<EFBFBD>?
|
||||||
|
*/
|
||||||
|
PipelineSetting getSetting(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线设<EFBFBD>? * * @param projectId 项目ID * @param name 设置名称 * @param pipelineId 流水线ID * @param isTemplate 是否模板 * @return 流水线设置列<EFBFBD>?
|
||||||
|
*/
|
||||||
|
List<PipelineSetting> getSetting(@Param("projectId") String projectId, @Param("name") String name, @Param("pipelineId") String pipelineId, @Param("isTemplate") Boolean isTemplate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线设置列<EFBFBD>? * * @param pipelineIds 流水线ID列表 * @param projectId 项目ID * @return 流水线设置列<EFBFBD>?
|
||||||
|
*/
|
||||||
|
List<PipelineSetting> getSettings(@Param("pipelineIds") Set<String> pipelineIds, @Param("projectId") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取简单的流水线设<EFBFBD>? * * @param pipelineIds 流水线ID列表 * @param projectId 项目ID * @return 简单的流水线设<EFBFBD>?
|
||||||
|
*/
|
||||||
|
// TODO
|
||||||
|
// Result<Record4<String, String, Integer, String>> getSimpleSettings(@Param("pipelineIds") Set<String> pipelineIds, @Param("projectId") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线设置数<EFBFBD>? * * @param name 设置名称 * @param projectId 项目ID * @param pipelineId 流水线ID * @param isTemplate 是否模板 * @return 设置数量
|
||||||
|
*/
|
||||||
|
Integer getSettingCount(@Param("name") String name, @Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("isTemplate") Boolean isTemplate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线设<EFBFBD>? * * @param setting 流水线设<EFBFBD>? * @return 影响行数
|
||||||
|
*/
|
||||||
|
int create(PipelineSetting setting);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新流水线设<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @param name 设置名称 * @param desc 描述 * @return 更新后的流水线设<EFBFBD>?
|
||||||
|
*/
|
||||||
|
PipelineSetting updateSetting(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("name") String name, @Param("desc") String desc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新模板引用的设置名<EFBFBD>? * * @param pipelineIdList 流水线ID列表 * @param name 设置名称
|
||||||
|
*/
|
||||||
|
void updateSettingName(@Param("pipelineIdList") List<String> pipelineIdList, @Param("name") String name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新流水线设<EFBFBD>? * * @param records 流水线设置记录列<EFBFBD>?
|
||||||
|
*/
|
||||||
|
void batchUpdate(List<TPipelineSettingRecord> records);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线设<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @return 影响行数
|
||||||
|
*/
|
||||||
|
int delete(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.setting;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.process.pojo.setting.PipelineSettingVersion;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineSettingVersionRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线设置版<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineSettingVersionDao {
|
||||||
|
/**
|
||||||
|
* 获取流水线设置版<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @param version 版本<EFBFBD>? * @return 流水线设置版<EFBFBD>?
|
||||||
|
*/
|
||||||
|
PipelineSettingVersion getSettingVersion(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("version") Integer version);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新的流水线设置版<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @return 最新的流水线设置版<EFBFBD>?
|
||||||
|
*/
|
||||||
|
PipelineSettingVersion getLatestSettingVersion(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线设置版<EFBFBD>? * * @param setting 流水线设<EFBFBD>? * @return 影响行数
|
||||||
|
*/
|
||||||
|
int create(PipelineSettingVersion setting);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新流水线设置版<EFBFBD>? * * @param setting 流水线设<EFBFBD>? * @return 影响行数
|
||||||
|
*/
|
||||||
|
int update(PipelineSettingVersion setting);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新流水线设置版<EFBFBD>? * * @param records 流水线设置版本记录列<EFBFBD>?
|
||||||
|
*/
|
||||||
|
void batchUpdate(List<TPipelineSettingVersionRecord> records);
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.template;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineFavorRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户收藏流水线Mapper接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineFavorDao {
|
||||||
|
/**
|
||||||
|
* 保存用户收藏 * * @param userId 用户ID * @param projectId 项目ID * @param pipelineId 流水线ID * @param id 主键ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int save(@Param("userId") String userId, @Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("id") Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户收藏 * * @param userId 用户ID * @param projectId 项目ID * @param pipelineId 流水线ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int delete(@Param("userId") String userId, @Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线的所有用户收<EFBFBD>? * * @param projectId 项目ID * @param pipelineId 流水线ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int deleteAllUserFavorByPipeline(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户收藏的流水线列表 * * @param userId 用户ID * @param projectId 项目ID * @return 收藏记录列表
|
||||||
|
*/
|
||||||
|
TPipelineFavorRecord list(@Param("userId") String userId, @Param("projectId") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户所有收藏的流水线列<EFBFBD>? * * @param userId 用户ID * @return 收藏记录列表
|
||||||
|
*/
|
||||||
|
TPipelineFavorRecord listByUserId(@Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计用户收藏的流水线数量 * * @param projectId 项目ID * @param userId 用户ID * @return 收藏数量
|
||||||
|
*/
|
||||||
|
int countByUserId(@Param("projectId") String projectId, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户收藏的指定流水线 * * @param userId 用户ID * @param projectId 项目ID * @param pipelineId 流水线ID * @return 收藏记录列表
|
||||||
|
*/
|
||||||
|
TPipelineFavorRecord listByPipelineId(@Param("userId") String userId, @Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最大ID * * @return 最大ID
|
||||||
|
*/
|
||||||
|
long getMaxId();
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package cd.casic.ci.process.process.dal.mapper.template;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.pojo.setting.PipelineSetting;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.setting.PipelineSettingVersion;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineSettingVersionRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线设置版本Mapper接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineSettingVersionDao {
|
||||||
|
/**
|
||||||
|
* 保存流水线设置版<EFBFBD>? * @param dslContext DSL上下<EFBFBD>? * @param setting 流水线设<EFBFBD>? * @param version 版本<EFBFBD>? * @param isTemplate 是否为模<EFBFBD>? * @param id ID * @return 影响行数
|
||||||
|
*/
|
||||||
|
int saveSetting(@Param("setting") PipelineSetting setting, @Param("version") int version, @Param("isTemplate") boolean isTemplate, @Param("id") Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流水线设置版<EFBFBD>? * @param projectId 项目ID * @param pipelineId 流水线ID * @param version 版本<EFBFBD>? * @return 流水线设置版<EFBFBD>?
|
||||||
|
*/
|
||||||
|
PipelineSettingVersion getSettingVersion(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("version") int version);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新的流水线设置版<EFBFBD>? * @param projectId 项目ID * @param pipelineId 流水线ID * @return 最新的流水线设置版<EFBFBD>?
|
||||||
|
*/
|
||||||
|
PipelineSettingVersion getLatestSettingVersion(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据流水线ID列表获取设置版本 * @param pipelineIds 流水线ID列表 * @return 流水线设置版本列<EFBFBD>?
|
||||||
|
*/
|
||||||
|
List<PipelineSettingVersion> getSettingByPipelineIds(@Param("pipelineIds") List<String> pipelineIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新流水线设置版<EFBFBD>? * @param records 流水线设置版本记录列<EFBFBD>?
|
||||||
|
*/
|
||||||
|
void batchUpdate(@Param("records") List<TPipelineSettingVersionRecord> records);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除所有版本的流水线设<EFBFBD>? * @param projectId 项目ID * @param pipelineId 流水线ID * @return 影响行数
|
||||||
|
*/
|
||||||
|
int deleteAllVersion(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除指定版本的流水线设置 * @param projectId 项目ID * @param pipelineId 流水线ID * @param version 版本<EFBFBD>? * @return 影响行数
|
||||||
|
*/
|
||||||
|
int deleteByVer(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("version") int version);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除早期版本的流水线设置 * @param projectId 项目ID * @param pipelineId 流水线ID * @param currentVersion 当前版本 * @param maxPipelineResNum 最大流水线资源<EFBFBD>? * @return 影响行数
|
||||||
|
*/
|
||||||
|
int deleteEarlyVersion(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("currentVersion") int currentVersion, @Param("maxPipelineResNum") int maxPipelineResNum);
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.template;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TTemplateInstanceBaseRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板实例基础 Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface TemplateInstanceBaseDao {
|
||||||
|
/**
|
||||||
|
* 创建模板实例基础记录 * * @param projectId 项目ID * @param templateId 模板ID * @param name 名称 * @param userId 用户ID * @return 模板实例基础记录ID
|
||||||
|
*/
|
||||||
|
long createTemplateInstanceBase(@Param("projectId") String projectId, @Param("templateId") String templateId, @Param("name") String name, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新模板实例基础记录 * * @param instanceId 实例ID * @param name 名称 * @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void updateTemplateInstanceBase(@Param("instanceId") String instanceId, @Param("name") String name, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除模板实例基础记录 * * @param instanceId 实例ID
|
||||||
|
*/
|
||||||
|
void deleteTemplateInstanceBase(@Param("instanceId") String instanceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取模板实例基础记录列表 * * @param projectId 项目ID * @return 模板实例基础记录列表
|
||||||
|
*/
|
||||||
|
List<TTemplateInstanceBaseRecord> getTemplateInstanceBaseList(@Param("projectId") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取模板实例基础记录 * * @param instanceId 实例ID * @return 模板实例基础记录
|
||||||
|
*/
|
||||||
|
TTemplateInstanceBaseRecord getTemplateInstanceBase(@Param("instanceId") String instanceId);
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.template;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.process.pojo.template.TemplateInstanceUpdate;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板实例<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface TemplateInstanceItemDao {
|
||||||
|
/**
|
||||||
|
* 创建模板实例<EFBFBD>? * * @param projectId 项目ID * @param baseId 基础ID * @param instances 实例列表 * @param status 状<EFBFBD>? * @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void createTemplateInstanceItem(@Param("projectId") String projectId, @Param("baseId") String baseId, @Param("instances") List<TemplateInstanceUpdate> instances, @Param("status") String status, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取模板实例项列<EFBFBD>? * * @param status 状<EFBFBD>? * @param descFlag 是否降序 * @param page 页码 * @param pageSize 每页大小 * @return 模板实例项列<EFBFBD>?
|
||||||
|
*/
|
||||||
|
List<TemplateInstanceUpdate> getTemplateInstanceItemList(@Param("status") String status, @Param("descFlag") boolean descFlag, @Param("page") int page, @Param("pageSize") int pageSize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据基础ID获取模板实例项列<EFBFBD>? * * @param projectId 项目ID * @param baseId 基础ID * @param descFlag 是否降序 * @param page 页码 * @param pageSize 每页大小 * @return 模板实例项列<EFBFBD>?
|
||||||
|
*/
|
||||||
|
List<TemplateInstanceUpdate> getTemplateInstanceItemListByBaseId(@Param("projectId") String projectId, @Param("baseId") String baseId, @Param("descFlag") boolean descFlag, @Param("page") int page, @Param("pageSize") int pageSize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据基础ID获取模板实例项数<EFBFBD>? * * @param projectId 项目ID * @param baseId 基础ID * @return 数量
|
||||||
|
*/
|
||||||
|
long getTemplateInstanceItemCountByBaseId(@Param("projectId") String projectId, @Param("baseId") String baseId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据流水线ID列表获取模板实例项列<EFBFBD>? * * @param projectId 项目ID * @param pipelineIds 流水线ID列表 * @return 模板实例项列<EFBFBD>?
|
||||||
|
*/
|
||||||
|
List<TemplateInstanceUpdate> getTemplateInstanceItemListByPipelineIds(@Param("projectId") String projectId, @Param("pipelineIds") Collection<String> pipelineIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据基础ID删除模板实例<EFBFBD>? * * @param projectId 项目ID * @param baseId 基础ID
|
||||||
|
*/
|
||||||
|
void deleteByBaseId(@Param("projectId") String projectId, @Param("baseId") String baseId);
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 钃濋哺鎸佺画闆嗘垚骞冲彴 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 钃濋哺鎸佺画闆嗘垚骞冲彴 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.trigger;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineTimerBranchRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public
|
||||||
|
interface PipelineTimerBranchDao {
|
||||||
|
|
||||||
|
long create(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("timerId") String timerId, @Param("branch") String branch, @Param("userId") String userId);
|
||||||
|
|
||||||
|
|
||||||
|
int update(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("timerId") String timerId, @Param("branch") String branch, @Param("userId") String userId);
|
||||||
|
|
||||||
|
|
||||||
|
int delete(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("timerId") String timerId, @Param("branch") String branch);
|
||||||
|
|
||||||
|
|
||||||
|
List<TPipelineTimerBranchRecord> list(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("timerId") String timerId);
|
||||||
|
|
||||||
|
TPipelineTimerBranchRecord get(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("timerId") String timerId, @Param("branch") String branch);
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 钃濋哺鎸佺画闆嗘垚骞冲彴 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 钃濋哺鎸佺画闆嗘垚骞冲彴 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.trigger;
|
||||||
|
|
||||||
|
import cd.casic.ci.common.pipeline.enums.ChannelCode;
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineTimerRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 娴佹按绾垮畾鏃跺櫒 Dao 鎺ュ彛
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface PipelineTimerDao {
|
||||||
|
|
||||||
|
int save(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("userId") String userId, @Param("crontabExpression") String crontabExpression, @Param("channelCode") ChannelCode channelCode, @Param("repoHashId") String repoHashId, @Param("branchs") String branchs, @Param("noScm") Boolean noScm);
|
||||||
|
|
||||||
|
|
||||||
|
TPipelineTimerRecord get(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
|
||||||
|
int delete(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
List<TPipelineTimerRecord> list(@Param("offset") int offset, @Param("limit") int limit);
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 钃濋哺鎸佺画闆嗘垚骞冲彴 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 钃濋哺鎸佺画闆嗘垚骞冲彴 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.trigger;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.api.process.pojo.trigger.PipelineTriggerDetail;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.trigger.PipelineTriggerEvent;
|
||||||
|
import cd.casic.ci.process.api.process.pojo.trigger.PipelineTriggerEventVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
|
public interface PipelineTriggerEventDao {
|
||||||
|
|
||||||
|
int save(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("eventType") String eventType, @Param("eventId") String eventId, @Param("status") String status, @Param("errorMsg") String errorMsg);
|
||||||
|
|
||||||
|
|
||||||
|
int saveDetail(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("eventId") String eventId, @Param("detail") String detail);
|
||||||
|
|
||||||
|
|
||||||
|
List<PipelineTriggerEventVo> listTriggerDetail(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("eventType") String eventType, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("status") String status, @Param("page") int page, @Param("pageSize") int pageSize);
|
||||||
|
|
||||||
|
|
||||||
|
int countTriggerDetail(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("eventType") String eventType, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("status") String status);
|
||||||
|
|
||||||
|
|
||||||
|
List<PipelineTriggerEvent> listByEventIds(@Param("eventIds") Set<String> eventIds);
|
||||||
|
|
||||||
|
|
||||||
|
int updateStatus(@Param("eventId") String eventId, @Param("status") String status, @Param("errorMsg") String errorMsg);
|
||||||
|
|
||||||
|
|
||||||
|
int delete(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("beforeTime") LocalDateTime beforeTime);
|
||||||
|
|
||||||
|
|
||||||
|
List<PipelineTriggerDetail> listTriggerDetail(@Param("pipelineName") String pipelineName, @Param("pipelineId") String pipelineId, @Param("eventId") Long eventId, @Param("eventSource") String eventSource, @Param("projectId") String projectId, @Param("eventType") String eventType, @Param("reason") String reason, @Param("triggerType") String triggerType, @Param("triggerUser") String triggerUser, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("limit") Integer limit, @Param("offset") Integer offset);
|
||||||
|
|
||||||
|
|
||||||
|
long countTriggerDetail(@Param("pipelineName") String pipelineName, @Param("pipelineId") String pipelineId, @Param("eventId") Long eventId, @Param("eventSource") String eventSource, @Param("projectId") String projectId, @Param("eventType") String eventType, @Param("reason") String reason, @Param("triggerType") String triggerType, @Param("triggerUser") String triggerUser, @Param("startTime") Long startTime, @Param("endTime") Long endTime);
|
||||||
|
|
||||||
|
|
||||||
|
Set<Long> getEventIdsByEvent(@Param("eventId") Long eventId, @Param("eventSource") String eventSource, @Param("projectId") String projectId, @Param("eventType") String eventType, @Param("triggerType") String triggerType, @Param("triggerUser") String triggerUser, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("limit") Integer limit, @Param("offset") Integer offset);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.view;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineViewRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线视<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineViewDao {
|
||||||
|
/**
|
||||||
|
* 创建流水线视<EFBFBD>? * * @param projectId 项目ID * @param name 视图名称 * @param isProject 是否项目视图 * @param filterByPipelineName 按流水线名称过滤 * @param filterByCreator 按创建者过<EFBFBD>? * @param userId 用户ID * @param id 视图ID * @return 视图ID
|
||||||
|
*/
|
||||||
|
Long create(@Param("projectId") String projectId, @Param("name") String name, @Param("isProject") Boolean isProject, @Param("filterByPipelineName") String filterByPipelineName, @Param("filterByCreator") String filterByCreator, @Param("userId") String userId, @Param("id") Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建流水线视<EFBFBD>? * * @param projectId 项目ID * @param name 视图名称 * @param logic 逻辑 * @param isProject 是否项目视图 * @param filters 过滤<EFBFBD>? * @param userId 用户ID * @param id 视图ID * @param viewType 视图类型 * @return 视图ID
|
||||||
|
*/
|
||||||
|
Long createWithLogic(@Param("projectId") String projectId, @Param("name") String name, @Param("logic") String logic, @Param("isProject") Boolean isProject, @Param("filters") String filters, @Param("userId") String userId, @Param("id") Long id, @Param("viewType") Integer viewType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新流水线视<EFBFBD>? * * @param projectId 项目ID * @param viewId 视图ID * @param name 视图名称 * @param isProject 是否项目视图 * @param filterByPipelineName 按流水线名称过滤 * @param filterByCreator 按创建者过<EFBFBD>? * @return 是否更新成功
|
||||||
|
*/
|
||||||
|
Boolean update(@Param("projectId") String projectId, @Param("viewId") Long viewId, @Param("name") String name, @Param("isProject") Boolean isProject, @Param("filterByPipelineName") String filterByPipelineName, @Param("filterByCreator") String filterByCreator);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新流水线视<EFBFBD>? * * @param projectId 项目ID * @param viewId 视图ID * @param name 视图名称 * @param logic 逻辑 * @param isProject 是否项目视图 * @param filters 过滤<EFBFBD>? * @param viewType 视图类型 * @return 是否更新成功
|
||||||
|
*/
|
||||||
|
Boolean updateWithLogic(@Param("projectId") String projectId, @Param("viewId") Long viewId, @Param("name") String name, @Param("logic") String logic, @Param("isProject") Boolean isProject, @Param("filters") String filters, @Param("viewType") Integer viewType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流水线视<EFBFBD>? * * @param projectId 项目ID * @param viewId 视图ID * @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean delete(@Param("projectId") String projectId, @Param("viewId") Long viewId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下的所有视<EFBFBD>? * * @param projectId 项目ID * @return 视图列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewRecord> list(@Param("projectId") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下指定类型的视图 * * @param projectId 项目ID * @param viewType 视图类型 * @return 视图列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewRecord> listByType(@Param("projectId") String projectId, @Param("viewType") Integer viewType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户可见的视图列<EFBFBD>? * * @param userId 用户ID * @param projectId 项目ID * @param isProject 是否项目视图 * @param viewType 视图类型 * @return 视图列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewRecord> listUserViews(@Param("userId") String userId, @Param("projectId") String projectId, @Param("isProject") Boolean isProject, @Param("viewType") Integer viewType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定ID的视图列<EFBFBD>? * * @param projectId 项目ID * @param viewIds 视图ID列表 * @param viewType 视图类型 * @return 视图列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewRecord> listByIds(@Param("projectId") String projectId, @Param("viewIds") List<Long> viewIds, @Param("viewType") Integer viewType);
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.view;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineViewGroupRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线视图分<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineViewGroupDao {
|
||||||
|
/**
|
||||||
|
* 创建视图分组 * * @param projectId 项目ID * @param viewId 视图ID * @param pipelineId 流水线ID * @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void create(@Param("projectId") String projectId, @Param("viewId") Long viewId, @Param("pipelineId") String pipelineId, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取视图分组列表 * * @param viewId 视图ID * @param offset 偏移<EFBFBD>? * @param limit 限制数量 * @return 视图分组列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewGroupRecord> list(@Param("viewId") Long viewId, @Param("offset") Integer offset, @Param("limit") Integer limit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取视图ID列表对应的分<EFBFBD>? * * @param projectId 项目ID * @param viewIds 视图ID列表 * @return 视图分组列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewGroupRecord> listByViewIds(@Param("projectId") String projectId, @Param("viewIds") List<Long> viewIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定视图的分<EFBFBD>? * * @param projectId 项目ID * @param viewId 视图ID * @return 视图分组列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewGroupRecord> listByViewId(@Param("projectId") String projectId, @Param("viewId") Long viewId);
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.view;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineViewTopRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线视图置<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineViewTopDao {
|
||||||
|
/**
|
||||||
|
* 添加置顶视图 * * @param projectId 项目ID * @param viewId 视图ID * @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void add(@Param("projectId") String projectId, @Param("viewId") Long viewId, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移除置顶视图 * * @param projectId 项目ID * @param viewId 视图ID * @param userId 用户ID
|
||||||
|
*/
|
||||||
|
void remove(@Param("projectId") String projectId, @Param("viewId") Long viewId, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户置顶的视图列<EFBFBD>? * * @param projectId 项目ID * @param userId 用户ID * @return 置顶视图列表
|
||||||
|
*/
|
||||||
|
List<TPipelineViewTopRecord> list(@Param("projectId") String projectId, @Param("userId") String userId);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.view;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineViewUserLastViewRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线视图用户最后查看记<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineViewUserLastViewDao {
|
||||||
|
/**
|
||||||
|
* 获取用户最后查看的视图 * * @param userId 用户ID * @param projectId 项目ID * @return 最后查看记<EFBFBD>?
|
||||||
|
*/
|
||||||
|
TPipelineViewUserLastViewRecord get(@Param("userId") String userId, @Param("projectId") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存用户最后查看的视图 * * @param userId 用户ID * @param projectId 项目ID * @param viewId 视图ID * @return 影响行数
|
||||||
|
*/
|
||||||
|
int save(@Param("userId") String userId, @Param("projectId") String projectId, @Param("viewId") String viewId);
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.view;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineViewUserSettingsRecord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线视图用户设<EFBFBD>?Dao 接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository
|
||||||
|
public interface PipelineViewUserSettingsDao {
|
||||||
|
/**
|
||||||
|
* 获取用户设置 * * @param userId 用户ID * @param projectId 项目ID * @return 用户设置记录
|
||||||
|
*/
|
||||||
|
TPipelineViewUserSettingsRecord get(@Param("userId") String userId, @Param("projectId") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建用户设置 * * @param userId 用户ID * @param projectId 项目ID * @param settings 设置内容
|
||||||
|
*/
|
||||||
|
void create(@Param("userId") String userId, @Param("projectId") String projectId, @Param("settings") String settings);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户设置 * * @param userId 用户ID * @param projectId 项目ID * @param settings 设置内容
|
||||||
|
*/
|
||||||
|
void update(@Param("userId") String userId, @Param("projectId") String projectId, @Param("settings") String settings);
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.webhook;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.pojo.PipelineWebHookQueue;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线WebHook队列 Dao 接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineWebHookQueueDao {
|
||||||
|
/**
|
||||||
|
* 保存流水线WebHook队列 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param sourceProjectId 源项目ID * @param sourceRepoName 源仓库名<EFBFBD>? * @param sourceBranch 源分<EFBFBD>? * @param targetProjectId 目标项目ID * @param targetRepoName 目标仓库名称 * @param targetBranch 目标分支 * @param buildId 构建ID * @param id ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int save(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("sourceProjectId") Long sourceProjectId, @Param("sourceRepoName") String sourceRepoName, @Param("sourceBranch") String sourceBranch, @Param("targetProjectId") Long targetProjectId, @Param("targetRepoName") String targetRepoName, @Param("targetBranch") String targetBranch, @Param("buildId") String buildId, @Param("id") Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取WebHook构建历史 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param sourceProjectId 源项目ID * @param sourceBranch 源分<EFBFBD>? * @param targetProjectId 目标项目ID * @param targetBranch 目标分支 * @return WebHook队列列表
|
||||||
|
*/
|
||||||
|
List<PipelineWebHookQueue> getWebHookBuildHistory(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("sourceProjectId") Long sourceProjectId, @Param("sourceBranch") String sourceBranch, @Param("targetProjectId") Long targetProjectId, @Param("targetBranch") String targetBranch);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取WebHook队列 * * @param projectId 项目ID * @param buildId 构建ID * @return WebHook队列
|
||||||
|
*/
|
||||||
|
PipelineWebHookQueue get(@Param("projectId") String projectId, @Param("buildId") String buildId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据构建ID删除WebHook队列 * * @param projectId 项目ID * @param buildIds 构建ID列表 * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int deleteByBuildIds(@Param("projectId") String projectId, @Param("buildIds") List<String> buildIds);
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.webhook;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineWebhookRevisionRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线Webhook修订版本 Dao 接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineWebhookRevisionDao {
|
||||||
|
/**
|
||||||
|
* 创建Webhook修订版本记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param revisionId 修订版本ID * @param content 内容 * @param userId 用户ID * @return Webhook修订版本记录ID
|
||||||
|
*/
|
||||||
|
long create(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("revisionId") String revisionId, @Param("content") String content, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新Webhook修订版本记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param revisionId 修订版本ID * @param content 内容 * @param userId 用户ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int update(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("revisionId") String revisionId, @Param("content") String content, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除Webhook修订版本记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param revisionId 修订版本ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int delete(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("revisionId") String revisionId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取Webhook修订版本记录列表 * * @param projectId 项目ID * @param pipelineId 流水线ID * @return Webhook修订版本记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineWebhookRevisionRecord> list(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取Webhook修订版本记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param revisionId 修订版本ID * @return Webhook修订版本记录
|
||||||
|
*/
|
||||||
|
TPipelineWebhookRevisionRecord get(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("revisionId") String revisionId);
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
/* * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. * * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. * * A copy of the MIT License is included in this file. * * * Terms of the MIT License: * --------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
package cd.casic.ci.process.process.dal.mapper.webhook;
|
||||||
|
|
||||||
|
import cd.casic.ci.process.process.dataObject.TPipelineWebhookVersionRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水线Webhook版本 Dao 接口
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PipelineWebhookVersionDao {
|
||||||
|
/**
|
||||||
|
* 创建Webhook版本记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param version 版本 * @param content 内容 * @param userId 用户ID * @return Webhook版本记录ID
|
||||||
|
*/
|
||||||
|
long create(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("version") String version, @Param("content") String content, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新Webhook版本记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param version 版本 * @param content 内容 * @param userId 用户ID * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int update(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("version") String version, @Param("content") String content, @Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除Webhook版本记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param version 版本 * @return 影响的行<EFBFBD>?
|
||||||
|
*/
|
||||||
|
int delete(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("version") String version);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取Webhook版本记录列表 * * @param projectId 项目ID * @param pipelineId 流水线ID * @return Webhook版本记录列表
|
||||||
|
*/
|
||||||
|
List<TPipelineWebhookVersionRecord> list(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取Webhook版本记录 * * @param projectId 项目ID * @param pipelineId 流水线ID * @param version 版本 * @return Webhook版本记录
|
||||||
|
*/
|
||||||
|
TPipelineWebhookVersionRecord get(@Param("projectId") String projectId, @Param("pipelineId") String pipelineId, @Param("version") String version);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DeptInfoRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Integer id;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="项目所属二级机构ID")
|
||||||
|
private Integer deptId;
|
||||||
|
@Schema(description="项目所属二级机构名称")
|
||||||
|
private String deptName;
|
||||||
|
@Schema(description="层级ID")
|
||||||
|
private Integer level;
|
||||||
|
@Schema(description="")
|
||||||
|
private Integer parentDeptId;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ProjectInfoRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Integer id;
|
||||||
|
@Schema(description="审核状态")
|
||||||
|
private Integer approvalStatus;
|
||||||
|
@Schema(description="批准时间")
|
||||||
|
private Date approvalTime;
|
||||||
|
@Schema(description="批准人")
|
||||||
|
private String approver;
|
||||||
|
@Schema(description="应用ID")
|
||||||
|
private Integer ccAppId;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createdAt;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="创建者事业群名称")
|
||||||
|
private String creatorBgName;
|
||||||
|
@Schema(description="创建者中心名字")
|
||||||
|
private String creatorCenterName;
|
||||||
|
@Schema(description="创建者项目所属二级机构名称")
|
||||||
|
private String creatorDeptName;
|
||||||
|
@Schema(description="英文名称")
|
||||||
|
private String englishName;
|
||||||
|
@Schema(description="是否停用")
|
||||||
|
private Boolean isOfflined;
|
||||||
|
@Schema(description="是否保密")
|
||||||
|
private Boolean isSecrecy;
|
||||||
|
@Schema(description="事业群ID")
|
||||||
|
private Integer projectBgId;
|
||||||
|
@Schema(description="事业群名称")
|
||||||
|
private String projectBgName;
|
||||||
|
@Schema(description="中心ID")
|
||||||
|
private String projectCenterId;
|
||||||
|
@Schema(description="中心名字")
|
||||||
|
private String projectCenterName;
|
||||||
|
@Schema(description="机构ID")
|
||||||
|
private Integer projectDeptId;
|
||||||
|
@Schema(description="项目所属二级机构名称")
|
||||||
|
private String projectDeptName;
|
||||||
|
@Schema(description="项目ID")
|
||||||
|
private String projectId;
|
||||||
|
@Schema(description="项目名称")
|
||||||
|
private String projectName;
|
||||||
|
@Schema(description="项目类型")
|
||||||
|
private Integer projectType;
|
||||||
|
@Schema(description="是否用蓝鲸")
|
||||||
|
private Boolean useBk;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RolePermissionRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Integer id;
|
||||||
|
@Schema(description="过期时间")
|
||||||
|
private Date expireTime;
|
||||||
|
@Schema(description="角色ID")
|
||||||
|
private Integer roleId;
|
||||||
|
@Schema(description="")
|
||||||
|
private Integer urlActionId;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date modifyTime;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RoleRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Integer id;
|
||||||
|
@Schema(description="描述")
|
||||||
|
private String description;
|
||||||
|
@Schema(description="名称")
|
||||||
|
private String name;
|
||||||
|
@Schema(description="分支名")
|
||||||
|
private String chName;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date modifyTime;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SchemaVersionRecord {
|
||||||
|
@Schema(description="")
|
||||||
|
private Integer installedRank;
|
||||||
|
@Schema(description="版本号")
|
||||||
|
private String version;
|
||||||
|
@Schema(description="描述")
|
||||||
|
private String description;
|
||||||
|
@Schema(description="类型")
|
||||||
|
private String type;
|
||||||
|
@Schema(description="打包脚本")
|
||||||
|
private String script;
|
||||||
|
@Schema(description="校验和")
|
||||||
|
private Integer checksum;
|
||||||
|
@Schema(description="安装者")
|
||||||
|
private String installedBy;
|
||||||
|
@Schema(description="安装时间")
|
||||||
|
private Date installedOn;
|
||||||
|
@Schema(description="执行时间")
|
||||||
|
private Integer executionTime;
|
||||||
|
@Schema(description="是否成功")
|
||||||
|
private Integer success;
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SpringSessionAttributesRecord {
|
||||||
|
@Schema(description="SESSION ID")
|
||||||
|
private String sessionId;
|
||||||
|
@Schema(description="属性名称")
|
||||||
|
private String attributeName;
|
||||||
|
@Schema(description="属性字节")
|
||||||
|
private byte[] attributeBytes;
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SpringSessionRecord {
|
||||||
|
@Schema(description="SESSION ID")
|
||||||
|
private String sessionId;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Long creationTime;
|
||||||
|
@Schema(description="")
|
||||||
|
private Long lastAccessTime;
|
||||||
|
@Schema(description="")
|
||||||
|
private Integer maxInactiveInterval;
|
||||||
|
@Schema(description="")
|
||||||
|
private String principalName;
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TActivityRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="类型")
|
||||||
|
private String type;
|
||||||
|
@Schema(description="名称")
|
||||||
|
private String name;
|
||||||
|
@Schema(description="英文名称")
|
||||||
|
private String englishName;
|
||||||
|
@Schema(description="跳转链接")
|
||||||
|
private String link;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="状态")
|
||||||
|
private String status;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAgentBatchInstallTokenRecord {
|
||||||
|
@Schema(description="项目ID")
|
||||||
|
private String projectId;
|
||||||
|
@Schema(description="token用户")
|
||||||
|
private String userId;
|
||||||
|
@Schema(description="Base64编码后TOKEN")
|
||||||
|
private String token;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createdTime;
|
||||||
|
@Schema(description="过期时间")
|
||||||
|
private Date expiredTime;
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAgentFailureNotifyUserRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="用户ID")
|
||||||
|
private String userId;
|
||||||
|
@Schema(description="通知类型")
|
||||||
|
private String notifyTypes;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAgentPipelineRefRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="节点ID")
|
||||||
|
private Long nodeId;
|
||||||
|
@Schema(description="构建机ID")
|
||||||
|
private Long agentId;
|
||||||
|
@Schema(description="项目ID")
|
||||||
|
private String projectId;
|
||||||
|
@Schema(description="流水线ID")
|
||||||
|
private String pipelineId;
|
||||||
|
@Schema(description="流水线名称")
|
||||||
|
private String pieplineName;
|
||||||
|
@Schema(description="构建序列号")
|
||||||
|
private String vmSeqId;
|
||||||
|
@Schema(description="JOB ID")
|
||||||
|
private String jobId;
|
||||||
|
@Schema(description="JOB NAME")
|
||||||
|
private String jobName;
|
||||||
|
@Schema(description="最近构建时间")
|
||||||
|
private Date lastBuildTime;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAgentShareProjectRecord {
|
||||||
|
@Schema(description="AgentID")
|
||||||
|
private Long agentId;
|
||||||
|
@Schema(description="主项目ID")
|
||||||
|
private String mainProjectId;
|
||||||
|
@Schema(description="共享的目标项目ID")
|
||||||
|
private String sharedProjectId;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAiScoreRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="任务ID")
|
||||||
|
private String label;
|
||||||
|
@Schema(description="是否已归档")
|
||||||
|
private Integer archive;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
@Schema(description="赞的人")
|
||||||
|
private String goodUsers;
|
||||||
|
@Schema(description="踩的人")
|
||||||
|
private String badUsers;
|
||||||
|
@Schema(description="大模型生成的内容")
|
||||||
|
private String aiMsg;
|
||||||
|
@Schema(description="Prompt for system")
|
||||||
|
private String systemMsg;
|
||||||
|
@Schema(description="Prompt for user")
|
||||||
|
private String userMsg;
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAppCodeGroupRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="APP编码")
|
||||||
|
private String appCode;
|
||||||
|
@Schema(description="事业群ID")
|
||||||
|
private Integer bgId;
|
||||||
|
@Schema(description="事业群名称")
|
||||||
|
private String bgName;
|
||||||
|
@Schema(description="项目所属二级机构ID")
|
||||||
|
private Integer deptId;
|
||||||
|
@Schema(description="项目所属二级机构名称")
|
||||||
|
private String deptName;
|
||||||
|
@Schema(description="中心ID")
|
||||||
|
private Integer centerId;
|
||||||
|
@Schema(description="中心名字")
|
||||||
|
private String centerName;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="跟新人")
|
||||||
|
private String updater;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAppCodeProjectRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="APP编码")
|
||||||
|
private String appCode;
|
||||||
|
@Schema(description="项目ID")
|
||||||
|
private String projectId;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAppEnvRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Integer id;
|
||||||
|
@Schema(description="编译环境ID")
|
||||||
|
private Integer appId;
|
||||||
|
@Schema(description="路径")
|
||||||
|
private String path;
|
||||||
|
@Schema(description="名称")
|
||||||
|
private String name;
|
||||||
|
@Schema(description="描述")
|
||||||
|
private String description;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAppUserInfoRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Integer id;
|
||||||
|
@Schema(description="APP编码")
|
||||||
|
private String appCode;
|
||||||
|
@Schema(description="APP管理员ID")
|
||||||
|
private String managerId;
|
||||||
|
@Schema(description="是否删除")
|
||||||
|
private Boolean isDelete;
|
||||||
|
@Schema(description="添加人员")
|
||||||
|
private String createUser;
|
||||||
|
@Schema(description="添加时间")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAppVersionRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Integer id;
|
||||||
|
@Schema(description="编译环境ID")
|
||||||
|
private Integer appId;
|
||||||
|
@Schema(description="版本号")
|
||||||
|
private String version;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAppsRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Integer id;
|
||||||
|
@Schema(description="名称")
|
||||||
|
private String name;
|
||||||
|
@Schema(description="操作系统")
|
||||||
|
private String os;
|
||||||
|
@Schema(description="执行所在路径")
|
||||||
|
private String binPath;
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomApproveRelRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="插件的唯一标识")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="调试项目编码")
|
||||||
|
private String testProjectCode;
|
||||||
|
@Schema(description="审批ID")
|
||||||
|
private String approveId;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="最近修改人")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomBuildAppRelRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="构建信息Id")
|
||||||
|
private String buildInfoId;
|
||||||
|
@Schema(description="编译环境版本Id(对应T_APP_VERSION主键)")
|
||||||
|
private Integer appVersionId;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomBuildInfoRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="语言")
|
||||||
|
private String language;
|
||||||
|
@Schema(description="打包脚本")
|
||||||
|
private String script;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
@Schema(description="代码存放路径")
|
||||||
|
private String repositoryPath;
|
||||||
|
@Schema(description="样例工程路径")
|
||||||
|
private String sampleProjectPath;
|
||||||
|
@Schema(description="是否启用 1 启用 0 禁用")
|
||||||
|
private Boolean enable;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomDevLanguageEnvVarRecord {
|
||||||
|
@Schema(description="主键")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="插件开发语言")
|
||||||
|
private String language;
|
||||||
|
@Schema(description="环境变量key值")
|
||||||
|
private String envKey;
|
||||||
|
@Schema(description="环境变量value值")
|
||||||
|
private String envValue;
|
||||||
|
@Schema(description="适用构建机类型 PUBLIC:公共构建机,THIRD:第三方构建机,ALL:所有")
|
||||||
|
private String buildHostType;
|
||||||
|
@Schema(description="适用构建机操作系统 WINDOWS:windows构建机,LINUX:linux构建机,MAC_OS:mac构建机,ALL:所有")
|
||||||
|
private String buildHostOs;
|
||||||
|
@Schema(description="创建人")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="最近修改人")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomDisplayConfigRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="项目ID")
|
||||||
|
private String projectId;
|
||||||
|
@Schema(description="插件代码")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="插件名称")
|
||||||
|
private String atomName;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomEnvInfoRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="插件Id")
|
||||||
|
private String atomId;
|
||||||
|
@Schema(description="安装包路径")
|
||||||
|
private String pkgPath;
|
||||||
|
@Schema(description="语言")
|
||||||
|
private String language;
|
||||||
|
@Schema(description="支持插件开发语言的最低版本")
|
||||||
|
private String minVersion;
|
||||||
|
@Schema(description="插件执行入口")
|
||||||
|
private String target;
|
||||||
|
@Schema(description="插件SHA签名串")
|
||||||
|
private String shaContent;
|
||||||
|
@Schema(description="插件执行前置命令")
|
||||||
|
private String preCmd;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
@Schema(description="插件包名")
|
||||||
|
private String pkgName;
|
||||||
|
@Schema(description="入口参数")
|
||||||
|
private String postEntryParam;
|
||||||
|
@Schema(description="执行条件")
|
||||||
|
private String postCondition;
|
||||||
|
@Schema(description="支持的操作系统名称")
|
||||||
|
private String osName;
|
||||||
|
@Schema(description="支持的操作系统架构")
|
||||||
|
private String osArch;
|
||||||
|
@Schema(description="运行时版本")
|
||||||
|
private String runtimeVersion;
|
||||||
|
@Schema(description="是否为默认环境信息")
|
||||||
|
private Boolean defaultFlag;
|
||||||
|
@Schema(description="插件运行结束后是否立即杀掉其进程")
|
||||||
|
private Boolean finishKillFlag;
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomFailDetailDataRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="项目ID")
|
||||||
|
private String projectId;
|
||||||
|
@Schema(description="流水线ID")
|
||||||
|
private String pipelineId;
|
||||||
|
@Schema(description="流水线名称")
|
||||||
|
private String pipelineName;
|
||||||
|
@Schema(description="渠道代码")
|
||||||
|
private String channelCode;
|
||||||
|
@Schema(description="构建ID")
|
||||||
|
private String buildId;
|
||||||
|
@Schema(description="构建序号")
|
||||||
|
private Integer buildNum;
|
||||||
|
@Schema(description="插件代码")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="插件名称")
|
||||||
|
private String atomName;
|
||||||
|
@Schema(description="插件在model中的位置")
|
||||||
|
private String atomPosition;
|
||||||
|
@Schema(description="插件分类代码")
|
||||||
|
private String classifyCode;
|
||||||
|
@Schema(description="插件分类名称")
|
||||||
|
private String classifyName;
|
||||||
|
@Schema(description="启动用户")
|
||||||
|
private String startUser;
|
||||||
|
@Schema(description="启动时间")
|
||||||
|
private Date startTime;
|
||||||
|
@Schema(description="结束时间")
|
||||||
|
private Date endTime;
|
||||||
|
@Schema(description="错误的类型标识")
|
||||||
|
private Integer errorType;
|
||||||
|
@Schema(description="错误的标识码")
|
||||||
|
private Integer errorCode;
|
||||||
|
@Schema(description="错误描述")
|
||||||
|
private String errorMsg;
|
||||||
|
@Schema(description="统计时间")
|
||||||
|
private Date statisticsTime;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomFailSummaryDataRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="项目ID")
|
||||||
|
private String projectId;
|
||||||
|
@Schema(description="流水线ID")
|
||||||
|
private String pipelineId;
|
||||||
|
@Schema(description="流水线名称")
|
||||||
|
private String pipelineName;
|
||||||
|
@Schema(description="渠道代码")
|
||||||
|
private String channelCode;
|
||||||
|
@Schema(description="插件代码")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="插件名称")
|
||||||
|
private String atomName;
|
||||||
|
@Schema(description="插件分类代码")
|
||||||
|
private String classifyCode;
|
||||||
|
@Schema(description="插件分类名称")
|
||||||
|
private String classifyName;
|
||||||
|
@Schema(description="错误的类型标识")
|
||||||
|
private Integer errorType;
|
||||||
|
@Schema(description="错误次数")
|
||||||
|
private Integer errorCount;
|
||||||
|
@Schema(description="统计时间")
|
||||||
|
private Date statisticsTime;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomFeatureRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="插件的唯一标识")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="可见范围")
|
||||||
|
private Integer visibilityLevel;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
@Schema(description="是否推荐")
|
||||||
|
private Boolean recommendFlag;
|
||||||
|
@Schema(description="插件代码库不开源原因")
|
||||||
|
private String privateReason;
|
||||||
|
@Schema(description="是否删除")
|
||||||
|
private Boolean deleteFlag;
|
||||||
|
@Schema(description="yaml可用标识")
|
||||||
|
private Boolean yamlFlag;
|
||||||
|
@Schema(description="质量红线可用标识")
|
||||||
|
private Boolean qualityFlag;
|
||||||
|
@Schema(description="是否认证标识")
|
||||||
|
private Boolean certificationFlag;
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomIndexStatisticsDailyRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="插件代码")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="插件错误合规次数")
|
||||||
|
private Integer failComplianceCount;
|
||||||
|
@Schema(description="统计时间")
|
||||||
|
private Date statisticsTime;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="失败执行次数")
|
||||||
|
private Integer failExecuteCount;
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomLabelRelRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="标签ID")
|
||||||
|
private String labelId;
|
||||||
|
@Schema(description="插件Id")
|
||||||
|
private String atomId;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomMonitorDataDailyRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="统计时间")
|
||||||
|
private Date statisticsTime;
|
||||||
|
@Schema(description="插件代码")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="执行次数")
|
||||||
|
private Long executeCount;
|
||||||
|
@Schema(description="错误类型")
|
||||||
|
private Integer errorType;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomOfflineRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="插件的唯一标识")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="")
|
||||||
|
private Integer bufferDay;
|
||||||
|
@Schema(description="过期时间")
|
||||||
|
private Date expireTime;
|
||||||
|
@Schema(description="状态")
|
||||||
|
private Integer status;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomOperateLogRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="插件Id")
|
||||||
|
private String atomId;
|
||||||
|
@Schema(description="日志内容")
|
||||||
|
private String content;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomOverviewDataRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="项目ID")
|
||||||
|
private String projectId;
|
||||||
|
@Schema(description="流水线ID")
|
||||||
|
private String pipelineId;
|
||||||
|
@Schema(description="流水线名称")
|
||||||
|
private String pipelineName;
|
||||||
|
@Schema(description="渠道代码")
|
||||||
|
private String channelCode;
|
||||||
|
@Schema(description="插件代码")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="插件名称")
|
||||||
|
private String atomName;
|
||||||
|
@Schema(description="插件分类代码")
|
||||||
|
private String classifyCode;
|
||||||
|
@Schema(description="插件分类名称")
|
||||||
|
private String classifyName;
|
||||||
|
@Schema(description="成功率")
|
||||||
|
private BigDecimal successRate;
|
||||||
|
@Schema(description="总平均耗时,单位:毫秒")
|
||||||
|
private Long avgCostTime;
|
||||||
|
@Schema(description="总执行次数")
|
||||||
|
private Long totalExecuteCount;
|
||||||
|
@Schema(description="成功执行次数")
|
||||||
|
private Long successExecuteCount;
|
||||||
|
@Schema(description="失败执行次数")
|
||||||
|
private Long failExecuteCount;
|
||||||
|
@Schema(description="统计时间")
|
||||||
|
private Date statisticsTime;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomPipelineBuildRelRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="插件Id")
|
||||||
|
private String atomId;
|
||||||
|
@Schema(description="流水线ID")
|
||||||
|
private String pipelineId;
|
||||||
|
@Schema(description="构建ID")
|
||||||
|
private String buildId;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomPipelineRelRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="插件的唯一标识")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="流水线ID")
|
||||||
|
private String pipelineId;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,90 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="名称")
|
||||||
|
private String name;
|
||||||
|
@Schema(description="插件的唯一标识")
|
||||||
|
private String atomCode;
|
||||||
|
@Schema(description="插件大类")
|
||||||
|
private String classType;
|
||||||
|
@Schema(description="生效范围")
|
||||||
|
private String serviceScope;
|
||||||
|
@Schema(description="适用Job类型,AGENT: 编译环境,AGENT_LESS:无编译环境")
|
||||||
|
private String jobType;
|
||||||
|
@Schema(description="操作系统")
|
||||||
|
private String os;
|
||||||
|
@Schema(description="所属分类ID")
|
||||||
|
private String classifyId;
|
||||||
|
@Schema(description="文档跳转链接")
|
||||||
|
private String docsLink;
|
||||||
|
@Schema(description="原子类型")
|
||||||
|
private Integer atomType;
|
||||||
|
@Schema(description="原子状态")
|
||||||
|
private Integer atomStatus;
|
||||||
|
@Schema(description="插件状态信息")
|
||||||
|
private String atomStatusMsg;
|
||||||
|
@Schema(description="简介")
|
||||||
|
private String summary;
|
||||||
|
@Schema(description="描述")
|
||||||
|
private String description;
|
||||||
|
@Schema(description="类别")
|
||||||
|
private Integer categroy;
|
||||||
|
@Schema(description="版本号")
|
||||||
|
private String version;
|
||||||
|
@Schema(description="LOGO URL地址")
|
||||||
|
private String logoUrl;
|
||||||
|
@Schema(description="插件图标")
|
||||||
|
private String icon;
|
||||||
|
@Schema(description="是否为默认原子")
|
||||||
|
private Boolean defaultFlag;
|
||||||
|
@Schema(description="是否为最新版本原子")
|
||||||
|
private Boolean latestFlag;
|
||||||
|
@Schema(description="无构建环境原子是否可以在有构建环境运行标识")
|
||||||
|
private Boolean buildLessRunFlag;
|
||||||
|
@Schema(description="代码库哈希ID")
|
||||||
|
private String repositoryHashId;
|
||||||
|
@Schema(description="代码库链接")
|
||||||
|
private String codeSrc;
|
||||||
|
@Schema(description="是否免费")
|
||||||
|
private Boolean payFlag;
|
||||||
|
@Schema(description="前端渲染模板版本")
|
||||||
|
private String htmlTemplateVersion;
|
||||||
|
@Schema(description="自定义扩展容器前端表单属性字段的JSON串")
|
||||||
|
private String props;
|
||||||
|
@Schema(description="预留字段")
|
||||||
|
private String data;
|
||||||
|
@Schema(description="原子发布者")
|
||||||
|
private String publisher;
|
||||||
|
@Schema(description="权值")
|
||||||
|
private Integer weight;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
@Schema(description="可见范围")
|
||||||
|
private Integer visibilityLevel;
|
||||||
|
@Schema(description="发布时间")
|
||||||
|
private Date pubTime;
|
||||||
|
@Schema(description="插件代码库不开源原因")
|
||||||
|
private String privateReason;
|
||||||
|
@Schema(description="是否删除")
|
||||||
|
private Boolean deleteFlag;
|
||||||
|
@Schema(description="代码库分支")
|
||||||
|
private String branch;
|
||||||
|
@Schema(description="是否是分支测试版本")
|
||||||
|
private Boolean branchTestFlag;
|
||||||
|
@Schema(description="是否为最新测试版本原子, TRUE:最新 FALSE:非最新")
|
||||||
|
private Boolean latestTestFlag;
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAtomVersionLogRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private String id;
|
||||||
|
@Schema(description="插件Id")
|
||||||
|
private String atomId;
|
||||||
|
@Schema(description="发布类型")
|
||||||
|
private Integer releaseType;
|
||||||
|
@Schema(description="日志内容")
|
||||||
|
private String content;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String creator;
|
||||||
|
@Schema(description="修改者")
|
||||||
|
private String modifier;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAuditResourceRecord {
|
||||||
|
@Schema(description="主键ID")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description="资源类型")
|
||||||
|
private String resourceType;
|
||||||
|
@Schema(description="资源ID")
|
||||||
|
private String resourceId;
|
||||||
|
@Schema(description="资源名称")
|
||||||
|
private String resourceName;
|
||||||
|
@Schema(description="用户ID")
|
||||||
|
private String userId;
|
||||||
|
@Schema(description="操作")
|
||||||
|
private String action;
|
||||||
|
@Schema(description="操作内容")
|
||||||
|
private String actionContent;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createdTime;
|
||||||
|
@Schema(description="状态")
|
||||||
|
private String status;
|
||||||
|
@Schema(description="项目ID")
|
||||||
|
private String projectId;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAuthActionRecord {
|
||||||
|
@Schema(description="操作ID")
|
||||||
|
private String action;
|
||||||
|
@Schema(description="蓝盾-关联资源类型")
|
||||||
|
private String resourceType;
|
||||||
|
@Schema(description="IAM-关联资源类型")
|
||||||
|
private String relatedResourceType;
|
||||||
|
@Schema(description="操作名称")
|
||||||
|
private String actionName;
|
||||||
|
@Schema(description="动作英文名称")
|
||||||
|
private String englishName;
|
||||||
|
@Schema(description="创建者")
|
||||||
|
private String createUser;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
@Schema(description="是否删除")
|
||||||
|
private Boolean delete;
|
||||||
|
@Schema(description="操作类型")
|
||||||
|
private String actionType;
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package cd.casic.ci.process.process.dataObject;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TAuthGroupInfoRecord {
|
||||||
|
@Schema(description="主健ID")
|
||||||
|
private Integer id;
|
||||||
|
@Schema(description="用户组名称")
|
||||||
|
private String groupName;
|
||||||
|
@Schema(description="用户组标识 默认用户组标识一致")
|
||||||
|
private String groupCode;
|
||||||
|
@Schema(description="用户组类型 0默认分组")
|
||||||
|
private Boolean groupType;
|
||||||
|
@Schema(description="用户组所属项目")
|
||||||
|
private String projectCode;
|
||||||
|
@Schema(description="是否删除 0 可用 1删除")
|
||||||
|
private Boolean isDelete;
|
||||||
|
@Schema(description="添加人")
|
||||||
|
private String createUser;
|
||||||
|
@Schema(description="修改人")
|
||||||
|
private String updateUser;
|
||||||
|
@Schema(description="创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description="修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
@Schema(description="用户组别名")
|
||||||
|
private String displayName;
|
||||||
|
@Schema(description="关联系统ID")
|
||||||
|
private String relationId;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user