사용자 환불요청시 Controller 에서 환불 요청 금액 및 보유금액 비교 구문추가
- 환불요청금액이 음수(-)로 넘어오는 경우를 위해 절대값 처리 추가 - 각 상황별 보유금액과 환불요청 금액 비교 구문 추가
This commit is contained in:
parent
6e4dd0050e
commit
bad71e5949
@ -330,6 +330,10 @@ public class RefundController {
|
||||
//230802 이지우 취약점 조치 - 보유금액을 변조하여 환불 신청 한 경우 방지
|
||||
//회원 정보 조회
|
||||
RefundVO mberInfoVO = refundService.selectRefundMberInfo(refundVO);
|
||||
//환불 요청 금액이 마이너스(-) 금액으로 오는 경우를 위해 절대값 처리해줌 - 20230824 우영두
|
||||
refundVO.setRefundMoney(Math.abs(refundVO.getRefundMoney()));
|
||||
|
||||
double refundMoneySum = refundService.selectRefundMoneySum(refundVO); // 환불신청금액(환불요청 상태)
|
||||
|
||||
if(Double.parseDouble(mberInfoVO.getMberMoney())
|
||||
< refundVO.getRefundMoney()) {
|
||||
@ -338,6 +342,21 @@ public class RefundController {
|
||||
modelAndView.addObject("msg", "현재 회원의 보유금액보다 큰 금액을 환불 할 수 없습니다.");
|
||||
|
||||
return modelAndView;
|
||||
|
||||
}else if(refundVO.getRefundMoney() < 10000) {
|
||||
|
||||
modelAndView.addObject("status", "moreThanUserMoney");
|
||||
modelAndView.addObject("msg", "10,000원 이하 환불 불가입니다.");
|
||||
|
||||
return modelAndView;
|
||||
|
||||
}else if(Double.parseDouble(mberInfoVO.getMberMoney()) < refundMoneySum) {
|
||||
|
||||
modelAndView.addObject("status", "moreThanUserMoney");
|
||||
modelAndView.addObject("msg", "현재 회원의 (보유금액-환불신청금액)보다 큰 금액을 환불 할 수 없습니다.");
|
||||
|
||||
return modelAndView;
|
||||
|
||||
}
|
||||
|
||||
String atchFileId = "";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user