사용자 환불요청시 Controller 에서 환불 요청 금액 및 보유금액 비교 구문추가 - 환불요청금액이 음수(-)로 넘어오는 경우를 위해 절대값 처리 추가 - 각 상황별 보유금액과 환불요청 금액 비교 구문 추가
- 환불요청금액이 음수(-)로 넘어오는 경우를 위해 절대값 처리 추가 - 각 상황별 보유금액과 환불요청 금액 비교 구문 추가
@bad71e594916d081d7f10be0252ea44ec8ec32fb
--- src/main/java/itn/let/mjo/pay/web/RefundController.java
+++ src/main/java/itn/let/mjo/pay/web/RefundController.java
... | ... | @@ -330,6 +330,10 @@ |
| 330 | 330 |
//230802 이지우 취약점 조치 - 보유금액을 변조하여 환불 신청 한 경우 방지 |
| 331 | 331 |
//회원 정보 조회 |
| 332 | 332 |
RefundVO mberInfoVO = refundService.selectRefundMberInfo(refundVO); |
| 333 |
+ //환불 요청 금액이 마이너스(-) 금액으로 오는 경우를 위해 절대값 처리해줌 - 20230824 우영두 |
|
| 334 |
+ refundVO.setRefundMoney(Math.abs(refundVO.getRefundMoney())); |
|
| 335 |
+ |
|
| 336 |
+ double refundMoneySum = refundService.selectRefundMoneySum(refundVO); // 환불신청금액(환불요청 상태) |
|
| 333 | 337 |
|
| 334 | 338 |
if(Double.parseDouble(mberInfoVO.getMberMoney()) |
| 335 | 339 |
< refundVO.getRefundMoney()) {
|
... | ... | @@ -338,6 +342,21 @@ |
| 338 | 342 |
modelAndView.addObject("msg", "현재 회원의 보유금액보다 큰 금액을 환불 할 수 없습니다.");
|
| 339 | 343 |
|
| 340 | 344 |
return modelAndView; |
| 345 |
+ |
|
| 346 |
+ }else if(refundVO.getRefundMoney() < 10000) {
|
|
| 347 |
+ |
|
| 348 |
+ modelAndView.addObject("status", "moreThanUserMoney");
|
|
| 349 |
+ modelAndView.addObject("msg", "10,000원 이하 환불 불가입니다.");
|
|
| 350 |
+ |
|
| 351 |
+ return modelAndView; |
|
| 352 |
+ |
|
| 353 |
+ }else if(Double.parseDouble(mberInfoVO.getMberMoney()) < refundMoneySum) {
|
|
| 354 |
+ |
|
| 355 |
+ modelAndView.addObject("status", "moreThanUserMoney");
|
|
| 356 |
+ modelAndView.addObject("msg", "현재 회원의 (보유금액-환불신청금액)보다 큰 금액을 환불 할 수 없습니다.");
|
|
| 357 |
+ |
|
| 358 |
+ return modelAndView; |
|
| 359 |
+ |
|
| 341 | 360 |
} |
| 342 | 361 |
|
| 343 | 362 |
String atchFileId = ""; |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?