Skip to content

Commit

Permalink
feat:希望支持分支进行上架测试 #4780
Browse files Browse the repository at this point in the history
  • Loading branch information
yjieliang committed Nov 6, 2023
1 parent 15cf27d commit e444410
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,7 @@ data class MarketAtomUpdateRequest(
@ApiModelProperty(value = "插件字段校验确认标识", required = false)
val fieldCheckConfirmFlag: Boolean? = false,
@ApiModelProperty("分支", required = false)
val branch: String? = null
val branch: String? = null,
@ApiModelProperty("是否属于分支测试版本", required = false)
var isBranchTestVersion: Boolean = false
)
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,5 @@ data class UpdateAtomPackageInfo(
@ApiModelProperty("包路径")
val packagePath: String?,
@ApiModelProperty("插件包资源类型")
val atomPackageSourceType: PackageSourceTypeEnum,
@ApiModelProperty("是否属于分支测试版本)")
val isBranchTestVersion: Boolean
val atomPackageSourceType: PackageSourceTypeEnum
)
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ abstract class AtomReleaseServiceImpl @Autowired constructor() : AtomReleaseServ
UUIDUtil.generate()
}
val newVersionFlag = !(releaseType == ReleaseTypeEnum.NEW || releaseType == ReleaseTypeEnum.CANCEL_RE_RELEASE)

return updateAtomVersionInfo(
userId = userId,
projectCode = projectCode,
Expand All @@ -430,8 +429,7 @@ abstract class AtomReleaseServiceImpl @Autowired constructor() : AtomReleaseServ
atomId = if (newVersionFlag) atomId else newestAtomRecord.id,
i18nDir = i18nDir,
packagePath = executionInfoMap[KEY_PACKAGE_PATH] as? String,
atomPackageSourceType = atomPackageSourceType,
isBranchTestVersion = false
atomPackageSourceType = atomPackageSourceType
),
convertUpdateRequest = convertUpdateRequest,
getAtomConfResult = getAtomConfResult
Expand Down Expand Up @@ -1287,7 +1285,7 @@ abstract class AtomReleaseServiceImpl @Autowired constructor() : AtomReleaseServ
),
version = version
)
if (!updateAtomPackageInfo.isBranchTestVersion) {
if (!convertUpdateRequest.isBranchTestVersion) {
// 校验插件发布类型
marketAtomCommonService.validateReleaseType(
atomId = atomRecord.id,
Expand Down Expand Up @@ -1386,7 +1384,7 @@ abstract class AtomReleaseServiceImpl @Autowired constructor() : AtomReleaseServ
atomRecord = atomRecord
)
}
if (!updateAtomPackageInfo.isBranchTestVersion && atomStatus == AtomStatusEnum.TESTING) {
if (!convertUpdateRequest.isBranchTestVersion && atomStatus == AtomStatusEnum.TESTING) {
// 插件大版本内有测试版本则写入缓存
redisOperation.hset(
key = "$ATOM_POST_VERSION_TEST_FLAG_KEY_PREFIX:$atomCode",
Expand All @@ -1396,7 +1394,7 @@ abstract class AtomReleaseServiceImpl @Autowired constructor() : AtomReleaseServ
}
// 更新标签信息
val labelIdList = convertUpdateRequest.labelIdList?.filter { !it.isNullOrBlank() }
if (!updateAtomPackageInfo.isBranchTestVersion && null != labelIdList) {
if (!convertUpdateRequest.isBranchTestVersion && null != labelIdList) {
atomLabelRelDao.deleteByAtomId(context, atomId)
if (labelIdList.isNotEmpty()) {
atomLabelRelDao.batchAdd(context, userId = userId, atomId = atomId, labelIdList = labelIdList)
Expand Down

0 comments on commit e444410

Please sign in to comment.