|
|
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import com.style24.core.biz.service.TscEnvsetService;
|
|
|
import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.front.biz.dao.TsfDisplayDao;
|
|
|
import com.style24.front.support.env.TsfConstants;
|
|
|
@@ -33,6 +34,9 @@ public class TsfDisplayService {
|
|
|
@Autowired
|
|
|
private TsfDisplayDao displayDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TscEnvsetService envsetService;
|
|
|
+
|
|
|
/**
|
|
|
* GNB 브랜드그룹 목록
|
|
|
* @param contents - 컨텐츠 정보
|
|
|
@@ -66,107 +70,105 @@ public class TsfDisplayService {
|
|
|
return displayDao.getContentsList(contents);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * FULL 카테고리1 정보
|
|
|
- * @param cateGb - 카테고리구분
|
|
|
- * @param cate1No - 카테고리1번호
|
|
|
- * @return
|
|
|
- * @author gagamel
|
|
|
- * @since 2021. 3. 11
|
|
|
- */
|
|
|
- @Cacheable(value = "cate", key = "'cateList-'.concat(#cateGb).concat(#cate1No)")
|
|
|
- public Cate1 getFullCategory1(String cateGb, Integer cate1No) {
|
|
|
- Cate4Srch cate = new Cate4Srch();
|
|
|
- cate.setSiteCd(TscConstants.Site.STYLE24.value()); // 사이트코드
|
|
|
- cate.setCateGb(cateGb); // 카테고리구분
|
|
|
- cate.setCateType(TsfConstants.CateType.GOODS.value()); // 상품분류카테고리
|
|
|
- cate.setCate1No(cate1No);
|
|
|
- return this.getFullCategory1(cate);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * FULL 카테고리1 정보
|
|
|
- * @param cate - 카테고리 정보
|
|
|
- * @return
|
|
|
- * @author gagamel
|
|
|
- * @since 2021. 3. 11
|
|
|
- */
|
|
|
- public Cate1 getFullCategory1(Cate4Srch cate) {
|
|
|
- // 카테고리1 정보
|
|
|
- Cate1 cate1 = displayDao.getCategory1List(cate).get(0);
|
|
|
-
|
|
|
- if (cate1 != null) {
|
|
|
- if (cate1.getLeafYn().equals("N")) {
|
|
|
- cate.setCate1No(cate1.getCate1No());
|
|
|
-
|
|
|
- // 카테고리2 목록
|
|
|
- Collection<Cate2> cate2List = displayDao.getCategory2List(cate);
|
|
|
-
|
|
|
- if (cate2List != null && !cate2List.isEmpty()) {
|
|
|
- for (Cate2 cate2 : cate2List) {
|
|
|
- if (cate2.getLeafYn().equals("N")) {
|
|
|
- cate.setCate2No(cate2.getCate2No());
|
|
|
-
|
|
|
- // 카테고리3 목록
|
|
|
- Collection<Cate3> cate3List = displayDao.getCategory3List(cate);
|
|
|
-
|
|
|
- if (cate3List != null && !cate3List.isEmpty()) {
|
|
|
- for (Cate3 cate3 : cate3List) {
|
|
|
- if (cate3.getLeafYn().equals("N")) {
|
|
|
- cate.setCate3No(cate3.getCate3No());
|
|
|
-
|
|
|
- // 카테고리4 목록
|
|
|
- Collection<Cate4> cate4List = displayDao.getCategory4List(cate);
|
|
|
-
|
|
|
- if (cate4List != null && !cate4List.isEmpty()) {
|
|
|
- for (Cate4 cate4 : cate4List) {
|
|
|
- if (cate4.getLeafYn().equals("N")) {
|
|
|
- cate.setCate4No(cate4.getCate4No());
|
|
|
-
|
|
|
- // 카테고리5 목록 담기
|
|
|
- cate4.setCate5List(displayDao.getCategory5List(cate));
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- log.info("cate4List: {}", cate4List);
|
|
|
-
|
|
|
- // 카테고리4 목록 담기
|
|
|
- cate3.setCate4List(cate4List);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 카테고리3 목록 담기
|
|
|
- cate2.setCate3List(cate3List);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 카테고리2 목록 담기
|
|
|
- cate1.setCate2List(cate2List);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return cate1;
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * FULL 카테고리1 정보
|
|
|
+// * @param cateGb - 카테고리구분
|
|
|
+// * @param cate1No - 카테고리1번호
|
|
|
+// * @return
|
|
|
+// * @author gagamel
|
|
|
+// * @since 2021. 3. 11
|
|
|
+// */
|
|
|
+// @Cacheable(value = "cate", key = "'cateList-'.concat(#cateGb).concat(#cate1No)")
|
|
|
+// public Cate1 getFullCategory1(String cateGb, Integer cate1No) {
|
|
|
+// Cate4Srch cate = new Cate4Srch();
|
|
|
+// cate.setSiteCd(TscConstants.Site.STYLE24.value()); // 사이트코드
|
|
|
+// cate.setCateGb(cateGb); // 카테고리구분
|
|
|
+// cate.setCateType(TsfConstants.CateType.GOODS.value()); // 상품분류카테고리
|
|
|
+// cate.setCate1No(cate1No);
|
|
|
+// return this.getFullCategory1(cate);
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * FULL 카테고리1 정보
|
|
|
+// * @param cate - 카테고리 정보
|
|
|
+// * @return
|
|
|
+// * @author gagamel
|
|
|
+// * @since 2021. 3. 11
|
|
|
+// */
|
|
|
+// public Cate1 getFullCategory1(Cate4Srch cate) {
|
|
|
+// // 카테고리1 정보
|
|
|
+// Cate1 cate1 = displayDao.getCategory1List(cate).get(0);
|
|
|
+//
|
|
|
+// if (cate1 != null) {
|
|
|
+// if (cate1.getLeafYn().equals("N")) {
|
|
|
+// cate.setCate1No(cate1.getCate1No());
|
|
|
+//
|
|
|
+// // 카테고리2 목록
|
|
|
+// Collection<Cate2> cate2List = displayDao.getCategory2List(cate);
|
|
|
+//
|
|
|
+// if (cate2List != null && !cate2List.isEmpty()) {
|
|
|
+// for (Cate2 cate2 : cate2List) {
|
|
|
+// if (cate2.getLeafYn().equals("N")) {
|
|
|
+// cate.setCate2No(cate2.getCate2No());
|
|
|
+//
|
|
|
+// // 카테고리3 목록
|
|
|
+// Collection<Cate3> cate3List = displayDao.getCategory3List(cate);
|
|
|
+//
|
|
|
+// if (cate3List != null && !cate3List.isEmpty()) {
|
|
|
+// for (Cate3 cate3 : cate3List) {
|
|
|
+// if (cate3.getLeafYn().equals("N")) {
|
|
|
+// cate.setCate3No(cate3.getCate3No());
|
|
|
+//
|
|
|
+// // 카테고리4 목록
|
|
|
+// Collection<Cate4> cate4List = displayDao.getCategory4List(cate);
|
|
|
+//
|
|
|
+// if (cate4List != null && !cate4List.isEmpty()) {
|
|
|
+// for (Cate4 cate4 : cate4List) {
|
|
|
+// if (cate4.getLeafYn().equals("N")) {
|
|
|
+// cate.setCate4No(cate4.getCate4No());
|
|
|
+//
|
|
|
+// // 카테고리5 목록 담기
|
|
|
+// cate4.setCate5List(displayDao.getCategory5List(cate));
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// log.info("cate4List: {}", cate4List);
|
|
|
+//
|
|
|
+// // 카테고리4 목록 담기
|
|
|
+// cate3.setCate4List(cate4List);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// // 카테고리3 목록 담기
|
|
|
+// cate2.setCate3List(cate3List);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// // 카테고리2 목록 담기
|
|
|
+// cate1.setCate2List(cate2List);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// return cate1;
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
- * 카테고리 목록
|
|
|
+ * 전체 카테고리 목록
|
|
|
* @param cateGb - 카테고리구분
|
|
|
- * @param cate1No - 카테고리1번호
|
|
|
* @return
|
|
|
* @author gagamel
|
|
|
* @since 2021. 3. 11
|
|
|
*/
|
|
|
-// @Cacheable(value = "cate", key = "'cateList-'.concat(#cateGb).concat(#cate1No)")
|
|
|
- public Collection<Cate1> getCategoryList(String cateGb, Integer cate1No) {
|
|
|
+ @Cacheable(value = "cate", key = "'allCate-'.concat(#cateGb)")
|
|
|
+ public Collection<Cate1> getAllCategoryList(String cateGb) {
|
|
|
Cate4Srch cate = new Cate4Srch();
|
|
|
cate.setSiteCd(TscConstants.Site.STYLE24.value()); // 사이트코드
|
|
|
cate.setCateGb(cateGb); // 카테고리구분
|
|
|
cate.setCateType(TsfConstants.CateType.GOODS.value()); // 상품분류카테고리
|
|
|
- cate.setCate1No(cate1No);
|
|
|
-
|
|
|
+ cate.setSoldoutGoodsDispYn(envsetService.getSoldoutGoodsDisplayYn(TscConstants.Site.STYLE24.value()));
|
|
|
return this.getAllCategoryList(cate);
|
|
|
}
|
|
|
|
|
|
@@ -178,8 +180,6 @@ public class TsfDisplayService {
|
|
|
* @since 2021. 3. 11
|
|
|
*/
|
|
|
public Collection<Cate1> getAllCategoryList(Cate4Srch cate) {
|
|
|
-// Collection<Cate1> fullCateList = new ArrayList<>();
|
|
|
-
|
|
|
// 카테고리1 목록
|
|
|
Collection<Cate1> cate1List = displayDao.getCategory1List(cate);
|
|
|
|
|
|
@@ -238,8 +238,6 @@ public class TsfDisplayService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- log.info("cate1List: {}", cate1List);
|
|
|
-
|
|
|
return cate1List;
|
|
|
}
|
|
|
|