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

상품상세 즉시할인 노출

eskim 5 лет назад
Родитель
Сommit
784ff3499a

+ 9 - 0
src/main/java/com/style24/front/biz/web/TsfGoodsController.java

@@ -214,6 +214,11 @@ public class TsfGoodsController extends TsfBaseController {
 			goodsCouponList = couponService.getGoodsCouponList(paramsGoods);
 			mav.addObject("goodsCouponList", goodsCouponList);
 
+			//즉시쿠폰
+			paramsGoods.setMaxRownum(1);
+			goodsCouponList = couponService.getGoodsCoupon1List(paramsGoods);
+			mav.addObject("goodsCoupon1List", goodsCouponList);
+
 			// 다다익선
 			paramsGoods.setMaxRownum(1);
 			mav.addObject("tmtbList", goodsService.getTmtbList(paramsGoods));
@@ -304,6 +309,10 @@ public class TsfGoodsController extends TsfBaseController {
 			lookbook.setCustNo(paramsGoods.getCustNo());
 			mav.addObject("lookbookList", coreLookbookService.getLookbookListForGoods(lookbook));
 
+			// 상품 즉시할인 쿠폰정보
+			paramsGoods.setMaxRownum(1);
+			mav.addObject("goodsCoupon1List", couponService.getGoodsCoupon1List(paramsGoods));
+
 			// 상품쿠폰
 			paramsGoods.setMaxRownum(1);
 			mav.addObject("goodsCouponList", couponService.getGoodsCouponList(paramsGoods));

+ 15 - 5
src/main/webapp/WEB-INF/views/mob/goods/GoodsDealDetailFormMob.html

@@ -103,16 +103,26 @@
 			<div class="inner" th:if="${(cardInfoList != null and !cardInfoList.empty) or
 									(goodsCouponList != null and !goodsCouponList.empty) or
 									(tmtbList != null and !tmtbList.empty) or
-									(freeGoodsList != null and !freeGoodsList.empty)}" >
+									(freeGoodsList != null and !freeGoodsList.empty) or 
+									(goodsCoupon1List != null and !goodsCoupon1List.empty)}" >
 				<div class="benefit_box">
-					<dl class="bnf_shopping" th:if="${(goodsCouponList != null and !goodsCouponList.empty) or (tmtbList != null and !tmtbList.empty)}">
+					<dl class="bnf_shopping" th:if="${(goodsCouponList != null and !goodsCouponList.empty) or 
+													(tmtbList != null and !tmtbList.empty) or
+													(freeGoodsList != null and !freeGoodsList.empty) or 
+													(goodsCoupon1List != null and !goodsCoupon1List.empty)}">
 						<dt>쇼핑혜택</dt>
 						<dd>
+							<th:block th:if="${goodsCoupon1List != null and !goodsCoupon1List.empty}">
+							<span th:each="goodsCoupon, status : ${goodsCoupon1List}" th:if="${status.first}"><em>
+								<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
+								<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
+								</em> 즉시할인</span>
+							</th:block> 
 							<th:block th:if="${goodsCouponList != null and !goodsCouponList.empty}">
 							<span th:each="goodsCoupon, status : ${goodsCouponList}" th:if="${status.first}">최대 <em>
-										<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
-										<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
-										</em> 쿠폰 할인</span>
+							<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
+							<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
+							</em> 쿠폰 할인</span>
 							</th:block> 
 							<th:block th:if="${tmtbList != null and !tmtbList.empty}">
 							<span th:each="tmtb, status : ${tmtbList}" th:if="${status.first}">

+ 13 - 5
src/main/webapp/WEB-INF/views/mob/goods/GoodsDetailFormMob.html

@@ -200,18 +200,26 @@
 			<div class="inner" th:if="${(cardInfoList != null and !cardInfoList.empty) or
 									(goodsCouponList != null and !goodsCouponList.empty) or
 									(tmtbList != null and !tmtbList.empty) or
-									(freeGoodsList != null and !freeGoodsList.empty)}" >
+									(freeGoodsList != null and !freeGoodsList.empty) or 
+									(goodsCoupon1List != null and !goodsCoupon1List.empty)}" >
 				<div class="benefit_box">
 					<dl class="bnf_shopping" th:if="${(goodsCouponList != null and !goodsCouponList.empty) or
 													(tmtbList != null and !tmtbList.empty) or
-													(freeGoodsList != null and !freeGoodsList.empty)}" >
+													(freeGoodsList != null and !freeGoodsList.empty) or 
+													(goodsCoupon1List != null and !goodsCoupon1List.empty)}" >
 						<dt>쇼핑혜택</dt>
 						<dd>
