-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] 계약서 내보내기 #89
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
Closed
Closed
[FEAT] 계약서 내보내기 #89
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3694705
✨ feat: 내보내기 controller
minnieming a6ff075
✨ feat: 내보내기 mapper / xml
minnieming 9090229
✨ feat: 내보내기 service
minnieming 9b07dbf
✨ feat: 내보내기 dto
minnieming 4612386
✨ feat: 내보내기 vo
minnieming 49a946c
✨ feat: 내보내기 enum
minnieming d3226a3
✨ feat: 내보내기 exception
minnieming bb502e5
✨ feat: 내보내기 mongoDB
minnieming 5885622
✨ feat: 내보내기 utils
minnieming 2eff907
✨ feat: 내보내기 enum
minnieming File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/org/scoula/domain/contract/dto/ContractPasswordDTO.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package org.scoula.domain.contract.dto; | ||
|
|
||
| import javax.validation.constraints.NotNull; | ||
|
|
||
| import io.swagger.annotations.ApiModel; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @ApiModel(description = "최종 계약서 비밀번호 받아오기") | ||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class ContractPasswordDTO { | ||
|
|
||
| @NotNull private String contractPassword; | ||
| // private String contractBuyerPassword; | ||
|
|
||
| @NotNull private Boolean mediationAgree; // 동의 여부 | ||
| } |
46 changes: 46 additions & 0 deletions
46
src/main/java/org/scoula/domain/contract/dto/DBFinalContractDTO.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| package org.scoula.domain.contract.dto; | ||
|
|
||
| import java.math.BigDecimal; | ||
| import java.time.LocalDate; | ||
|
|
||
| import org.scoula.domain.precontract.enums.ContractDuration; | ||
|
|
||
| import io.swagger.annotations.ApiModel; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @ApiModel(description = "DB에 있는 최종 계약서에 들어가는 내용들") | ||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class DBFinalContractDTO { | ||
|
|
||
| private String leaseType; | ||
| private String landCategory; // home detail _ 토지 지목 | ||
| private BigDecimal area; // home detail _ 토지 면적 | ||
|
|
||
| private String buildingStructure; // 건물 구조 _ '철근콘크리트 구조'로 고정하기 | ||
| // private String purpose; // 성엽님 _ 건물 용도 | ||
| // private float totalFloorArea; // 성엽님 _ 건물 면적 | ||
|
|
||
| private boolean hasTaxArrears; // owner pre contract check _ 미납 국세, 지방세 여부 | ||
| private boolean hasPriorFixedDate; // owner pre contract check _ 선순위 확정일자 현황 | ||
|
|
||
| private int paymentDueDay; // owner_wolse_info _ 매월 지불 일자 | ||
| private String bankAccount; // owner pre contract check _ 입금 계좌 & 은행 : owner_bank_name & | ||
| // owner_account_number | ||
|
|
||
| private LocalDate expectedMoveInDate; // tenant pre contract check 입주 날짜 -> === 특약사항에도 들어감 === | ||
|
|
||
| private ContractDuration | ||
| contractDuration; // Tenant pre contract check에서 contract_duration으로 퇴거 날짜 계산해서 넣기 | ||
| private LocalDate contractDate; // 계약하는 날짜 now()써서 하기 | ||
|
|
||
| private String ownerSsnFront; // identity verification ssnFront + ssnBack 합쳐서 넣기 | ||
| private String ownerSsnBack; | ||
| private String buyerSsnFront; | ||
| private String buyerSsnBack; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Check failure
Code scanning / CodeQL
HTTP request type unprotected from CSRF High
Copilot Autofix
AI 6 months ago
To fix this issue, the HTTP method for the
finalContractPDFendpoint should be changed from GET to POST (or another "unsafe" method like PUT or PATCH) to ensure that Spring's default CSRF protection applies. This involves changing the@GetMapping("/final_contract")annotation to@PostMapping("/final_contract")on thefinalContractPDFmethod inContractControllerImpl.java. No changes are needed in the service layer, as the vulnerability is in the controller's HTTP method exposure. If clients are using this endpoint, they will need to update their requests to use POST instead of GET.Steps:
ContractControllerImpl.java, locate thefinalContractPDFmethod.@GetMapping("/final_contract")to@PostMapping("/final_contract").