From e1aad318403442ea246566ce2a98dcfaa72c1479 Mon Sep 17 00:00:00 2001 From: carlyin <449036249@qq.com> Date: Wed, 8 Sep 2021 20:40:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E3=80=90=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E3=80=91=E6=94=AF=E6=8C=81=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E5=A4=A7=E7=89=88=E6=9C=AC=E4=B8=8B=E7=9A=84=E5=B0=8F=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=9B=B4=E6=96=B0=20#1841?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devops/store/service/image/ImageReleaseService.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backend/ci/core/store/biz-store-image/src/main/kotlin/com/tencent/devops/store/service/image/ImageReleaseService.kt b/src/backend/ci/core/store/biz-store-image/src/main/kotlin/com/tencent/devops/store/service/image/ImageReleaseService.kt index 9b2a952b4ca..0465803a8a6 100644 --- a/src/backend/ci/core/store/biz-store-image/src/main/kotlin/com/tencent/devops/store/service/image/ImageReleaseService.kt +++ b/src/backend/ci/core/store/biz-store-image/src/main/kotlin/com/tencent/devops/store/service/image/ImageReleaseService.kt @@ -406,12 +406,18 @@ abstract class ImageReleaseService { (cancelFlag && releaseType == ReleaseTypeEnum.CANCEL_RE_RELEASE)) { // 首次创建版本或者取消发布后不变更版本号重新上架,则在该版本的记录上做更新操作 imageId = imageRecord.id + val finalReleaseType = if (releaseType == ReleaseTypeEnum.CANCEL_RE_RELEASE) { + val imageVersion = marketImageVersionLogDao.getImageVersion(context, imageId) + imageVersion.releaseType + } else { + releaseType.releaseType.toByte() + } updateMarketImage( context = context, userId = userId, imageId = imageId, imageSize = "", - releaseType = releaseType.releaseType.toByte(), + releaseType = finalReleaseType, marketImageUpdateRequest = marketImageUpdateRequest ) } else {