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

fix : not-recruit일때 지원 파트 size감소 안되게 수정 #74

Merged
merged 1 commit into from
Feb 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,16 @@ public void updateRecruit(Long apply_id, Boolean isRecruit){
if(!apply.getIsDecision()){
apply.setIsPass(isRecruit);
apply.setIsDecision(true);
Post post = apply.getPost();
//지원 파트 size 감소
Category category = categoryRepository.findCategoryByPostAndCategoryType(post, CategoryType.valueOf(apply.getRecruit_part()));
System.out.println("null"+",post:"+post+",categroy:"+apply.getRecruit_part());
if(category.getSize()-1<=0){
throw new ApplicationException(ErrorCode.OVER_APPLY_EXCEPTION);
}else {
category.setSize(category.getSize()-1);
if(isRecruit){
Post post = apply.getPost();
//지원 파트 size 감소
Category category = categoryRepository.findCategoryByPostAndCategoryType(post, CategoryType.valueOf(apply.getRecruit_part()));
System.out.println("null"+",post:"+post+",categroy:"+apply.getRecruit_part());
if(category.getSize()-1<=0){
throw new ApplicationException(ErrorCode.OVER_APPLY_EXCEPTION);
}else {
category.setSize(category.getSize()-1);
}
}
}else {
throw new ApplicationException(ErrorCode.ALREADY_DECISION_EXCEPION);
Expand Down
Loading