| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | | 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.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoSearchNav;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoShopInfo;
|
| | | import com.yeshi.common.entity.taobao.TaoBaoShopInfo;
|
| | | 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.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | | |
| | | @Resource
|
| | | private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoShopService taoBaoShopService;
|
| | |
| | |
|
| | | @Override
|
| | | @Cacheable(value = "taoKeMaterialCache", key = "'getBrandsGoods-'+#materialId +'-'+#pageIndex")
|
| | | public JSONObject getBrandsGoods(Integer materialId, int pageIndex, int pageSize) throws Exception {
|
| | | public JSONObject getBrandsGoods(Integer materialId, int pageIndex, int pageSize, SystemEnum system) throws Exception {
|
| | |
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.getMaterialByMaterialId(materialId, pageIndex, pageSize);
|
| | |
|
| | |
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | |
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate(system);
|
| | |
|
| | | listGoods.parallelStream().forEach(taoBaoGoodsBrief -> {
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiao-'+#sf")
|
| | | public JSONObject searchWuLiao(SearchFilter sf) {
|
| | | @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiao-'+#sf+'-'+system")
|
| | | public JSONObject searchWuLiao(SearchFilter sf,SystemEnum system) {
|
| | |
|
| | | // 淘宝物料接口查询
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf);
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf,null,null);
|
| | |
|
| | | List<TaoBaoSearchNav> navList = TaoBaoUtil.getBaseNav();
|
| | | if (result.getNavList() != null)
|
| | |
| | | int fh = sf.getHongbao();
|
| | | boolean ft = sf.isTmall();
|
| | |
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate(system);
|
| | |
|
| | | if (fq == 0 && fh == 0 && !ft) {
|
| | | if (result != null && result.getTaoBaoGoodsBriefs() != null)
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoV2-'+#sf")
|
| | | public JSONObject searchWuLiaoV2(SearchFilter sf) {
|
| | | @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoV2-'+#sf+'-'+#platform+'-'+#version+'-'+#system")
|
| | | public JSONObject searchWuLiaoV2(SearchFilter sf,String platform,String version,SystemEnum system) {
|
| | |
|
| | | // 淘宝物料接口查询
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf);
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf,null,null);
|
| | |
|
| | | List<TaoBaoSearchNav> navList = TaoBaoUtil.getBaseNav();
|
| | | if (result.getNavList() != null)
|
| | |
| | | int fh = sf.getHongbao();
|
| | | boolean ft = sf.isTmall();
|
| | |
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version,system);
|
| | |
|
| | | if (fq == 0 && fh == 0 && !ft) {
|
| | | if (result != null && result.getTaoBaoGoodsBriefs() != null)
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoList-'+#sf")
|
| | | public List<TaoBaoGoodsBrief> searchWuLiaoList(SearchFilter sf) {
|
| | |
|
| | | @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoList-'+#sf+'-'+system")
|
| | | public List<TaoBaoGoodsBrief> searchWuLiaoList(SearchFilter sf,SystemEnum system) {
|
| | | // 淘宝物料接口查询
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf);
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf,null,null);
|
| | | if (result == null)
|
| | | return null;
|
| | |
|
| | |
| | |
|
| | | @Override
|
| | | public JSONObject listByWuLiao(int page, String key, String cateIds, String filterParams, String order,
|
| | | String startprice, String endprice, String searchParam) {
|
| | | String startprice, String endprice, String searchParam,SystemEnum system) {
|
| | |
|
| | | SearchFilter sf = new SearchFilter();
|
| | | sf.setKey(key);
|
| | |
| | | }
|
| | |
|
| | | // 淘宝物料接口查询
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf);
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf,null,null);
|
| | |
|
| | | List<TaoBaoSearchNav> navList = TaoBaoUtil.getBaseNav();
|
| | | if (result.getNavList() != null)
|
| | |
| | | int fh = sf.getHongbao();
|
| | | boolean ft = sf.isTmall();
|
| | |
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate(system);
|
| | |
|
| | | if (fq == 0 && fh == 0 && !ft) {
|
| | | if (result != null && result.getTaoBaoGoodsBriefs() != null)
|
| | |
| | |
|
| | | @Override
|
| | | public JSONObject listQualityGoods(List<QualityFactory> listQuality, List<TaoBaoGoodsBrief> searchWuLiaoList,
|
| | | Map<String, String> map) {
|
| | | Map<String, String> map,SystemEnum system) {
|
| | |
|
| | | JSONArray array = new JSONArray();
|
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | |
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate(system);
|
| | |
|
| | | /* 遍历列表数据 */
|
| | | for (QualityFactory selectionGoods : listQuality) {
|