-
Notifications
You must be signed in to change notification settings - Fork 0
[DEPLOY] production-release(v.0.3.x) #378
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,6 +93,8 @@ public GoNowResDTO participateGoNow(Long pinId, String uid) { | |
| throw ProblemSolverException.of(IssueErrorCode.GO_NOW_400_1); | ||
| } | ||
|
|
||
| issuePin.markInProgressIfBeforeProgress(); | ||
|
|
||
| return GoNowResDTO.builder() | ||
| .pinId(pinId) | ||
| .problemSolverId(saved.getProblemSolverId()) | ||
|
|
@@ -198,6 +200,8 @@ public ProblemSolverCheckResDTO resolveCitizenVerification(Long problemSolverId, | |
| solver.markResolved(); | ||
| problemSolverRepository.save(solver); | ||
|
|
||
| solver.getIssuePin().markResolvedIfInProgress(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. calling markResolvedIfInProgress() after saving the solver is a bit inconsistent. since the method is @transactional, dirty checking will save it, but it is better to modify all states before calling save, or even better, remove the explicit save call and rely on dirty checking. |
||
|
|
||
| return ProblemSolverCheckResDTO.builder() | ||
| .problemSolveState(ProblemSolveState.RESOLVED.name()) | ||
| .build(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i
ssuePin.getIssuePinState() == IssuePinState.RESOLVEDstate check is missing. imagine an issue that is already resolved, new solvers should not be allowed to participate. import and add a check before proceeding.also, markInProgressIfBeforeProgress() should be called before saveAndFlush to keep the state consistent.