Skip to content

Commit

Permalink
pref:研发商店通用化接口封装优化 #11049
Browse files Browse the repository at this point in the history
  • Loading branch information
carlyin0801 committed Dec 3, 2024
1 parent cd841d2 commit 7c89d57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,14 @@ class StoreComponentQueryServiceImpl : StoreComponentQueryService {
),
instanceId = storeInfoQuery.instanceId
) ?: emptyMap()
testStoreCodes = testComponentMap.keys
// 查询测试或者审核中组件最新版本信息
testComponentVersionMap = storeBaseQueryDao.getValidComponentsByCodes(
dslContext = dslContext,
storeCodes = testStoreCodes,
storeCodes = testComponentMap.keys,
storeType = storeType,
testComponentFlag = true
).intoMap({ it[tStoreBase.STORE_CODE] }, { it[tStoreBase.VERSION] })
testStoreCodes = testComponentVersionMap.keys
}
val componentVersionMap = if (queryTestFlag != true) {
// 查询非测试或者审核中组件最新发布版本信息
Expand Down Expand Up @@ -935,16 +935,12 @@ class StoreComponentQueryServiceImpl : StoreComponentQueryService {
// 获取项目下已安装组件
watcher.start("getInstalledComponents")
val installedInfoMap = projectCode?.let {
if (storeInfoQuery.installed != null || storeInfoQuery.updateFlag != null) {
storeProjectService.getProjectComponents(
projectCode = it,
storeType = storeTypeEnum.type.toByte(),
storeProjectTypes = listOf(StoreProjectTypeEnum.COMMON.type.toByte()),
instanceId = storeInfoQuery.instanceId
)
} else {
null
}
storeProjectService.getProjectComponents(
projectCode = it,
storeType = storeTypeEnum.type.toByte(),
storeProjectTypes = listOf(StoreProjectTypeEnum.COMMON.type.toByte()),
instanceId = storeInfoQuery.instanceId
)
}
// 获取分类
watcher.start("getAllClassify")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ BEGIN
FROM information_schema.statistics
WHERE TABLE_SCHEMA = db
AND TABLE_NAME = 'T_STORE_PROJECT_REL'
AND INDEX_NAME = 'INX_TSPR_TYPE_CODE_TYPE') THEN
AND INDEX_NAME = 'INX_TSPR_PROJECT_TYPE') THEN
ALTER TABLE `T_STORE_PROJECT_REL` ADD INDEX
`INX_TSPR_TYPE_CODE_TYPE` (`STORE_TYPE`,`STORE_CODE`,`TYPE`);
`INX_TSPR_PROJECT_TYPE` (`PROJECT_CODE`,`TYPE`);
END IF;

IF EXISTS(SELECT 1
Expand Down

0 comments on commit 7c89d57

Please sign in to comment.