Skip to content

Commit

Permalink
Merge pull request #10925 from carlyin0801/issue_10924_atom_branch_ve…
Browse files Browse the repository at this point in the history
…rsion_fix

bug:查插件环境信息接口未正确处理插件测试分支版本号情况 #10924
  • Loading branch information
bkci-bot committed Sep 19, 2024
2 parents e305c04 + d27685a commit b1c278f
Showing 1 changed file with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,33 +415,30 @@ class MarketAtomEnvServiceImpl @Autowired constructor(
normalStatusList: List<Byte>,
atomCode: String,
projectCode: String
): List<Byte>? {
var atomStatusList: List<Byte>? = null
if (atomStatus != null) {
): List<Byte> {
return if (atomStatus != null) {
mutableListOf(atomStatus)
} else {
if (VersionUtils.isLatestVersion(version)) {
atomStatusList = normalStatusList.toMutableList()
val releaseCount = marketAtomDao.countReleaseAtomByCode(dslContext, atomCode, version)
if (releaseCount > 0) {
// 如果当前大版本内还有已发布的版本,则xx.latest只对应最新已发布的版本
atomStatusList = mutableListOf(AtomStatusEnum.RELEASED.status.toByte())
normalStatusList.toMutableList().apply {
if (VersionUtils.isLatestVersion(version)) {
val releaseCount = marketAtomDao.countReleaseAtomByCode(dslContext, atomCode, version)
if (releaseCount > 0) {
// 如果当前大版本内还有已发布的版本,则xx.latest只对应最新已发布的版本
this.clear()
this.add(AtomStatusEnum.RELEASED.status.toByte())
}
}
val flag =
storeProjectRelDao.isTestProjectCode(dslContext, atomCode, StoreTypeEnum.ATOM, projectCode)
logger.info("isInitTestProjectCode flag is :$flag")
val flag = storeProjectRelDao.isTestProjectCode(dslContext, atomCode, StoreTypeEnum.ATOM, projectCode)
if (flag) {
// 原生项目或者调试项目有权查处于测试中、审核中的插件
atomStatusList.addAll(
// 初始化项目或者调试项目有权查处于测试中、审核中的插件
this.addAll(
listOf(
AtomStatusEnum.TESTING.status.toByte(),
AtomStatusEnum.AUDITING.status.toByte()
AtomStatusEnum.TESTING.status.toByte(), AtomStatusEnum.AUDITING.status.toByte()
)
)
}
}
}
return atomStatusList
}

/**
Expand Down

0 comments on commit b1c278f

Please sign in to comment.