Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf:蓝盾引擎模块对应的数据库支持分库 #5267 #5978

Merged
merged 1 commit into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class PipelineBuildContainerDao {
): TPipelineBuildContainerRecord? {

return with(T_PIPELINE_BUILD_CONTAINER) {
val query = dslContext.selectFrom(this).where(BUILD_ID.eq(buildId))
val query = dslContext.selectFrom(this).where(BUILD_ID.eq(buildId).and(PROJECT_ID.eq(projectId)))
if (stageId.isNullOrBlank()) {
query.and(CONTAINER_ID.eq(containerId)).fetchAny()
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ class PipelineBuildDao {
): Collection<TPipelineBuildHistoryRecord> {
return with(T_PIPELINE_BUILD_HISTORY) {
dslContext.selectFrom(this)
.where(PIPELINE_ID.eq(pipelineId))
.where(PIPELINE_ID.eq(pipelineId).and(PROJECT_ID.eq(projectId)))
.orderBy(BUILD_NUM.desc()).limit(DEFAULT_PAGE_SIZE)
.fetch()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class PipelineModelTaskDao {
): Result<TPipelineModelTaskRecord>? {
with(TPipelineModelTask.T_PIPELINE_MODEL_TASK) {
val condition = mutableListOf<Condition>()
condition.add(PIPELINE_ID.eq(pipelineId))
condition.add(PIPELINE_ID.eq(pipelineId).and(PROJECT_ID.eq(projectId)))
if (isAtomVersionNull != null) {
if (isAtomVersionNull) {
condition.add(ATOM_VERSION.isNull)
Expand Down