|
|
@@ -544,6 +544,7 @@ public class TsfDisplayService {
|
|
|
*/
|
|
|
public Collection<Contents> getContentsForGoods(Contents contents) {
|
|
|
Collection<Contents> contentsList = displayDao.getContentsList(contents);
|
|
|
+ Collection<Goods> goodsList = new ArrayList<>();
|
|
|
Cate4Srch tempContents = new Cate4Srch();
|
|
|
for (Contents data : contentsList) {
|
|
|
tempContents.setContentsLoc(data.getContentsLoc());
|
|
|
@@ -554,7 +555,20 @@ public class TsfDisplayService {
|
|
|
data.setFrontGb(TsfSession.getFrontGb());
|
|
|
data.setBannerList(displayDao.getContentsBannerList(data));
|
|
|
}
|
|
|
- data.setGoodsList(goodsDao.getContentsCategoryGoodsList(tempContents));
|
|
|
+ goodsList = (goodsDao.getContentsCategoryGoodsList(tempContents));
|
|
|
+ if("SMM007".equals(data.getContentsLoc())){
|
|
|
+ int maxrow = 3;
|
|
|
+ if(goodsList == null || goodsList.size() < 3){
|
|
|
+ Cate4Srch cate = new Cate4Srch();
|
|
|
+ cate.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
+ cate.setCateGb(TsfConstants.CateGb.BYITEM.value());
|
|
|
+ cate.setFrontGb(data.getFrontGb());
|
|
|
+ cate.setBrandGroupNo(Integer.parseInt(data.getBrandGroupNo()));
|
|
|
+ cate.setMaxRow(maxrow-goodsList.size());
|
|
|
+ goodsList.addAll(goodsDao.getContentsCategoryNewGoodsList(cate));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ data.setGoodsList(goodsList);
|
|
|
}
|
|
|
|
|
|
log.info("getContentsForGoods contentsList.size()::{}", contentsList.size());
|
|
|
@@ -678,13 +692,15 @@ public class TsfDisplayService {
|
|
|
public Collection<Filter> getCategoryFilterList(Collection<Filter> filterList, String filterGb) {
|
|
|
Collection<Filter> resultList = new ArrayList<Filter>();
|
|
|
for (Filter filter : filterList) {
|
|
|
- if (filter.getFilterGb().equals(filterGb)) {
|
|
|
- if ("BENEFIT".equals(filterGb)) {
|
|
|
- if (!filter.getFilterCd().equals("40")) {
|
|
|
+ if(!"".equals(filter.getFilterCd()) && !filter.getFilterCd().equals(null)){
|
|
|
+ if (filter.getFilterGb().equals(filterGb)) {
|
|
|
+ if ("BENEFIT".equals(filterGb)) {
|
|
|
+ if (!filter.getFilterCd().equals("40")) {
|
|
|
+ resultList.add(filter);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
resultList.add(filter);
|
|
|
}
|
|
|
- } else {
|
|
|
- resultList.add(filter);
|
|
|
}
|
|
|
}
|
|
|
}
|