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:优化插件管理菜单默认插件查询 #11142 #11144

Merged
merged 25 commits into from
Oct 31, 2024

Conversation

yjieliang
Copy link
Collaborator

perf:优化插件管理菜单默认插件查询 #11142

conditions.add(tspr.PROJECT_CODE.eq(projectCode).and(tspr.STORE_TYPE.eq(0)))
} else {
conditions.add(
ta.ID.`in`(defaultAtomIds)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

逻辑写得有问题,默认插件无需安装,不需要关联T_STORE_PROJECT_REL

installType == StoreProjectTypeEnum.INIT.type.toByte() ||
installType == StoreProjectTypeEnum.TEST.type.toByte()
}
if (default) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是什么代码?

installTime = DateTimeUtil.toDateTime(it[KEY_INSTALL_TIME] as LocalDateTime),
installType = StoreProjectTypeEnum.getProjectType((it[KEY_INSTALL_TYPE] as Byte).toInt()),
installer = installer,
installTime = if (default) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个默认插件的安装时间用更新时间有点奇怪,需要找产品确认下

var limit = pageSize
var offset = 0
if ((page -1) * pageSize - projectCount > 0) {
offset = (page - 1) * pageSize- projectCount
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这逻辑有问题吧,临界页面offset不是0开始,limit也不是pageSize吧

/**
* 获取默认插件
*/
fun getDefaultAtoms(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

service把普通插件和默认插件分开处理,但dao的逻辑差不多,看能不能合并,通过标识字段来区分逻辑差异

@yjieliang yjieliang closed this Oct 30, 2024
@yjieliang yjieliang reopened this Oct 30, 2024
Copy link
Collaborator

@carlyin0801 carlyin0801 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1

@carlyin0801 carlyin0801 self-requested a review October 31, 2024 02:31
Copy link
Collaborator

@carlyin0801 carlyin0801 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1

@bkci-bot bkci-bot merged commit a68a9b8 into TencentBlueKing:master Oct 31, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants