Skip to content

Commit b40c654

Browse files
authored
πŸ› μ‹ μ²­ api μ‘λ‹΅μœΌλ‘œ applyId λ°˜ν™˜ (#39)
* πŸ› μ‹ μ²­ λͺ©λ‘ λ°˜ν™˜ μ‹œ μ‹ μ²­ κΈ°λ³Έν‚€ λ°˜ν™˜ (#35) * πŸ› μ‹ μ²­ api μ‘λ‹΅μœΌλ‘œ applyId λ°˜ν™˜ (#38) * πŸ› μ‹ μ²­ λͺ©λ‘ λ°˜ν™˜ μ‹œ μ‹ μ²­ κΈ°λ³Έν‚€ λ°˜ν™˜ (#35) (#36) * ✨ μ‹ μ²­ API applyId λ°˜ν™˜
1 parent faeb705 commit b40c654

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.ivory.ivory.dto;
2+
3+
import lombok.*;
4+
5+
@Getter
6+
@Setter
7+
@Builder
8+
@AllArgsConstructor
9+
@NoArgsConstructor
10+
public class ApplyRequestDto {
11+
private Long applyId;
12+
13+
public static ApplyRequestDto of(Long applyId) {
14+
return ApplyRequestDto.builder()
15+
.applyId(applyId)
16+
.build();
17+
}
18+
}

β€Žsrc/main/java/com/ivory/ivory/service/ApplyService.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,11 @@ public CustomApiResponse<?> applyService(ApplyDto dto, Long currentMemberId) {
9292
//μ—”ν‹°ν‹° 생성
9393
Apply apply = Apply.toEntity(dto,totalAmount,subsidy,incomeType,status,member.get(),child.get(),medicalCertificate.get(),absenceCertificate.get());
9494
//DB에 μ €μž₯
95-
serviceRepository.save(apply);
95+
Apply newApply = serviceRepository.save(apply);
96+
97+
ApplyRequestDto applyRequestDto = ApplyRequestDto.of(newApply.getId());
9698
//응닡 생성
97-
CustomApiResponse<?> response = CustomApiResponse.createSuccess(HttpStatus.CREATED.value(),"μ„œλΉ„μŠ€κ°€ μ„±κ³΅μ μœΌλ‘œ μ‹ μ²­λ˜μ—ˆμŠ΅λ‹ˆλ‹€.",null);
99+
CustomApiResponse<?> response = CustomApiResponse.createSuccess(HttpStatus.CREATED.value(),"μ„œλΉ„μŠ€κ°€ μ„±κ³΅μ μœΌλ‘œ μ‹ μ²­λ˜μ—ˆμŠ΅λ‹ˆλ‹€.",applyRequestDto);
98100

99101
return response;
100102
}

0 commit comments

Comments
Β (0)