화폐단위 변경 샘플 등록

This commit is contained in:
김현욱
2025-12-05 16:59:21 +09:00
parent 528819f3da
commit 2cbe57741f
3 changed files with 49 additions and 32 deletions

View File

@@ -139,4 +139,15 @@ public class PropertyService {
String propertyPath = String.format("bankda.%s", key); String propertyPath = String.format("bankda.%s", key);
return env.getProperty(propertyPath); return env.getProperty(propertyPath);
} }
/**
* amount-unit 프로퍼티 조회
* @param
* @return
*/
public static String getPropertyCurrencyUnit(String unit) {
String propertyPath = String.format("currency-unit.%s", unit);
return env.getProperty(propertyPath);
}
} }

View File

@@ -434,3 +434,8 @@ meta-content:
api: api:
AES_KEY: "aMZV6RjCtE1iyuH8WyE+Hg==" AES_KEY: "aMZV6RjCtE1iyuH8WyE+Hg=="
DATA_ENCRYPT_AES_KEY: "Z8zKbHyMKn+iwD3O0PLT9g==" DATA_ENCRYPT_AES_KEY: "Z8zKbHyMKn+iwD3O0PLT9g=="
currency-unit:
default: 円(엔)
JP: 円(엔)
KR: 원

View File

@@ -25,6 +25,7 @@
<jsp:include page="/WEB-INF/views/comm/Include.jsp"/> <jsp:include page="/WEB-INF/views/comm/Include.jsp"/>
<spring:eval expression="@environment.getProperty('sopmalfo.common.fileupload.cdnurl')" var="cdnurl"/> <spring:eval expression="@environment.getProperty('sopmalfo.common.fileupload.cdnurl')" var="cdnurl"/>
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
<!--************************************ 네이버페이 시작 *********************************--> <!--************************************ 네이버페이 시작 *********************************-->
<!--[ 네이버 구매하기버튼 스크립트 ]--> <!--[ 네이버 구매하기버튼 스크립트 ]-->
<c:if test="${profiles eq 'stage'}"> <c:if test="${profiles eq 'stage'}">
@@ -730,7 +731,7 @@
var $number = $counter.find(".productDetailInfo__count__amountNumber"); var $number = $counter.find(".productDetailInfo__count__amountNumber");
var $price = $counter.find(".productDetailInfo__count__priceNum"); var $price = $counter.find(".productDetailInfo__count__priceNum");
$number.text(productArr[$index][1]); $number.text(productArr[$index][1]);
$price.text(addComma(productArr[$index][3]) + "원"); $price.text(addComma(productArr[$index][3]) + '${curUnit}');
}); });
updateTotalPrice(); // 총 상품금액 업데이트 updateTotalPrice(); // 총 상품금액 업데이트
} }
@@ -1287,24 +1288,24 @@
<tbody> <tbody>
<tr> <tr>
<th>기본배송비</th> <th>기본배송비</th>
<td>\${dftDlvyAmt}\원</td> <td>\${dftDlvyAmt}\\${curUnit}\</td>
</tr>`; </tr>`;
//금액 구간이 있을 경우 //금액 구간이 있을 경우
let amtCndUseCn = amtCndUseAt === 'Y' ? `<tr> let amtCndUseCn = amtCndUseAt === 'Y' ? `<tr>
<th>\${amtCndAditAmt}\원 이상 ~</th> <th>\${amtCndAditAmt}\\${curUnit}\ 이상 ~</th>
<td>0원</td> <td>0\${curUnit}\</td>
</tr>` : ""; </tr>` : "";
//개수조건 있을 경우 //개수조건 있을 경우
let cntCndUseCn = cntCndUseAt === 'Y' ? `<tr> let cntCndUseCn = cntCndUseAt === 'Y' ? `<tr>
<th>\${cntCndAditAmt}\개 이상 ~</th> <th>\${cntCndAditAmt}\개 이상 ~</th>
<td>0원</td> <td>0\${curUnit}\</td>
</tr>` : ""; </tr>` : "";
// 묶음배송 있을 경우 // 묶음배송 있을 경우
let bundleDlvyUseCn = bundleDlvyUseAt === 'Y' ? `<tr> let bundleDlvyUseCn = bundleDlvyUseAt === 'Y' ? `<tr>
<th>\${bundleDlvyCndAmt}\원 이상 ~</th> <th>\${bundleDlvyCndAmt}\\${curUnit}\ 이상 ~</th>
<td>0원(묶음 배송)</td> <td>0\${curUnit}\(묶음 배송)</td>
</tr>` : ""; </tr>` : "";
let dftDlvyAmtCnEnd = ` </tbody> let dftDlvyAmtCnEnd = ` </tbody>
@@ -1324,15 +1325,15 @@
<tbody> <tbody>
<tr> <tr>
<th>도서산간</th> <th>도서산간</th>
<td>\${areaAditDlvyAmt}\원</td> <td>\${areaAditDlvyAmt}\\${curUnit}\</td>
</tr> </tr>
<tr> <tr>
<th>제주지역</th> <th>제주지역</th>
<td>\${areaAditDlvyAmt}\원</td> <td>\${areaAditDlvyAmt}\\${curUnit}\</td>
</tr> </tr>
<tr> <tr>
<th>제주도서산간</th> <th>제주도서산간</th>
<td>\${areaAditDlvyAmt}\원</td> <td>\${areaAditDlvyAmt}\\${curUnit}\</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -1411,24 +1412,24 @@
/*포토리뷰 금액 존재 여부에 따른 html 구성*/ /*포토리뷰 금액 존재 여부에 따른 html 구성*/
let photoMilCn = photoRvwMlgAccmlmnyAmt !== '0' ? ` <dl> let photoMilCn = photoRvwMlgAccmlmnyAmt !== '0' ? ` <dl>
<dt> 2.포토리뷰 </dt> <dt> 2.포토리뷰 </dt>
<dd>마일리지 <em>\${photoRvwMlgAccmlmnyAmt}\원</em> 적립</dd> <dd>마일리지 <em>\${photoRvwMlgAccmlmnyAmt}\\${curUnit}\</em> 적립</dd>
</dl>` : ''; </dl>` : '';
/*일반리뷰, 포토리뷰 추가마일리지 여부에 따른 html 구성*/ /*일반리뷰, 포토리뷰 추가마일리지 여부에 따른 html 구성*/
let aditMlgCn = aditPymntMlgAccmlmnyAmt !== '0' ? ` <dl> let aditMlgCn = aditPymntMlgAccmlmnyAmt !== '0' ? ` <dl>
<dt>4. 일반 리뷰 ,포토 리뷰 추가 마일리지(\${monthAditMlgPymntBgnDe}\ ~ \${monthAditMlgPymntEndDe}\ )</dt> <dt>4. 일반 리뷰 ,포토 리뷰 추가 마일리지(\${monthAditMlgPymntBgnDe}\ ~ \${monthAditMlgPymntEndDe}\ )</dt>
<dd>마일리지 <em>\${aditPymntMlgAccmlmnyAmt}\원</em> 적립</dd> <dd>마일리지 <em>\${aditPymntMlgAccmlmnyAmt}\\${curUnit}\</em> 적립</dd>
</dl>` : ''; </dl>` : '';
/*한딜리뷰 사용 여부에 따른 html 구성*/ /*한딜리뷰 사용 여부에 따른 html 구성*/
let monthMilCn = monthBbsExpsrAt === 'Y' ? `<dl> let monthMilCn = monthBbsExpsrAt === 'Y' ? `<dl>
<dt>3. 한달 리뷰</dt> <dt>3. 한달 리뷰</dt>
<dd>마일리지 <em>\${monthPhotoRvwMlgAccmlmnyAmt}\원</em> 적립</dd> <dd>마일리지 <em>\${monthPhotoRvwMlgAccmlmnyAmt}\\${curUnit}\</em> 적립</dd>
</dl>` : ''; </dl>` : '';
/* 한달 리뷰 추가마일리지 여부에 따른 html 구성*/ /* 한달 리뷰 추가마일리지 여부에 따른 html 구성*/
let monthAditMlgCn = monthAditPymntMlgAccmlmnyAmt !== '0' ? ` <dl> let monthAditMlgCn = monthAditPymntMlgAccmlmnyAmt !== '0' ? ` <dl>
<dt>5. 한달 리뷰 추가 마일리지(\${monthAditMlgPymntBgnDe}\ ~ \${monthAditMlgPymntEndDe}\)</dt> <dt>5. 한달 리뷰 추가 마일리지(\${monthAditMlgPymntBgnDe}\ ~ \${monthAditMlgPymntEndDe}\)</dt>
<dd>마일리지 <em>\${monthAditPymntMlgAccmlmnyAmt}\원</em> 적립</dd> <dd>마일리지 <em>\${monthAditPymntMlgAccmlmnyAmt}\\${curUnit}\</em> 적립</dd>
</dl>` : ''; </dl>` : '';
/*한달리뷰 사용 여부에 따른 분기 처리(상품 설정에 따른)*/ /*한달리뷰 사용 여부에 따른 분기 처리(상품 설정에 따른)*/
const MtRvwWritngPosblAt = $("#MtRvwWritngPosblAt").val(); const MtRvwWritngPosblAt = $("#MtRvwWritngPosblAt").val();
@@ -1439,7 +1440,7 @@
/* 분기처리후 최종 html*/ /* 분기처리후 최종 html*/
let rvwBnefInfoCn = `<dl> let rvwBnefInfoCn = `<dl>
<dt>1. 일반 리뷰(구매후기)</dt> <dt>1. 일반 리뷰(구매후기)</dt>
<dd>마일리지 <em>\${gnrlRvwMlgAccmlmnyAmt}\원</em> 적립</dd> <dd>마일리지 <em>\${gnrlRvwMlgAccmlmnyAmt}\\${curUnit}\</em> 적립</dd>
</dl> </dl>
\${photoMilCn} \${photoMilCn}
\${aditMlgCn} \${aditMlgCn}
@@ -1487,7 +1488,7 @@
if(mbrId == "npay2024"){ if(mbrId == "npay2024"){
$('#_naverPayArea').show(); $('#_naverPayArea').show();
}else{ }else{
if("${naverPayYn}" == "N" || $('#_salesPrice').text().trim() === "0원"){ if("${naverPayYn}" == "N" || $('#_salesPrice').text().trim() === "0${curUnit}"){
$('#_naverPayArea').hide(); $('#_naverPayArea').hide();
}else{ }else{
$('#_naverPayArea').show(); $('#_naverPayArea').show();
@@ -3972,7 +3973,7 @@
<span class="productDetailInfo__price__current" id="_salesPrice"> <span class="productDetailInfo__price__current" id="_salesPrice">
<span class="comma"><fmt:formatNumber <span class="comma"><fmt:formatNumber
value="${resultMap.goodsDtl.slepric}"/></span><span value="${resultMap.goodsDtl.slepric}"/></span><span
class="priceUnit">원</span> class="priceUnit">${curUnit}</span>
</span> </span>
</div> </div>
</c:if> </c:if>
@@ -4006,7 +4007,7 @@
<div class="productDetailInfo__price__current coupon" style="font-size: large; color: #e34747;"> <div class="productDetailInfo__price__current coupon" style="font-size: large; color: #e34747;">
<span class="productCoupon__text">최대혜택가</span> <span class="productCoupon__text">최대혜택가</span>
<span class="comma"><fmt:formatNumber value="${resultMap.goodsDtl.dcSlepric}"/></span><span <span class="comma"><fmt:formatNumber value="${resultMap.goodsDtl.dcSlepric}"/></span><span
class="priceUnit"></span>원 class="priceUnit"></span>${curUnit}
<span class="percent">${resultMap.goodsDtl.dcPercent}%</span> &nbsp; <span class="percent">${resultMap.goodsDtl.dcPercent}%</span> &nbsp;
<button id="dcPrice" class="infoBtn"> <button id="dcPrice" class="infoBtn">
<i class="icon icon_question"></i> <i class="icon icon_question"></i>
@@ -4051,12 +4052,12 @@
<c:if test="${resultMap.goodsDtl.amtCndUseAt eq 'Y'}"> <c:if test="${resultMap.goodsDtl.amtCndUseAt eq 'Y'}">
(<span class="comma"><c:out (<span class="comma"><c:out
value="${resultMap.goodsDtl.amtCndAditAmt}" default="0"/></span> value="${resultMap.goodsDtl.amtCndAditAmt}" default="0"/></span>
<span class="priceUnit">원</span> 이상 무료 배송) <span class="priceUnit">${curUnit}</span> 이상 무료 배송)
</c:if> </c:if>
<c:if test="${resultMap.goodsDtl.dlvyGroupDvCd eq '03'}"> <c:if test="${resultMap.goodsDtl.dlvyGroupDvCd eq '03'}">
(<span class="comma">유료배송 : <c:out (<span class="comma">유료배송 : <c:out
value="${resultMap.goodsDtl.dftDlvyAmt}" default="0"/></span> value="${resultMap.goodsDtl.dftDlvyAmt}" default="0"/></span>
<span class="priceUnit">원</span>) <span class="priceUnit">${curUnit}</span>)
</c:if> </c:if>
<c:if test="${ resultMap.goodsDtl.amtCndUseAt eq 'Y'}"> <c:if test="${ resultMap.goodsDtl.amtCndUseAt eq 'Y'}">
<button id="deliveryFeeInfo" class="infoBtn"><i <button id="deliveryFeeInfo" class="infoBtn"><i
@@ -4076,7 +4077,7 @@
<%--구입시 해당 상품 마일리지 적립 금액--%> <%--구입시 해당 상품 마일리지 적립 금액--%>
<dd> <dd>
<em><span class="comma"><fmt:formatNumber value="${(resultMap.goodsDtl.mlgAccmlAmt + resultMap.goodsDtl.gradMlgAccmlAmt + resultMap.goodsDtl.evtMlgAccmlAmt) }"/></span> <em><span class="comma"><fmt:formatNumber value="${(resultMap.goodsDtl.mlgAccmlAmt + resultMap.goodsDtl.gradMlgAccmlAmt + resultMap.goodsDtl.evtMlgAccmlAmt) }"/></span>
<span class="priceUnit">원</span></em> <span class="priceUnit">${curUnit}</span></em>
<c:if test = "${resultMap.goodsDtl.rvwWritngPosblAt eq 'Y'}"> <c:if test = "${resultMap.goodsDtl.rvwWritngPosblAt eq 'Y'}">
· 리뷰작성시 적립 · 리뷰작성시 적립
<button id="reviewBenefit" class="infoBtn"> <button id="reviewBenefit" class="infoBtn">
@@ -4112,7 +4113,7 @@
<c:if test="${goodsOpt01.disableAt eq 'Y'}"> <span>(품절)</span></c:if> <c:if test="${goodsOpt01.disableAt eq 'Y'}"> <span>(품절)</span></c:if>
</div> </div>
<div class="productDetailInfo__option__right"> <div class="productDetailInfo__option__right">
<span class="productDetailInfo__option__price"><span class="comma"><c:out value="${goodsOpt01.slepric}"/></span> <span class="priceUnit"> 원</span></span> <span class="productDetailInfo__option__price"><span class="comma"><c:out value="${goodsOpt01.slepric}"/></span> <span class="priceUnit"> ${curUnit}</span></span>
<span class="productDetailInfo__option__monthly-payment"><c:out value="${goodsOpt01.optnInfo}"/></span> <span class="productDetailInfo__option__monthly-payment"><c:out value="${goodsOpt01.optnInfo}"/></span>
</div> </div>
</c:if> </c:if>
@@ -4255,11 +4256,11 @@
class="product-unit-price__original"><span class="product-unit-price__original"><span
class="comma"><c:out class="comma"><c:out
value="${relateInfo.cnsmrpric}"/> </span><span value="${relateInfo.cnsmrpric}"/> </span><span
class="priceUnit">원</span></span> class="priceUnit">${curUnit}</span></span>
<span class="product-unit-price__current"><span <span class="product-unit-price__current"><span
class="comma"><fmt:formatNumber class="comma"><fmt:formatNumber
value="${relateInfo.slepric}"/> </span><span value="${relateInfo.slepric}"/> </span><span
class="priceUnit">원</span></span> class="priceUnit">${curUnit}</span></span>
</div> </div>
<div class="product-unit-price__sale"> <div class="product-unit-price__sale">
<span class="percent"> <span class="percent">
@@ -4298,7 +4299,7 @@
<span class="productDetailInfo__priceTotal__text">총 상품금액</span> <span class="productDetailInfo__priceTotal__text">총 상품금액</span>
<span class="productDetailInfo__priceTotal__price"><span <span class="productDetailInfo__priceTotal__price"><span
class="comma"></span><span class="productDetailInfo__priceTotal__totalPriceNum">0</span><span class="comma"></span><span class="productDetailInfo__priceTotal__totalPriceNum">0</span><span
class="won">원</span></span> class="won">${curUnit}</span></span>
</div> </div>
</c:if> </c:if>
<c:choose> <c:choose>
@@ -4503,7 +4504,7 @@
<span class="fixedProduct__price"> <span class="fixedProduct__price">
<span class="comma"> <span class="comma">
<fmt:formatNumber value="${resultMap.goodsDtl.slepric}" pattern="#,###"/></span> <fmt:formatNumber value="${resultMap.goodsDtl.slepric}" pattern="#,###"/></span>
<span class="priceUnit"></span><span class="priceUnit">원</span> <span class="priceUnit"></span><span class="priceUnit">${curUnit}</span>
</span> </span>
</div> </div>
</div> </div>
@@ -4783,20 +4784,20 @@
<ul class="productDetailInfo__saleList" style="font-size: 15px; color: #16191d"> <ul class="productDetailInfo__saleList" style="font-size: 15px; color: #16191d">
<li class="productDetailInfo__saleItem" style="display: flex; justify-content: center; align-items: end;"> <li class="productDetailInfo__saleItem" style="display: flex; justify-content: center; align-items: end;">
<span class="productDetailInfo__miscTh">상품가격</span> <span class="productDetailInfo__miscTh">상품가격</span>
<span class="productDetailInfo__miscTd" style="margin-left: auto;"><span class="comma" style=" margin-left: auto;"><fmt:formatNumber value="${resultMap.goodsDtl.slepric}"/> </span><span class="priceUnit" style="font-size: small;">원</span></span> <span class="productDetailInfo__miscTd" style="margin-left: auto;"><span class="comma" style=" margin-left: auto;"><fmt:formatNumber value="${resultMap.goodsDtl.slepric}"/> </span><span class="priceUnit" style="font-size: small;">${curUnit}</span></span>
</li> </li>
<hr style="color:darkgray"/> <hr style="color:darkgray"/>
<c:if test="${resultMap.goodsDtl.eventAt eq 'Y'}"> <c:if test="${resultMap.goodsDtl.eventAt eq 'Y'}">
<li class="productDetailInfo__saleItem" style="display: flex; justify-content: center; align-items: end;"> <li class="productDetailInfo__saleItem" style="display: flex; justify-content: center; align-items: end;">
<span class="productDetailInfo__miscTh">이벤트 <c:if test="${ not empty resultMap.goodsDtl.evtnm}"><br/><span style="font-size: small;">${resultMap.goodsDtl.evtnm}</span></c:if></span> <span class="productDetailInfo__miscTh">이벤트 <c:if test="${ not empty resultMap.goodsDtl.evtnm}"><br/><span style="font-size: small;">${resultMap.goodsDtl.evtnm}</span></c:if></span>
<span class="productDetailInfo__miscTd" style=" margin-left: auto;"><span class="comma">-<fmt:formatNumber value="${resultMap.goodsDtl.evtAditDscntAmt}"/> </span><span class="priceUnit" style="font-size: small;">원</span></span> <span class="productDetailInfo__miscTd" style=" margin-left: auto;"><span class="comma">-<fmt:formatNumber value="${resultMap.goodsDtl.evtAditDscntAmt}"/> </span><span class="priceUnit" style="font-size: small;">${curUnit}</span></span>
</li> </li>
<hr style="color:darkgray"/> <hr style="color:darkgray"/>
</c:if> </c:if>
<c:if test="${resultMap.goodsDtl.dplctLmttCoupon eq '99' or resultMap.goodsDtl.dplctLmttCoupon eq '03'}"> <c:if test="${resultMap.goodsDtl.dplctLmttCoupon eq '99' or resultMap.goodsDtl.dplctLmttCoupon eq '03'}">
<li class="productDetailInfo__saleItem" style="display: flex; justify-content: center; align-items: end;"> <li class="productDetailInfo__saleItem" style="display: flex; justify-content: center; align-items: end;">
<span class="productDetailInfo__miscTh">상품 쿠폰<c:if test="${ not empty resultMap.goodsDtl.gdCouponSndngNm}"> <br/><span style="font-size: small;">${resultMap.goodsDtl.gdCouponSndngNm }</span></c:if></span> <span class="productDetailInfo__miscTh">상품 쿠폰<c:if test="${ not empty resultMap.goodsDtl.gdCouponSndngNm}"> <br/><span style="font-size: small;">${resultMap.goodsDtl.gdCouponSndngNm }</span></c:if></span>
<span class="productDetailInfo__miscTd" style=" margin-left: auto;" ><span class="comma">-<fmt:formatNumber value="${resultMap.goodsDtl.gdAditDscntAmt}"/> </span><span class="priceUnit" style="font-size: small;">원</span></span> <span class="productDetailInfo__miscTd" style=" margin-left: auto;" ><span class="comma">-<fmt:formatNumber value="${resultMap.goodsDtl.gdAditDscntAmt}"/> </span><span class="priceUnit" style="font-size: small;">${curUnit}</span></span>
</li> </li>
<hr style="color:darkgray"/> <hr style="color:darkgray"/>
</c:if> </c:if>
@@ -4809,7 +4810,7 @@
<span class="percent" style=" margin-left: auto;">-<fmt:formatNumber value="${resultMap.goodsDtl.ctAditDscntAmt}"/> </span><span class="priceUnit" style="font-size: small;">%</span> <span class="percent" style=" margin-left: auto;">-<fmt:formatNumber value="${resultMap.goodsDtl.ctAditDscntAmt}"/> </span><span class="priceUnit" style="font-size: small;">%</span>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<span class="comma" style=" margin-left: auto;">-<fmt:formatNumber value="${resultMap.goodsDtl.ctAditDscntAmt}"/> </span><span class="priceUnit" style="font-size: small;">원</span> <span class="comma" style=" margin-left: auto;">-<fmt:formatNumber value="${resultMap.goodsDtl.ctAditDscntAmt}"/> </span><span class="priceUnit" style="font-size: small;">${curUnit}</span>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</span> </span>
@@ -4818,7 +4819,7 @@
</c:if> </c:if>
<li class="productDetailInfo__saleItem" style="display: flex; justify-content: center; align-items: end;"> <li class="productDetailInfo__saleItem" style="display: flex; justify-content: center; align-items: end;">
<span class="productDetailInfo__miscTh" style="color:red;">최대혜택가</span> <span class="productDetailInfo__miscTh" style="color:red;">최대혜택가</span>
<span class="productDetailInfo__miscTd" style="margin-left:auto;color:red; "><span class="comma"><fmt:formatNumber value="${resultMap.goodsDtl.dcSlepric}"/> </span><span class="priceUnit" style="font-size: small;">원</span></span> <span class="productDetailInfo__miscTd" style="margin-left:auto;color:red; "><span class="comma"><fmt:formatNumber value="${resultMap.goodsDtl.dcSlepric}"/> </span><span class="priceUnit" style="font-size: small;">${curUnit}</span></span>
</li> </li>
</ul> </ul>
</div> </div>