Просмотр исходного кода

상품권 현금영수증 90일 이내 버튼 노출

yujung 4 лет назад
Родитель
Сommit
da2304ee2d

+ 5 - 3
src/main/java/com/style24/front/biz/web/TsfMypageController.java

@@ -305,6 +305,7 @@ public class TsfMypageController extends TsfBaseController {
 		mav.addObject("kcpReceiptUrl", env.getProperty("pg.kcp.receipt.url"));
 
 		// 주문일 경과 일
+		long diffDays = 0;
 		try {
 			Calendar eddt = Calendar.getInstance();
 			eddt.setTime(new Date());
@@ -314,12 +315,13 @@ public class TsfMypageController extends TsfBaseController {
 			cmpDate.setTime(stdt);
 
 			long diffSec = (eddt.getTimeInMillis() - cmpDate.getTimeInMillis()) / 1000;
-			long diffDays = diffSec / (24 * 60 * 60); // 일수
-			log.info("diffDays >>>> {}", diffDays);
-			mav.addObject("diffDays", diffDays);
+			diffDays = diffSec / (24 * 60 * 60); // 일수
 		} catch (Exception e) {
 
 		}
+
+		mav.addObject("diffDays", diffDays);
+
 		mav.setViewName(super.getDeviceViewName("mypage/MypageOrderDetailForm"));
 
 		return mav;

+ 2 - 2
src/main/webapp/WEB-INF/views/mob/mypage/MypageOrderDetailFormMob.html

@@ -765,9 +765,9 @@
 					</table>
 					<button type="button" class="btn btn_default btn_sm" th:if="${paymentInfo.pgGb == 'KCP' and paymentInfo.payMeans == 'G014_30'}" onclick="fnReceipt('card')"><span>신용카드 전표</span></button>
 					<button type="button" class="btn btn_default btn_sm" th:if="${paymentInfo.pgGb == 'KCP' and not #strings.isEmpty(paymentInfo.cashAuthNo) and (paymentInfo.payMeans == 'G014_10' or paymentInfo.payMeans == 'G014_20')}" onclick="fnReceipt('cash')"><span>현금 영수증</span></button>
-<!--					<th:block th:if="${diffDays < 90}">-->
+					<th:block th:if="${diffDays < 90}">
 					<button type="button" class="btn btn_default btn_sm" th:if="${orderAmtInfo.gfcdUseAmt > 0 and (cashReceiptsInfo == null or #strings.isEmpty(cashReceiptsInfo.authNo))}" th:attr="ordNo=${ordNo}" onclick="fnRequestCashReceipt(this);"><span>상품권 현금 영수증 신청</span></button>
-<!--					</th:block>-->
+					</th:block>
 					<!-- 
 					<button type="button" class="btn btn_default btn_sm" th:if="${orderAmtInfo.gfcdUseAmt > 0 and #strings.isEmpty(paymentInfo.cashAuthNo)}" th:attr="ordNo=${ordNo}" onclick="fnRequestCashReceipt(this);"><span>상품권 현금 영수증 신청</span></button>
 					 -->

+ 3 - 3
src/main/webapp/WEB-INF/views/web/mypage/MypageOrderDetailFormWeb.html

@@ -473,9 +473,9 @@
 													<dd>
 														<button type="button" class="btn btn_default btn_sm" th:if="${paymentInfo.pgGb == 'KCP' and paymentInfo.payMeans == 'G014_30'}" onclick="fnReceipt('card')"><span>신용카드 전표</span></button>
 														<button type="button" class="btn btn_default btn_sm" th:if="${paymentInfo.pgGb == 'KCP' and not #strings.isEmpty(paymentInfo.cashAuthNo) and (paymentInfo.payMeans == 'G014_10' or paymentInfo.payMeans == 'G014_20')}" onclick="fnReceipt('cash')"><span>현금 영수증</span></button>
-<!--														<th:block th:if="${diffDays < 90}">-->
-															<button type="button" class="btn btn_default btn_sm" th:if="${orderAmtInfo.gfcdUseAmt > 0 and (cashReceiptsInfo == null or #strings.isEmpty(cashReceiptsInfo.authNo))}" th:attr="ordNo=${ordNo}" onclick="fnRequestCashReceipt(this);"><span>상품권 현금 영수증 신청</span></button>
-<!--														</th:block>-->
+														<th:block th:if="${diffDays < 90}">
+														<button type="button" class="btn btn_default btn_sm" th:if="${orderAmtInfo.gfcdUseAmt > 0 and (cashReceiptsInfo == null or #strings.isEmpty(cashReceiptsInfo.authNo))}" th:attr="ordNo=${ordNo}" onclick="fnRequestCashReceipt(this);"><span>상품권 현금 영수증 신청</span></button>
+														</th:block>
 													</dd>
 												</div>
 											</dl>