이지우 - 마이페이지 및 결제 작업 중

This commit is contained in:
JIWOO 2025-07-25 16:51:25 +09:00
parent 276afbb432
commit 846780c8c3
3 changed files with 120 additions and 24 deletions

View File

@ -278,6 +278,8 @@ public class MjonPayV2Controller {
try {
// 다음 결제시 결제수단 SELECT
nextPayMethod = userManageService.selectNextPayMethod(userId);
// 실제 마지막 결제 방식 -
}
catch(Exception e) {
isSuccess = false;

View File

@ -12,6 +12,9 @@ import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.RSAPublicKeySpec;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -106,6 +109,7 @@ import itn.let.lett.service.LetterVO;
import itn.let.mjo.addr.service.AddrTransHistService;
import itn.let.mjo.addr.service.AddrTransHistVO;
import itn.let.mjo.event.service.MjonEventService;
import itn.let.mjo.event.service.MjonEventVO;
import itn.let.mjo.kisa.service.KisaService;
import itn.let.mjo.kisa.service.KisaVO;
import itn.let.mjo.mjocommon.MjonForienIpChk;
@ -130,6 +134,7 @@ import itn.let.sym.mnu.mpm.service.MenuManageVO;
import itn.let.sym.prm.service.EgovProgrmManageService;
import itn.let.sym.prm.service.ProgrmManageVO;
import itn.let.sym.site.service.EgovSiteManagerService;
import itn.let.sym.site.service.JoinSettingVO;
import itn.let.sym.site.service.MetaTagVO;
import itn.let.sym.site.service.SiteManagerVO;
import itn.let.uss.umt.service.EgovMberManageService;
@ -1256,6 +1261,38 @@ public class MainController {
model.addAttribute("mberManageVO", userManageService.selectUserInfo(mberManageVO));
}
/*
* 회원별 정보(단가), 기본 단가, 남은 이벤트 기간 조회
* 2025.07.25 이지우 추가
* */
MberManageVO mberPriceVO = new MberManageVO();
JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo();
MjonEventVO mjonEventVO = new MjonEventVO();
if(loginVO != null) {
mberPriceVO = mberManageService.selectMber(loginVO.getId());
if(!(mberPriceVO.getShortPrice() > 0)) mberPriceVO.setShortPrice(sysJoinSetVO.getShortPrice());
if(!(mberPriceVO.getLongPrice() > 0)) mberPriceVO.setLongPrice(sysJoinSetVO.getLongPrice());
if(!(mberPriceVO.getPicturePrice() > 0)) mberPriceVO.setPicturePrice(sysJoinSetVO.getPicturePrice());
if(!(mberPriceVO.getPicture2Price() > 0)) mberPriceVO.setPicture2Price(sysJoinSetVO.getPicture2Price());
if(!(mberPriceVO.getPicture3Price() > 0)) mberPriceVO.setPicture3Price(sysJoinSetVO.getPicture3Price());
//카카오, 팩스는 기본단가 고정
mberPriceVO.setKakaoAtPrice(sysJoinSetVO.getKakaoAtPrice());
mberPriceVO.setFaxPrice(sysJoinSetVO.getFaxPrice());
mjonEventVO.setMberId(loginVO.getId());
mjonEventVO = mjonEventService.selectEventMsgMberDefaultInfo(mjonEventVO);
String eventEndDateStr = "";
if(StringUtil.isNotEmpty(mjonEventVO.getEventEndDate())) {
eventEndDateStr = mjonEventVO.getEventEndDate();
LocalDate today = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate eventEndDate = LocalDate.parse(eventEndDateStr, formatter);
long eventLeftDay = ChronoUnit.DAYS.between(today, eventEndDate);
model.addAttribute("eventLeftDay", eventLeftDay);
}
}
model.addAttribute("mberPriceVO", mberPriceVO);
return "web/com/webCommonHeader";
}

View File

@ -1398,14 +1398,14 @@ function actionLogin_end(){
<div class="inner">
<ul class="menu_left">
<li><a href="#" id="favorite" ><i class="hdTop_fav"></i>즐겨찾기추가</a></li>
<li><a href="<c:out value='/web/user/mberInfoIndex.do'/>" ><i class="hdTop_mypage"></i>마이페이지</a></li>
<li><a href="<c:out value='/web/cop/bbs/NoticeList.do'/>" ><i class="hdTop_center"></i>고객센터</a></li>
<li><a href="<c:out value='/web/user/mberInfoChange.do'/>" ><i class="hdTop_mypage"></i>마이페이지</a></li>
<li><a href="<c:out value='/web/cop/bbs/QnaList.do'/>" ><i class="hdTop_center"></i>1:1 문의</a></li>
</ul>
<ul class="menu_right">
<li><a href="#" onclick="location.href='/web/member/pay/PayView.do'" >충전하기</a></li>
<li class="SortLine"><a href="/web/pay/PayGuide.do" >요금안내</a></li>
<li class="SortLine"><a href="/web/cop/bbs/FaqList.do" >이용안내</a></li>
<li class="SortLine"><a href="/web/cop/bbs/QnaList.do" >1:1 문의</a></li>
<li class="SortLine"><a href="/web/cop/bbs/NoticeList.do" >고객센터</a></li>
<li class="SortLine"><a href="/web/cop/bbs/SuggestList.do" >불편신고</a></li>
</ul>
</div>
@ -1627,7 +1627,9 @@ function actionLogin_end(){
</li>
<li>
<dl>
<dt><a href="<c:out value='/web/user/mberInfoIndex.do'/>" >마이페이지</a></dt>
<%-- 250724 마이페이지 대시보드 삭제 --%>
<%-- <dt><a href="<c:out value='/web/user/mberInfoIndex.do'/>" >마이페이지</a></dt> --%>
<dt><a href="<c:out value='/web/user/mberInfoChange.do'/>" >마이페이지</a></dt>
<dd>
<ul>
<li><a href="<c:out value='/web/user/mberInfoChange.do'/>" >회원정보 변경</a></li>
@ -1744,8 +1746,9 @@ function actionLogin_end(){
<div class="login_left">
<div class="login_info">
<input type="hidden" id="loginId" name="loginId" value="${LoginVO.id}">
<i><img src="/publish/images/mypageIcon2.png" id="commonHeaderGradeIcon" /></i>
<!-- <i><img src="/publish/images/mypageIcon2.png" id="commonHeaderGradeIcon" /></i> -->
<div class="login2_name" onclick="location.href='/web/user/mberInfoChange.do'" style="cursor:pointer;">
<i class="icon_user"></i>
<p><c:out value="${LoginVO.name}"/></p>
<c:choose>
<c:when test="${LoginVO.dept == 'p'}">
@ -1765,8 +1768,8 @@ function actionLogin_end(){
<img src="/pb/img/common/topTimeOut.png" alt="타임아웃 아이콘">
</a> -->
</div>
<button type="button" class="btnType btnType3" onclick="location.href='/web/user/mberInfoIndex.do'">마이페이지</button>
<button type="button" class="btnType btnType2" onclick="location.href='/web/uat/uia/actionLogout.do'">로그아웃</button>
<!-- <button type="button" class="btnType btnType3" onclick="location.href='/web/user/mberInfoIndex.do'">마이페이지</button> -->
<button type="button" class="btnType btn_36 fill_gray" onclick="location.href='/web/uat/uia/actionLogout.do'">로그아웃</button>
<div class="security_box">
@ -1778,26 +1781,80 @@ function actionLogin_end(){
</div>
<div class="login_pay">
<div class="check_money">
<div class="holdingsum_box">
<div class="holdingsum_box">
<i></i>
<div class="user_money_wrap">
보유잔액
<div class="hover_content_wrap">
<i class="qmMark">?</i>
<div class="hover_content">
<p class="hover_content_title">
<img src="/publish/images/content/icon_mypage_message.png" alt=""> 나의단가 <span>(발송가능 건수)</span>
</p>
<ul class="send_available_number">
<li>
<p class="title">· 단문</p>
<fmt:formatNumber type="number" maxFractionDigits="3" value="${mberPriceVO.shortPrice}" var="shortPrice" />
<p class="number"><span class="c_002c9a fwBold"><c:out value="${shortPrice}"/></span>원
<fmt:formatNumber type="number" maxFractionDigits="3" value="${Math.floor(userMoney / mberPriceVO.shortPrice)}" var="shotCnt" />
(<c:out value="${shotCnt}"/>건)</p>
</li>
<li>
<p class="title">· 장문</p>
<fmt:formatNumber type="number" maxFractionDigits="3" value="${mberPriceVO.longPrice}" var="longPrice" />
<p class="number"><span class="c_002c9a fwBold"><c:out value="${longPrice}"/></span>원
<fmt:formatNumber type="number" maxFractionDigits="3" value="${Math.floor(userMoney / mberPriceVO.longPrice)}" var="longCnt" />
(<c:out value="${longCnt}"/>건)</p>
</li>
<li>
<p class="title">· 그림(1장)</p>
<fmt:formatNumber type="number" maxFractionDigits="3" value="${mberPriceVO.picturePrice}" var="picturePrice" />
<p class="number"><span class="c_002c9a fwBold"><c:out value="${picturePrice}"/></span>원
<fmt:formatNumber type="number" maxFractionDigits="3" value="${Math.floor(userMoney / mberPriceVO.picturePrice)}" var="pictureCnt" />
(<c:out value="${pictureCnt}"/>건)</p>
</li>
<li>
<p class="title">· 그림(2장)</p>
<fmt:formatNumber type="number" maxFractionDigits="3" value="${mberPriceVO.picture2Price}" var="picture2Price" />
<p class="number"><span class="c_002c9a fwBold"><c:out value="${picture2Price}"/></span>원
<fmt:formatNumber type="number" maxFractionDigits="3" value="${Math.floor(userMoney / mberPriceVO.picture2Price)}" var="picture2Cnt" />
(<c:out value="${picture2Cnt}"/>건)</p>
</li>
<li>
<p class="title">· 그림(3장)</p>
<fmt:formatNumber type="number" maxFractionDigits="3" value="${mberPriceVO.picture3Price}" var="picture3Price" />
<p class="number"><span class="c_002c9a fwBold"><c:out value="${picture3Price}"/></span>원
<fmt:formatNumber type="number" maxFractionDigits="3" value="${Math.floor(userMoney / mberPriceVO.picture3Price)}" var="picture3Cnt" />
(<c:out value="${picture3Cnt}"/>건)</p>
</li>
<li>
<p class="title">· 알림톡</p>
<fmt:formatNumber type="number" maxFractionDigits="3" value="${mberPriceVO.kakaoAtPrice}" var="kakaoAtPrice" />
<p class="number"><span class="c_002c9a fwBold"><c:out value="${kakaoAtPrice}"/></span>원
<fmt:formatNumber type="number" maxFractionDigits="3" value="${Math.floor(userMoney / mberPriceVO.kakaoAtPrice)}" var="kakaoAtCnt" />
(<c:out value="${kakaoAtCnt}"/>건)</p>
</li>
<li>
<p class="title">· 팩스</p>
<fmt:formatNumber type="number" maxFractionDigits="3" value="${mberPriceVO.faxPrice}" var="faxPrice" />
<p class="number"><span class="c_002c9a fwBold"><c:out value="${faxPrice}"/></span>원
<fmt:formatNumber type="number" maxFractionDigits="3" value="${Math.floor(userMoney / mberPriceVO.faxPrice)}" var="faxCnt" />
(<c:out value="${faxCnt}"/>건)</p>
</li>
</ul>
<c:if test="${prePaymentYn eq 'Y' and (not empty eventLeftDay and eventLeftDay > 0)}">
<p class="event_term">이벤트 적용중 <span class="fwBold">D-${eventLeftDay}</span></p>
</c:if>
<c:if test="${prePaymentYn eq 'N'}">
<p class="event_term">후불제(매월 1일 자동충전)</p>
</c:if>
</div>
</div>
<fmt:formatNumber type="number" maxFractionDigits="3" value="${userMoney}" var="commaPrice" />
<p>보유잔액<!-- <em>(캐시)</em> --> <span class="fwMd" id="hdUserMoney"><c:out value="${commaPrice}"/></span>원</p>
<c:if test="${prePaymentYn eq 'N'}">
<dl>
<dd>후불제 고객의 보유잔액(캐시)은 당월 발송 가능<br>금액을 말하며 <span>매월 1일 자동으로 충전</span>됩니다.</dd>
</dl>
</c:if>
</div>
<span class="fwMd" id="hdUserMoney"><c:out value="${commaPrice}"/></span>원
</ >
</div>
<button type="button" class="btnType btnType3" onclick="location.href='/web/member/pay/PayView.do'">충전</button>
<div class="account_box">
<button type="button" class="btnType btnType3" onclick="location.href='/web/member/pay/PayView.do?tabType=2'">전용계좌</button>
<c:if test="${not empty myBankList}">
<dl>
<dt>전용계좌</dt>
<dd><c:out value="${myBankList[0].codeNm}"/> <c:out value="${myBankList[0].acctNo}"/></dd>
</dl>
</c:if>
</div>
</div>
<div class="point">
<i></i>