|
@@ -2,17 +2,20 @@ package com.style24.front.biz.web;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.front.biz.service.TsfGoodsService;
|
|
import com.style24.front.biz.service.TsfGoodsService;
|
|
|
import com.style24.front.support.controller.TsfBaseController;
|
|
import com.style24.front.support.controller.TsfBaseController;
|
|
|
|
|
+import com.style24.persistence.domain.Goods;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 상품 Controller
|
|
* 상품 Controller
|
|
|
- *
|
|
|
|
|
|
|
+ *
|
|
|
* @author gagamel
|
|
* @author gagamel
|
|
|
* @since 2020. 12. 29
|
|
* @since 2020. 12. 29
|
|
|
*/
|
|
*/
|
|
@@ -27,4 +30,127 @@ public class TsfGoodsController extends TsfBaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TsfGoodsService goodsService;
|
|
private TsfGoodsService goodsService;
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 상품상세
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @author eskim
|
|
|
|
|
+ * @since 2020. 7. 4
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/detail/form")
|
|
|
|
|
+ public ModelAndView detail(Goods paramsGoods) {
|
|
|
|
|
+
|
|
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
|
|
+
|
|
|
|
|
+// String afLinkCd = paramsGoods.getAfLinkCd();
|
|
|
|
|
+// if (StringUtils.isBlank(paramsGoods.getGoodsCd())) {
|
|
|
|
|
+// if (StringUtils.isBlank(afLinkCd)) {
|
|
|
|
|
+// mav.setViewName("redirect:/display/mall/main/form");
|
|
|
|
|
+// } else {
|
|
|
|
|
+// mav.setViewName("redirect:/display/mall/main/form?af=" + afLinkCd);
|
|
|
|
|
+// }
|
|
|
|
|
+// return mav;
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
|
|
+// // 상품관련 기본값 설정(회원 등급, 앱, PC/모바일 등)
|
|
|
|
|
+// setGoods(paramsGoods);
|
|
|
|
|
+//
|
|
|
|
|
+// String mobileYn = paramsGoods.getMobileYn();
|
|
|
|
|
+// if ("Y".equals(mobileYn)) {
|
|
|
|
|
+// paramsGoods.setFrontGb("M");
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// Goods goods = goodsService.getGoodsInfo(paramsGoods);
|
|
|
|
|
+//
|
|
|
|
|
+// if (goods == null || goods.getGoodsCd().isBlank()) {
|
|
|
|
|
+// if (StringUtils.isBlank(afLinkCd)) {
|
|
|
|
|
+// mav.setViewName("redirect:/display/mall/main/form");
|
|
|
|
|
+// } else {
|
|
|
|
|
+// mav.setViewName("redirect:/display/mall/main/form?af=" + afLinkCd);
|
|
|
|
|
+// }
|
|
|
|
|
+// return mav;
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// // 다른컬러보기용 업체코드 인자 처리
|
|
|
|
|
+// paramsGoods.setSupplyCompCd(goods.getSupplyCompCd());
|
|
|
|
|
+// paramsGoods.setGoodsType(goods.getGoodsType());
|
|
|
|
|
+// paramsGoods.setFormalGb(goods.getFormalGb());
|
|
|
|
|
+// //
|
|
|
|
|
+// // 상품 기본정보
|
|
|
|
|
+// mav.addObject("goodsInfo", goods);
|
|
|
|
|
+// // 상품 네비정보
|
|
|
|
|
+// mav.addObject("goodsNavigation", goodsService.getGoodsNavigation(paramsGoods));
|
|
|
|
|
+// // 상품 이미지정보
|
|
|
|
|
+// // mav.addObject("goodsImg", goodsService.getGoodsImg(goods.getGoodsCd()));
|
|
|
|
|
+// mav.addObject("goodsImgList", goodsService.getGoodsImgList(paramsGoods.getGoodsCd()));
|
|
|
|
|
+// // 상품 동영상정보
|
|
|
|
|
+// mav.addObject("goodsVideoList", goodsService.getVideoList(paramsGoods.getGoodsCd()));
|
|
|
|
|
+//
|
|
|
|
|
+// if ("D".equals(goods.getGoodsType())) { // 딜상품
|
|
|
|
|
+// // 딜 구성상품 정보
|
|
|
|
|
+// paramsGoods.setGoodsExtendSearchYn("Y");
|
|
|
|
|
+// mav.addObject("goodsExtendList", goodsService.getGoodsDealExtendList(paramsGoods));
|
|
|
|
|
+// } else {
|
|
|
|
|
+// if ("N".equals(goods.getGoodsType())) { // 일반상품
|
|
|
|
|
+// // 상품 사이즈정보
|
|
|
|
|
+// mav.addObject("goodsSizeList", goodsService.getGoodsSizeList(paramsGoods));
|
|
|
|
|
+// // 상품 다른컬러정보
|
|
|
|
|
+// mav.addObject("goodsOtherColorList", goodsService.getGoodsOtherColorList(paramsGoods));
|
|
|
|
|
+// // 상품 고시정보
|
|
|
|
|
+// mav.addObject("goodsNotiList", goodsService.getGoodsNotiList(goods));
|
|
|
|
|
+// // 상품 부위별 사이즈정보
|
|
|
|
|
+// mav.addObject("goodsRegionSizeHtml", goodsService.getGoodsRegionsizeList(paramsGoods));
|
|
|
|
|
+//
|
|
|
|
|
+// } else if ("S".equals(goods.getGoodsType())) { // 셋트상품
|
|
|
|
|
+// mav.addObject("goodsExtendList", goodsService.getGoodsSetExtendList(paramsGoods));
|
|
|
|
|
+// }
|
|
|
|
|
+// // 상품쿠폰
|
|
|
|
|
+// mav.addObject("goodsCouponList", goodsService.getGoodsCouponList(paramsGoods));
|
|
|
|
|
+// // 찜브랜드 여부
|
|
|
|
|
+// TsfBrandWish brandWish = new TsfBrandWish();
|
|
|
|
|
+// brandWish.setBrandCd(goods.getBrandCd());
|
|
|
|
|
+// mav.addObject("isBrandWish", goodsService.getBrandWishList(brandWish));
|
|
|
|
|
+// // // 특가세일 할인율
|
|
|
|
|
+// // mav.addObject("specialPriceSaleRate", policyService.getSpecialPriceSaleDisplayRate(TsfConstants.SITE_CD));
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// // 상품포인트사용방법
|
|
|
|
|
+// mav.addObject("goodsPointMothod", policyService.getPointMothod(TsfConstants.SITE_CD)); // A:정액, R:정율
|
|
|
|
|
+// // 상품포인트절사단위
|
|
|
|
|
+// mav.addObject("goodsPointUnit", paramsGoods.getPointUnit()); // 10:원단위절사(int)
|
|
|
|
|
+// // 상품평노출여부 - 미사용
|
|
|
|
|
+// //mav.addObject("reviewDisplayYn", policyService.getReviewDisplayYn(TsfConstants.SITE_CD));
|
|
|
|
|
+//
|
|
|
|
|
+// // 무이자 혜택안내 -- 배너 미사용
|
|
|
|
|
+// TsfCardInstallment cardInstallment = new TsfCardInstallment();
|
|
|
|
|
+// cardInstallment.setImonths99SkipYn("Y");
|
|
|
|
|
+// mav.addObject("cardInfoList", goodsService.getCardInfoList(cardInstallment));
|
|
|
|
|
+//
|
|
|
|
|
+// // 오늘본 상품 쿠키 담기
|
|
|
|
|
+// // SSL Server
|
|
|
|
|
+// boolean isSslServer = Boolean.parseBoolean(hasSsl);
|
|
|
|
|
+// log.debug("isSslServer: [{}]", isSslServer);
|
|
|
|
|
+//
|
|
|
|
|
+// //기존쿠키 가져오기
|
|
|
|
|
+// setTodayGoodsCd(paramsGoods);
|
|
|
|
|
+//
|
|
|
|
|
+// mav.addObject("params", paramsGoods);
|
|
|
|
|
+// if ("D".equals(goods.getGoodsType())) {
|
|
|
|
|
+// if ("Y".equals(mobileYn)) {
|
|
|
|
|
+// mav.setViewName("mob/goods/GoodsDealFormMob");
|
|
|
|
|
+// } else {
|
|
|
|
|
+// mav.setViewName(super.getDeviceViewName("goods/GoodsDealForm"));
|
|
|
|
|
+// }
|
|
|
|
|
+// } else {
|
|
|
|
|
+// if ("Y".equals(mobileYn)) {
|
|
|
|
|
+// mav.setViewName("mob/goods/GoodsDetailFormMob");
|
|
|
|
|
+// } else {
|
|
|
|
|
+// mav.setViewName(super.getDeviceViewName("goods/GoodsDetailForm"));
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
|
|
+ return mav;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|