+							<th:block th:if="${goodsCoupon1List != null and !goodsCoupon1List.empty}">
+							<span th:each="goodsCoupon, status : ${goodsCoupon1List}" th:if="${status.first}"><em>
+								<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
+								<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
+								</em> 즉시할인</span>
+							</th:block> 
 							<th:block th:if="${goodsCouponList != null and !goodsCouponList.empty}">
 							<span th:each="goodsCoupon, status : ${goodsCouponList}" th:if="${status.first}">최대 <em>
-										<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
-										<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
-										</em> 쿠폰 할인</span>
+								<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
+								<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
+								</em> 쿠폰 할인</span>
 							</th:block> 
 							<th:block th:if="${tmtbList != null and !tmtbList.empty}">
 							<span th:each="tmtb, status : ${tmtbList}" th:if="${status.first}">

+ 1 - 1
src/main/webapp/WEB-INF/views/mob/goods/GoodsShopBenefitFormMob.html

@@ -32,7 +32,7 @@
 							<tbody>
 								<tr th:if="${(goodsCoupon1List != null and !goodsCoupon1List.empty)}">
 									<th>즉시할인</th>
-									<td th:each="goodsCoupon, status : ${goodsCoupon1List}" th:if="${status.first}"><p>최대
+									<td th:each="goodsCoupon, status : ${goodsCoupon1List}" th:if="${status.first}"><p>
 									<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
 									<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
 									 할인</p></td>

+ 11 - 1
src/main/webapp/WEB-INF/views/web/goods/GoodsDealDetailFormWeb.html

@@ -125,9 +125,19 @@
 								<dl>
 									<div class="bnf_shopping" th:if="${(goodsCouponList != null and !goodsCouponList.empty) or
 																		(tmtbList != null and !tmtbList.empty) or
-																		(freeGoodsList != null and !freeGoodsList.empty)}" >
+																		(freeGoodsList != null and !freeGoodsList.empty)  or 
+																		(goodsCoupon1List != null and !goodsCoupon1List.empty)}" >
 										<dt>쇼핑혜택</dt>
 											<dd>
+												<span th:if="${(goodsCoupon1List != null and !goodsCoupon1List.empty)}">
+												<th:block th:each="goodsCoupon, status : ${goodsCoupon1List}" th:if="${status.first}">
+													<em class="c_primary" >
+													<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
+													<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
+													</em>
+													 즉시할인
+												</th:block>
+												</span>
 												<span th:if="${goodsCouponList != null and !goodsCouponList.empty}">
 												<th:block th:each="goodsCoupon, status : ${goodsCouponList}" th:if="${status.first}">
 												최대 <em class="c_primary" >

+ 11 - 1
src/main/webapp/WEB-INF/views/web/goods/GoodsDetailFormWeb.html

@@ -180,9 +180,19 @@
 								<dl>
 									<div class="bnf_shopping" th:if="${(goodsCouponList != null and !goodsCouponList.empty) or
 																		(tmtbList != null and !tmtbList.empty) or
-																		(freeGoodsList != null and !freeGoodsList.empty)}" >
+																		(freeGoodsList != null and !freeGoodsList.empty) or 
+																		(goodsCoupon1List != null and !goodsCoupon1List.empty) }" >
 										<dt>쇼핑혜택</dt>
 											<dd>
+												<span th:if="${(goodsCoupon1List != null and !goodsCoupon1List.empty)}">
+												<th:block th:each="goodsCoupon, status : ${goodsCoupon1List}" th:if="${status.first}">
+													<em class="c_primary" >
+													<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
+													<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
+													</em>
+													 즉시할인
+												</th:block>
+												</span>
 												<span th:if="${goodsCouponList != null and !goodsCouponList.empty}">
 												<th:block th:each="goodsCoupon, status : ${goodsCouponList}" th:if="${status.first}">
 												최대 <em class="c_primary" >

+ 1 - 1
src/main/webapp/WEB-INF/views/web/goods/GoodsShopBenefitFormWeb.html

@@ -32,7 +32,7 @@
 							<tbody>
 								<tr th:if="${(goodsCoupon1List != null and !goodsCoupon1List.empty)}">
 									<th>즉시할인</th>
-									<td th:each="goodsCoupon, status : ${goodsCoupon1List}" th:if="${status.first}">최대
+									<td th:each="goodsCoupon, status : ${goodsCoupon1List}" th:if="${status.first}">
 									<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
 									<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
 									 할인</td>