From 28cf328a098334b51a3e9d2d56f983fb8c862211 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期六, 23 五月 2020 09:54:38 +0800 Subject: [PATCH] 足迹、收藏订单兼容新需求 --- fanli/src/main/java/com/yeshi/fanli/service/impl/jd/JDGoodsServiceImpl.java | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/jd/JDGoodsServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/jd/JDGoodsServiceImpl.java index 5182896..6810a25 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/jd/JDGoodsServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/jd/JDGoodsServiceImpl.java @@ -17,10 +17,11 @@ import com.yeshi.fanli.dto.jd.JDSearchResult; import com.yeshi.fanli.entity.bus.clazz.GoodsClass; import com.yeshi.fanli.entity.jd.JDGoods; +import com.yeshi.fanli.entity.system.ConfigKeyEnum; import com.yeshi.fanli.exception.jd.JDGoodsException; import com.yeshi.fanli.service.inter.config.ConfigService; -import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService; import com.yeshi.fanli.service.inter.jd.JDGoodsService; +import com.yeshi.fanli.service.inter.order.config.HongBaoManageService; import com.yeshi.fanli.tag.PageEntity; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.StringUtil; @@ -86,7 +87,7 @@ @Cacheable(value = "jdSpecialCache", key = "'specialSearch-'+#page+'-'+#cid") @Override - @Transactional + @Transactional(rollbackFor=Exception.class) public List<JDGoods> specialSearch(Integer page, Long cid) throws JDGoodsException { if (cid == null) { throw new JDGoodsException(1, "鍒嗙被id涓虹┖"); @@ -186,7 +187,7 @@ private List<JDGoods> search(int page, int pageSize, String jdcid) { JDSearchResult result = null; - String way = configService.get("jd_api_search_key"); + String way = configService.get(ConfigKeyEnum.jdApiSearchKey.getKey()); if ("1".equals(way)) { // API鎼滅储 JDFilter filterAPI = new JDFilter(); filterAPI.setPageIndex(page); @@ -212,7 +213,7 @@ @Override public JDSearchResult getIndexJDGoods(int page) { JDSearchResult result = null; - String way = configService.get("jd_api_search_key"); + String way = configService.get(ConfigKeyEnum.jdApiSearchKey.getKey()); // TODO 闇�瑕佽皟鏁磋鍒� way = "0"; if ("1".equals(way)) { @@ -225,7 +226,7 @@ JDSearchFilter jdfilter = new JDSearchFilter(); jdfilter.setPageNo(page); jdfilter.setPageSize(Constant.PAGE_SIZE); - result = JDUtil.searchByKey(jdfilter); + result =JDApiUtil.getJingFenGoods(page,125); //JDUtil.searchByKey(jdfilter); } if (result != null && result.getGoodsList() != null) Collections.shuffle(result.getGoodsList()); -- Gitblit v1.8.0