|
|
@@ -26,6 +26,7 @@ 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.TsfRecentlyGoodsService;
|
|
|
import com.style24.front.biz.service.TsfRendererService;
|
|
|
import com.style24.front.biz.service.TsfReviewService;
|
|
|
import com.style24.front.biz.service.TsfWishlistService;
|
|
|
@@ -43,6 +44,7 @@ import com.style24.persistence.domain.GoodsStock;
|
|
|
import com.style24.persistence.domain.GoodsVideo;
|
|
|
import com.style24.persistence.domain.Lookbook;
|
|
|
import com.style24.persistence.domain.Measurement;
|
|
|
+import com.style24.persistence.domain.RecentlyGoods;
|
|
|
import com.style24.persistence.domain.ReinboundInform;
|
|
|
import com.style24.persistence.domain.Review;
|
|
|
import com.style24.persistence.domain.SizeInfo;
|
|
|
@@ -99,6 +101,9 @@ public class TsfGoodsController extends TsfBaseController {
|
|
|
@Value("${has-ssl}")
|
|
|
private String hasSsl;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TsfRecentlyGoodsService recentlyGoodsService;
|
|
|
+
|
|
|
/**
|
|
|
* 상품상세
|
|
|
*
|
|
|
@@ -209,7 +214,7 @@ public class TsfGoodsController extends TsfBaseController {
|
|
|
|
|
|
// 사은품
|
|
|
paramsGoods.setMaxRownum(1);
|
|
|
- mav.addObject("freeGoodsList", goodsService.getFreeGoodsList(paramsGoods));
|
|
|
+ mav.addObject("freeGoodsList", goodsService.getFreeGoodsList(paramsGoods));
|
|
|
|
|
|
// 딜용 상품평건수
|
|
|
Review review = new Review();
|
|
|
@@ -1236,29 +1241,32 @@ public class TsfGoodsController extends TsfBaseController {
|
|
|
*/
|
|
|
@GetMapping("/recently/list")
|
|
|
@ResponseBody
|
|
|
- public Collection<Goods> getRecentlyGoodsList() {
|
|
|
- Collection<Goods> recentlyGoodsList = new ArrayList<>();
|
|
|
- Goods goods = new Goods();
|
|
|
-
|
|
|
- String ckGoodsCds = GagaCookieUtil.getCookie(TsfSession.getHttpServletRequest(), TsfConstants.CK_PREFIX + "_today_goodsCd");
|
|
|
- if (StringUtils.isNotBlank(ckGoodsCds)) {
|
|
|
- String[] arrGoodsCds = ckGoodsCds.split("\\,");
|
|
|
- StringBuilder sql = new StringBuilder();
|
|
|
- if (arrGoodsCds.length > 0) {
|
|
|
- int idx = 1;
|
|
|
- for (String goodsCd : arrGoodsCds) {
|
|
|
- if (!StringUtils.isBlank(goodsCd)) {
|
|
|
- if (idx > 1) {
|
|
|
- sql.append("UNION ALL ");
|
|
|
- }
|
|
|
- sql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
|
|
|
- }
|
|
|
- }
|
|
|
- goods.setGoodsSql(sql.toString());
|
|
|
- recentlyGoodsList = goodsService.getRecentlyGoodsList(goods);
|
|
|
- }
|
|
|
- }
|
|
|
- return recentlyGoodsList;
|
|
|
+ public Collection<RecentlyGoods> getRecentlyGoodsList() {
|
|
|
+// // DB 처리를 하는 것으로 변경함에 따라 해당 부분 주석 처리
|
|
|
+// Collection<RecentlyGoods> recentlyGoodsList = new ArrayList<>();
|
|
|
+// RecentlyGoods recentlyGoods = new RecentlyGoods();
|
|
|
+//
|
|
|
+// String ckGoodsCds = GagaCookieUtil.getCookie(TsfSession.getHttpServletRequest(), TsfConstants.CK_PREFIX + "_today_goodsCd");
|
|
|
+// if (StringUtils.isNotBlank(ckGoodsCds)) {
|
|
|
+// String[] arrGoodsCds = ckGoodsCds.split("\\,");
|
|
|
+// StringBuilder sql = new StringBuilder();
|
|
|
+// if (arrGoodsCds.length > 0) {
|
|
|
+// int idx = 1;
|
|
|
+// for (String goodsCd : arrGoodsCds) {
|
|
|
+// if (!StringUtils.isBlank(goodsCd)) {
|
|
|
+// if (idx > 1) {
|
|
|
+// sql.append("UNION ALL ");
|
|
|
+// }
|
|
|
+// sql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
|
|
|
+// }
|
|
|
+// }
|
|
|
+// recentlyGoods.setGoodsSql(sql.toString());
|
|
|
+// recentlyGoodsList = recentlyGoodsService.getRecentlyGoodsList();
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// return recentlyGoodsList;
|
|
|
+ return recentlyGoodsService.getRecentlyGoodsList();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -1334,7 +1342,7 @@ public class TsfGoodsController extends TsfBaseController {
|
|
|
// 상품 고시정보
|
|
|
mav.addObject("goodsNotiList", goodsService.getGoodsNotiList(goods));
|
|
|
// 상품 안전인증 정보
|
|
|
- mav.addObject("goodsSafeNo", goodsService.getGoodsSafeNo(goods));
|
|
|
+ mav.addObject("goodsSafeNo", goodsService.getGoodsSafeNo(goods));
|
|
|
|
|
|
// 상품 공통 베너
|
|
|
log.info("paramsGoods={}", paramsGoods);
|