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

[Improve][Manager] Simplify code for InLong group management #10362

Closed
2 tasks done
aloyszhang opened this issue Jun 5, 2024 · 0 comments · Fixed by #10364
Closed
2 tasks done

[Improve][Manager] Simplify code for InLong group management #10362

aloyszhang opened this issue Jun 5, 2024 · 0 comments · Fixed by #10364
Assignees
Milestone

Comments

@aloyszhang
Copy link
Contributor

aloyszhang commented Jun 5, 2024

Description

In the manager, I found some duplicated interfaces, e.g. InlongGroupService

    /**
     * Save inlong group info.
     *
     * @param groupInfo group request need to save
     * @param operator name of operator
     * @return inlong group id after saving
     */
    String save(@Valid @NotNull(message = "inlong group request cannot be null") InlongGroupRequest groupInfo,
            String operator);

    /**
     * Save inlong group info.
     *
     * @param groupInfo group request need to save
     * @param opInfo userinfo of operator
     * @return detail of inlong group
     */
    String save(@Valid @NotNull(message = "inlong group request cannot be null") InlongGroupRequest groupInfo,
            UserInfo opInfo);

The only different is the second parameter, one is operator and the other is UserInfo, and the real usage of UserInfo is to get the operator by UserInfo#getName() .
So, this two methods are same essentially.

We can simplify the code here by unifying the two methods to one.

InLong Component

InLong Manager

Are you willing to submit PR?

  • Yes, I am willing to submit a PR!

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant