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

상품상세 공통 베너 처리

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

+ 35 - 1
src/main/java/com/style24/front/biz/web/TsfGoodsController.java

@@ -24,6 +24,7 @@ import com.style24.core.support.env.TscConstants;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.front.biz.service.TsfCounselService;
 import com.style24.front.biz.service.TsfCouponService;
+import com.style24.front.biz.service.TsfDisplayService;
 import com.style24.front.biz.service.TsfGoodsService;
 import com.style24.front.biz.service.TsfRendererService;
 import com.style24.front.biz.service.TsfReviewService;
@@ -34,6 +35,7 @@ import com.style24.front.support.security.session.TsfSession;
 import com.style24.persistence.TscPageRequest;
 import com.style24.persistence.domain.CardPromotion;
 import com.style24.persistence.domain.CommonCode;
+import com.style24.persistence.domain.Contents;
 import com.style24.persistence.domain.Counsel;
 import com.style24.persistence.domain.Coupon;
 import com.style24.persistence.domain.Goods;
@@ -90,6 +92,9 @@ public class TsfGoodsController extends TsfBaseController {
 
 	@Autowired
 	private TsfWishlistService wishListService;
+	
+	@Autowired
+	private TsfDisplayService displayService;
 
 	@Value("${has-ssl}")
 	private String hasSsl;
@@ -174,7 +179,9 @@ public class TsfGoodsController extends TsfBaseController {
 		mav.addObject("goodsVideoList", goodsService.getVideoList(goodsVideo));
 		// 상품 공지
 		mav.addObject("goodsNoticeList", goodsService.getGoodsNoticeList(paramsGoods));
-
+		
+		
+				
 		int goodsReviewCnt = 0;
 		if (TscConstants.GoodsType.DEAL.value().equals(goods.getGoodsType())) {	// 딜상품
 
@@ -263,6 +270,19 @@ public class TsfGoodsController extends TsfBaseController {
 				mav.addObject("goodsList", goodsService.getTmtbGoodsList(paramsGoods));
 			}
 
+			// 상품 공통 베너
+			log.info("paramsGoods={}", paramsGoods);
+			Contents contents = new Contents();
+			contents.setContentsLoc("SPM001");
+			contents.setPreview(paramsGoods.getPreview());
+			contents.setViewDt(paramsGoods.getViewDt());
+			contents.setMaxRow(1);
+			if ("P".equals(paramsGoods.getFrontGb())){
+				contents.setCateNo(1714);
+			}else {
+				contents.setCateNo(1724);
+			}
+			mav.addObject("goodsBannerList", displayService.getContentsList(contents));
 		}
 
 		// 상품 문의건수
@@ -1265,6 +1285,20 @@ public class TsfGoodsController extends TsfBaseController {
 		mav.addObject("goodsNotiList", goodsService.getGoodsNotiList(goods));
 		// 상품 안전인증 정보
 		mav.addObject("goodsSafeNo", goodsService.getGoodsSafeNo(goods));
+		
+		// 상품 공통 베너
+		log.info("paramsGoods={}", paramsGoods);
+		Contents contents = new Contents();
+		contents.setContentsLoc("SPM001");
+		contents.setPreview(paramsGoods.getPreview());
+		contents.setViewDt(paramsGoods.getViewDt());
+		contents.setMaxRow(1);
+		if ("P".equals(paramsGoods.getFrontGb())){
+			contents.setCateNo(1714);
+		}else {
+			contents.setCateNo(1724);
+		}
+		mav.addObject("goodsBannerList", displayService.getContentsList(contents));
 
 		mav.addObject("params", paramsGoods);
 

+ 26 - 0
src/main/webapp/WEB-INF/views/mob/goods/GoodsDealDescFormMob.html

@@ -35,10 +35,36 @@
 			</div>
 		</div>
 		<!-- //상품설명 노출 -->
+		<th:block th:each="goodsVideo, status : ${goodsVideoList}">
+		<div class="movblock">
+			<th:block th:if="${goodsVideo.videoGb == 'Y'}">
+			<iframe th:src="${'https://www.youtube.com/embed/'+goodsVideo.kmcKey+'?rel=0'}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+			</th:block>
+			<th:block th:unless="${goodsVideo.videoGb == 'Y'}">
+			</th:block>
+		</div>
+		</th:block>
+		
+		<th:block th:if="${goodsBannerList != null and !goodsBannerList.empty}">
+		<div class="mdhtml_box">
+		<th:block th:each="goodsBanner, status : ${goodsBannerList}" >
+		<th:block th:if="${goodsBanner.strVar1 != null and  not #strings.equals(goodsBanner.strVar1, '#')}">
+			<a th:href="${goodsBanner.strVar1}" target="_blank">
+			<img th:src="${imgUrl+goodsBanner.imgPath1}" alt="">
+			</a>
+		</th:block>
+		<th:block th:unless="${goodsBanner.strVar1 != null and  not #strings.equals(goodsBanner.strVar1, '#')}">
+			<img th:src="${imgUrl+goodsBanner.imgPath1}" alt="">
+		</th:block>
+		</th:block>
+		
+		</div>
+		</th:block>
 		<!-- 관리자 에디터입력 내용 노출 -->
 			<th:block th:if="${goodsNoticeList != null and !goodsNoticeList.empty}" >
 		<div class="mdhtml_box" th:each="goodsNotice, status : ${goodsNoticeList}" th:utext="${#strings.unescapeJava(#strings.escapeJava(goodsNotice.noticeContent))}"></div>
 			</th:block>
+			
 		<!-- //관리자 에디터입력 내용 노출 -->
 		<!-- 관리자 에디터입력 내용 노출  상단 html -->
 		<div class="mdhtml_box" th:if="${goodsInfo.goodsTopDesc != null  and !goodsInfo.goodsTopDesc.empty}" th:utext="${#strings.unescapeJava(#strings.escapeJava(goodsInfo.goodsTopDesc))}"></div>

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

@@ -247,6 +247,19 @@
 					</th:block>
 				</div>
 				</th:block>
+				<!-- 공통상품베너 -->
+				<th:block th:if="${goodsBannerList != null and !goodsBannerList.empty}">
+				<div class="mdhtml_box">
+				<th:block th:each="goodsBanner, status : ${goodsBannerList}" >
+				<th:block th:if="${goodsBanner.strVar1 != null and  not #strings.equals(goodsBanner.strVar1, '#')}">
+					<a th:href="${goodsBanner.strVar1}" target="_blank">
+					<img th:src="${imgUrl+goodsBanner.imgPath1}" alt="">
+					</a>
+				</th:block>
+				<th:block th:unless="${goodsBanner.strVar1 != null and  not #strings.equals(goodsBanner.strVar1, '#')}">
+					<img th:src="${imgUrl+goodsBanner.imgPath1}" alt="">
+				</th:block>
+				</th:block>
 				
 				<!-- 관리자 에디터입력 내용 노출  상단 html -->
 				<th:block  th:if="${goodsInfo.goodsTopDesc != null  and !goodsInfo.goodsTopDesc.empty}" th:utext="${#strings.unescapeJava(#strings.escapeJava(goodsInfo.goodsTopDesc))}"></th:block >

+ 18 - 2
src/main/webapp/WEB-INF/views/web/goods/GoodsDealDescFormWeb.html

@@ -51,6 +51,22 @@
 	</div>
 	</th:block>
 	
+	<th:block th:if="${goodsBannerList != null and !goodsBannerList.empty}">
+	<div class="mdhtml_box">
+	<th:block th:each="goodsBanner, status : ${goodsBannerList}" >
+	<th:block th:if="${goodsBanner.strVar1 != null and  not #strings.equals(goodsBanner.strVar1, '#')}">
+		<a th:href="${goodsBanner.strVar1}" target="_blank">
+		<img th:src="${imgUrl+goodsBanner.imgPath1}" alt="">
+		</a>
+	</th:block>
+	<th:block th:unless="${goodsBanner.strVar1 != null and  not #strings.equals(goodsBanner.strVar1, '#')}">
+		<img th:src="${imgUrl+goodsBanner.imgPath1}" alt="">
+	</th:block>
+	</th:block>
+	
+	</div>
+	</th:block>
+	
 	<!-- 관리자 에디터입력 내용 노출  상단 html -->
 	<th:block  th:if="${goodsInfo.goodsTopDesc != null  and !goodsInfo.goodsTopDesc.empty}" th:utext="${#strings.unescapeJava(#strings.escapeJava(goodsInfo.goodsTopDesc))}"></th:block >
 	</div>	
@@ -101,7 +117,7 @@
 		<span class="tit_view">FABRIC</span>
 		<div class="view">
 			<th:block th:each="goodsImg, status : ${goodsImgList}" th:if="${#strings.contains(goodsImg.sysImgNm,'_S1.')}">
-			<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm}" alt="">
+			<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720}" alt="">
 			</th:block>
 		</div>
 	</div>
@@ -114,7 +130,7 @@
 			<span>
 				<th:block th:each="goodsImg, status : ${goodsImgList}" th:if="${#strings.contains(goodsImg.sysImgNm,'_L1.') 
 																		or #strings.contains(goodsImg.sysImgNm,'_L2.')}">
-				<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm}" alt="">
+				<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=250}" alt="">
 				</th:block>
 			</span>
 		</div>

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

@@ -481,6 +481,24 @@
 					</th:block>
 				</div>
 				</th:block>
+				<!-- 공통상품베너 -->
+				<th:block th:if="${goodsBannerList != null and !goodsBannerList.empty}">
+				<div class="mdhtml_box">
+				<th:block th:each="goodsBanner, status : ${goodsBannerList}" >
+				<th:block th:if="${goodsBanner.strVar1 != null and  not #strings.equals(goodsBanner.strVar1, '#')}">
+					<a th:href="${goodsBanner.strVar1}" target="_blank">
+					<img th:src="${imgUrl+goodsBanner.imgPath1}" alt="">
+					</a>
+				</th:block>
+				<th:block th:unless="${goodsBanner.strVar1 != null and  not #strings.equals(goodsBanner.strVar1, '#')}">
+					<img th:src="${imgUrl+goodsBanner.imgPath1}" alt="">
+				</th:block>
+				</th:block>
+				
+				</div>
+				</th:block>
+				
+				
 				
 				<!-- 관리자 에디터입력 내용 노출  상단 html -->
 				<th:block  th:if="${goodsInfo.goodsTopDesc != null  and !goodsInfo.goodsTopDesc.empty}" th:utext="${#strings.unescapeJava(#strings.escapeJava(goodsInfo.goodsTopDesc))}"></th:block >
@@ -545,7 +563,7 @@
 						<span>
 							<th:block th:each="goodsImg, status : ${goodsImgList}" th:if="${#strings.contains(goodsImg.sysImgNm,'_L1.') 
 																					or #strings.contains(goodsImg.sysImgNm,'_L2.')}">
-							<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm}" alt="">
+							<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=250'}" alt="">
 							</th:block>
 						</span>
 					</div>