| | |
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.yeshi.fanli.dto.ConfigParamsDTO;
|
| | | import com.yeshi.fanli.entity.bus.lable.QualityFactory;
|
| | | import com.yeshi.fanli.entity.taobao.SearchFilter;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoSearchNav;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoShopInfo;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService;
|
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
|
| | |
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | | |
| | | @Resource
|
| | | private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoShopService taoBaoShopService;
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoV2-'+#sf")
|
| | | public JSONObject searchWuLiaoV2(SearchFilter sf) {
|
| | | @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoV2-'+#sf+'-'+#platform+'-'+#version")
|
| | | public JSONObject searchWuLiaoV2(SearchFilter sf,String platform,String version) {
|
| | |
|
| | | // 淘宝物料接口查询
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf);
|
| | |
| | | int fh = sf.getHongbao();
|
| | | boolean ft = sf.isTmall();
|
| | |
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version);
|
| | |
|
| | | if (fq == 0 && fh == 0 && !ft) {
|
| | | if (result != null && result.getTaoBaoGoodsBriefs() != null)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(bf, null, fanLiRate, shareRate);
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(bf, paramsDTO);
|
| | | re.add(goodsDetailVO);
|
| | | }
|
| | | } else {
|
| | |
| | | break;
|
| | | }
|
| | | }
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, fanLiRate, shareRate);
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO);
|
| | | re.add(goodsDetailVO);
|
| | | }
|
| | | }
|