|
|
@@ -162,6 +162,9 @@ public class TsfDisplayController extends TsfBaseController {
|
|
|
if (contentsLoc.equals("SGNB001") || contentsLoc.equals("SGNB002") || contentsLoc.equals("STAB001") || contentsLoc.equals("SMM003") || contentsLoc.equals("SMM004") || contentsLoc.equals("SMM006")) {
|
|
|
contents.setMaxRow(1);
|
|
|
}
|
|
|
+ if(contentsLoc.equals("SMM011")){
|
|
|
+ contents.setMaxRow(5);
|
|
|
+ }
|
|
|
|
|
|
Cate4Srch cate4Srch = new Cate4Srch();
|
|
|
cate4Srch.setContentsLoc(contentsLoc);
|
|
|
@@ -204,6 +207,9 @@ public class TsfDisplayController extends TsfBaseController {
|
|
|
}
|
|
|
|
|
|
if (contentsLoc.equals("SMM009") || contentsLoc.equals("SMM012")) {
|
|
|
+ if(contentsLoc.equals("SMM009")){
|
|
|
+ contents.setMaxRow(5);
|
|
|
+ }
|
|
|
mainLayout.setMdPickList(displayService.getContentsForGoods(contents));
|
|
|
}
|
|
|
|
|
|
@@ -640,8 +646,8 @@ public class TsfDisplayController extends TsfBaseController {
|
|
|
Collection<Filter> filterList = new ArrayList<Filter>();
|
|
|
|
|
|
// 검색엔진 연동 여부
|
|
|
- String syncYn = commonService.getSearchEngineSyncYn();
|
|
|
- if (syncYn.equals("Y")) { // 검색엔진을 통한 상품리스트 조회
|
|
|
+// String syncYn = commonService.getSearchEngineSyncYn();
|
|
|
+// if (syncYn.equals("Y")) { // 검색엔진을 통한 상품리스트 조회
|
|
|
mav.setViewName(super.getDeviceViewName("display/CategoryGoodsListForm"));
|
|
|
// 카테고리 목록
|
|
|
mav.addObject("allCateList", displayService.getAllCategoryList("G032_101"));
|
|
|
@@ -650,20 +656,18 @@ public class TsfDisplayController extends TsfBaseController {
|
|
|
cate1.setBrandGroupNo(params.getBrandGroupNo() == null ? 0 : params.getBrandGroupNo());
|
|
|
cate1.setFrontGb(TsfSession.getFrontGb());
|
|
|
cate1.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
- cate1.setKeyword("TBJ");
|
|
|
cate1.setCateGb("G032_101");
|
|
|
cate1.setCate1No(params.getCate1No());
|
|
|
mav.addObject("cateList", diquest.getCategoryList(cate1));
|
|
|
|
|
|
// 상품리스트 카테고리별 필터 목록
|
|
|
- params.setKeyword("TBJ");
|
|
|
filterList = diquest.getFilterList(params);
|
|
|
- }else{
|
|
|
- // 카테고리 목록
|
|
|
- mav.addObject("cateList", displayService.getAllCategoryList(params.getCateGb()));
|
|
|
- mav.setViewName(super.getDeviceViewName("display/CategoryGoodsListForm2"));
|
|
|
- filterList = displayService.getGoodsListCategoryFilterList(params);
|
|
|
- }
|
|
|
+// }else{
|
|
|
+// // 카테고리 목록
|
|
|
+// mav.addObject("cateList", displayService.getAllCategoryList(params.getCateGb()));
|
|
|
+// mav.setViewName(super.getDeviceViewName("display/CategoryGoodsListForm2"));
|
|
|
+// filterList = displayService.getGoodsListCategoryFilterList(params);
|
|
|
+// }
|
|
|
|
|
|
// 필터 설정
|
|
|
mav.addObject("filterBrandList", displayService.getCategoryFilterList(filterList, "BRAND"));
|
|
|
@@ -680,68 +684,6 @@ public class TsfDisplayController extends TsfBaseController {
|
|
|
|
|
|
return mav;
|
|
|
}
|
|
|
- @GetMapping("/category/goods/list/form2")
|
|
|
- public ModelAndView categoryGoodsListForm2(SearchEngine params) {
|
|
|
- ModelAndView mav = new ModelAndView(super.getDeviceViewName("display/CategoryGoodsListForm"));
|
|
|
-
|
|
|
-// if (TsfSession.isLogin()) {
|
|
|
-// cate4Srch.setCustNo(TsfSession.getInfo().getCustNo());
|
|
|
-// }
|
|
|
-// cate4Srch.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
-// if (StringUtils.isBlank(cate4Srch.getFormalGb())) {
|
|
|
-// cate4Srch.setFormalGb("G009_10");
|
|
|
-// }
|
|
|
-// cate4Srch.setFrontGb(TsfSession.getFrontGb());
|
|
|
-// cate4Srch.setCustGb(TsfSession.getCustGb());
|
|
|
-// if (cate4Srch.getBrandGroupNo() == null) {
|
|
|
-// cate4Srch.setBrandGroupNo(0);
|
|
|
-// }
|
|
|
-// if (cate4Srch.getCate4No() != null) {
|
|
|
-// cate4Srch.setCateNo(cate4Srch.getCate4No());
|
|
|
-// } else if (cate4Srch.getCate3No() != null) {
|
|
|
-// cate4Srch.setCateNo(cate4Srch.getCate3No());
|
|
|
-// } else if (cate4Srch.getCate2No() != null) {
|
|
|
-// cate4Srch.setCateNo(cate4Srch.getCate2No());
|
|
|
-// } else if (cate4Srch.getCate1No() != null) {
|
|
|
-// cate4Srch.setCateNo(cate4Srch.getCate1No());
|
|
|
-// }
|
|
|
-//
|
|
|
-// log.info("categoryGoodsListForm cate4Srch::::{}", cate4Srch);
|
|
|
-// mav.addObject("filterBrandList", displayService.getCategoryFilter(cate4Srch, "BRAND"));
|
|
|
-// mav.addObject("filterSizeList", displayService.getCategoryFilter(cate4Srch, "SIZE"));
|
|
|
-// mav.addObject("filterPriceList", displayService.getCategoryFilter(cate4Srch, "PRICE"));
|
|
|
-// mav.addObject("filterAgeList", displayService.getCategoryFilter(cate4Srch, "AGE"));
|
|
|
-// mav.addObject("filterSeasonList", displayService.getCategoryFilter(cate4Srch, "SEASON"));
|
|
|
-// mav.addObject("filterColorList", displayService.getCategoryFilter(cate4Srch, "COLOR"));
|
|
|
-// mav.addObject("filterBenefitList", displayService.getCategoryFilterBenefit(cate4Srch));
|
|
|
-// mav.addObject("sortGb", "new");
|
|
|
-
|
|
|
- // 브랜드그룹 정보 : 브랜드메인 링크에 설정된 기획전으로 들어올때 GNB 변경때문에 사용
|
|
|
- if (params.getBrandGroupNo() != null && params.getBrandGroupNo() > 0) {
|
|
|
- mav.addObject("brandGroupInfo", displayService.getGnbBrandGroup(params.getBrandGroupNo()));
|
|
|
-// } else {
|
|
|
-// mav.addObject("brandGroupInfo", null);
|
|
|
- }
|
|
|
-
|
|
|
- mav.addObject("cateInfo", params);
|
|
|
-
|
|
|
- // 카테고리 목록
|
|
|
- mav.addObject("cateList", displayService.getAllCategoryList(params.getCateGb()));
|
|
|
-
|
|
|
- // 상품리스트 카테고리별 필터 목록
|
|
|
- Collection<Filter> filterList = displayService.getGoodsListCategoryFilterList(params);
|
|
|
-
|
|
|
- // 필터 설정
|
|
|
- mav.addObject("filterBrandList", displayService.getCategoryFilterList(filterList, "BRAND"));
|
|
|
- mav.addObject("filterSizeList", displayService.getCategoryFilterList(filterList, "SIZE"));
|
|
|
- mav.addObject("filterPriceList", displayService.getCategoryFilterList(filterList, "PRICE"));
|
|
|
- mav.addObject("filterAgeList", displayService.getCategoryFilterList(filterList, "AGE"));
|
|
|
- mav.addObject("filterSeasonList", displayService.getCategoryFilterList(filterList, "SEASON"));
|
|
|
- mav.addObject("filterColorList", displayService.getCategoryFilterList(filterList, "COLOR"));
|
|
|
- mav.addObject("filterBenefitList", displayService.getCategoryFilterList(filterList, "BENEFIT"));
|
|
|
-
|
|
|
- return mav;
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 카테고리 상품 리스트 조회
|
|
|
@@ -771,44 +713,11 @@ public class TsfDisplayController extends TsfBaseController {
|
|
|
|
|
|
Collection<SearchEngine> dataList = new ArrayList<SearchEngine>();
|
|
|
|
|
|
- String syncYn = commonService.getSearchEngineSyncYn();
|
|
|
- if (syncYn.equals("Y")) { // 검색엔진을 통한 상품리스트 조회
|
|
|
- params.setKeyword("TBJ");
|
|
|
- GoodsListResponse response = diquest.getGoodsList(params);
|
|
|
- pageable.setTotalCount(response.getTotalCount());
|
|
|
- dataList = response.getResponse();
|
|
|
- result.set("paging", pageable);
|
|
|
- result.set("dataList", dataList);
|
|
|
- }else{
|
|
|
- StringBuilder sql = new StringBuilder();
|
|
|
- if (params.getPriceArr() != null && params.getPriceArr().length > 0) {
|
|
|
- for (int i = 0; i < params.getPriceArr().length; i++) {
|
|
|
- String[] price = params.getPriceArr()[i].split(",");
|
|
|
- if (i > 0) {
|
|
|
- sql.append(" OR ");
|
|
|
- }
|
|
|
- sql.append(" ( G.CURR_PRICE >= ").append(price[0]).append(" AND G.CURR_PRICE <= ").append(price[1]).append(" )");
|
|
|
- }
|
|
|
- params.setPriceSql(sql.toString());
|
|
|
- }
|
|
|
-
|
|
|
- StringBuilder sql2 = new StringBuilder();
|
|
|
- if (params.getDcRateArr() != null && params.getDcRateArr().length > 0) {
|
|
|
- for (int i = 0; i < params.getDcRateArr().length; i++) {
|
|
|
- String[] dcRate = params.getDcRateArr()[i].split(",");
|
|
|
- if (i > 0) {
|
|
|
- sql2.append(" OR ");
|
|
|
- }
|
|
|
- sql2.append(" ( ((IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) - G.CURR_PRICE) / IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) * 100) >= ").append(dcRate[0]).append(" AND ((IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) - G.CURR_PRICE) / IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) * 100) <= ").append(dcRate[1]).append(" )");
|
|
|
- }
|
|
|
- params.setDcRateSql(sql2.toString());
|
|
|
- }
|
|
|
-
|
|
|
- pageable.setTotalCount(goodsService.getCategoryGoodsCount(params));
|
|
|
- params.setPageable(pageable);
|
|
|
- result.set("paging", pageable);
|
|
|
- result.set("dataList", goodsService.getCategoryGoodsList(params));
|
|
|
- }
|
|
|
+ GoodsListResponse response = diquest.getGoodsList(params);
|
|
|
+ pageable.setTotalCount(response.getTotalCount());
|
|
|
+ dataList = response.getResponse();
|
|
|
+ result.set("paging", pageable);
|
|
|
+ result.set("dataList", dataList);
|
|
|
|
|
|
log.info("pageable>>>>{}",pageable);
|
|
|
log.info("dataList>>>>{}",dataList);
|
|
|
@@ -816,69 +725,6 @@ public class TsfDisplayController extends TsfBaseController {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/category/goods/list2")
|
|
|
- @ResponseBody
|
|
|
- public GagaMap getGoodsList2(@RequestBody SearchEngine params) {
|
|
|
- GagaMap result = new GagaMap();
|
|
|
- log.info("getGoodsList's parameter::: {}", params);
|
|
|
- TscPageRequest pageable = new TscPageRequest((params.getPageNo() > 0 ? params.getPageNo() - 1 : 0), params.getPageSize(), params.getPageUnit());
|
|
|
-
|
|
|
- if (TsfSession.isLogin()) {
|
|
|
- params.setCustNo(TsfSession.getInfo().getCustNo());
|
|
|
- }
|
|
|
-
|
|
|
- params.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
- params.setFrontGb(TsfSession.getFrontGb());
|
|
|
- params.setCustGb(TsfSession.getCustGb());
|
|
|
-
|
|
|
- if (params.getBrandGroupNo() == null) {
|
|
|
- params.setBrandGroupNo(0);
|
|
|
- }
|
|
|
-
|
|
|
-// if (params.getCate4No() != null && params.getCate4No() > 0) {
|
|
|
-// params.setCateNo(params.getCate4No());
|
|
|
-// } else if (params.getCate3No() != null && params.getCate3No() > 0) {
|
|
|
-// params.setCateNo(params.getCate3No());
|
|
|
-// } else if (params.getCate2No() != null && params.getCate2No() > 0) {
|
|
|
-// params.setCateNo(params.getCate2No());
|
|
|
-// } else if (params.getCate1No() != null && params.getCate1No() > 0) {
|
|
|
-// params.setCateNo(params.getCate1No());
|
|
|
-// }
|
|
|
-
|
|
|
- StringBuilder sql = new StringBuilder();
|
|
|
- if (params.getPriceArr() != null && params.getPriceArr().length > 0) {
|
|
|
- for (int i = 0; i < params.getPriceArr().length; i++) {
|
|
|
- String[] price = params.getPriceArr()[i].split(",");
|
|
|
- if (i > 0) {
|
|
|
- sql.append(" OR ");
|
|
|
- }
|
|
|
- sql.append(" ( G.CURR_PRICE >= ").append(price[0]).append(" AND G.CURR_PRICE <= ").append(price[1]).append(" )");
|
|
|
- }
|
|
|
- params.setPriceSql(sql.toString());
|
|
|
- }
|
|
|
-
|
|
|
- StringBuilder sql2 = new StringBuilder();
|
|
|
- if (params.getDcRateArr() != null && params.getDcRateArr().length > 0) {
|
|
|
- for (int i = 0; i < params.getDcRateArr().length; i++) {
|
|
|
- String[] dcRate = params.getDcRateArr()[i].split(",");
|
|
|
- if (i > 0) {
|
|
|
- sql2.append(" OR ");
|
|
|
- }
|
|
|
- sql2.append(" ( ((IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) - G.CURR_PRICE) / IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) * 100) >= ").append(dcRate[0]).append(" AND ((IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) - G.CURR_PRICE) / IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) * 100) <= ").append(dcRate[1]).append(" )");
|
|
|
- }
|
|
|
- params.setDcRateSql(sql2.toString());
|
|
|
- }
|
|
|
-
|
|
|
- pageable.setTotalCount(goodsService.getCategoryGoodsCount(params));
|
|
|
- params.setPageable(pageable);
|
|
|
- result.set("paging", pageable);
|
|
|
-// result.set("totalCnt", pageable.getTotalCount());
|
|
|
-// result.set("endRow", pageable.getEndRow());
|
|
|
- result.set("dataList", goodsService.getCategoryGoodsList(params));
|
|
|
-
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 전체 브랜드
|
|
|
* @param
|