[INLONG-2759][Manager] Fix InlongGroup object modification exception #2769
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Title Name: [INLONG-2759][Manager] Fix InlongGroup object modification exception
Fixes #2759
First of all, the reason is that the GroupState.forCode() function has passed a null value. The reason is that the request object InlongGroupRequest does not add the annotation @ApiModelProperty() to the status field.
Originally, an annotation was added to the status field, but the reviewer believes that the status should not be set in the request, and there may be abnormal status flow caused by front-end parameters. We should handle state in the backend system.
Then continue to use the postman tool to form the status parameter for testing. A new problem has arisen: Current state=wait_submit is not allowed to transfer to state=wait_submit
This is because there is no conversion from GROUP_WAIT_SUBMIT to GROUP_WAIT_SUBMIT in the status transition. The above scenario should be missed here, so I fixed it and tested it again through the post. Finally verified successfully
The state needs to be controlled in the interface, and the background business logic is required later here.