| | |
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.lable.LabelService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService;
|
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
|
| | |
| | | private TaoBaoClassRelationMapper taoBaoClassRelationMapper;
|
| | |
|
| | | @Resource
|
| | | private DaTaoKeGoodsDetailService daTaoKeGoodsDetailService;
|
| | | |
| | | private DaTaoKeGoodsDetailV2Service daTaoKeGoodsDetailV2Service;
|
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | |
|
| | | @Resource
|
| | | private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsUpdateService taoBaoGoodsUpdateService;
|
| | | |
| | |
|
| | | @Override
|
| | | @Cacheable(value = "qualityCache", key = "'listQueryByCouponAmount-'+#start+'-'+#key+'-'+#endAmount+'-'+#startPropor")
|
| | |
| | | @Cacheable(value = "qualityCache", key = "'listQueryByClassId-'+#start+'-'+#cid")
|
| | | public List<QualityFactory> listQueryByClassId(long start, int count, Long cid) {
|
| | | List<QualityFactory> list = qualityFactoryMapper.listQuery(start, count, null, cid, null, null, 1);
|
| | | |
| | |
|
| | | if (list == null) {
|
| | | list = new ArrayList<QualityFactory>();
|
| | | }
|
| | | |
| | |
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | for (QualityFactory qf : list)
|
| | | goodsList.add(qf.getTaoBaoGoodsBrief());
|
| | | //过滤商品信息
|
| | | goodsList=taoBaoGoodsUpdateService.filterImportantTaoBaoGoods(goodsList);
|
| | | goodsList = daTaoKeGoodsDetailService.filterTaoBaoGoods(goodsList);// 过滤大淘客标题
|
| | | // 过滤商品信息
|
| | | goodsList = taoBaoGoodsUpdateService.filterImportantTaoBaoGoods(goodsList);
|
| | | goodsList = daTaoKeGoodsDetailV2Service.filterTaoBaoGoods(goodsList);// 过滤大淘客标题
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | if (i < goodsList.size())
|
| | | list.get(i).setTaoBaoGoodsBrief(goodsList.get(i));
|
| | |
| | | return qualityFactoryMapper.listRecommendToIndex(start, count, proportion, commision, couponAmount, tkRate,
|
| | | couponRatio);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public long countRecommend(Double proportion, Integer commision, Integer couponAmount, double tkRate,
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | goodsList = daTaoKeGoodsDetailService.filterTaoBaoGoods(goodsList);
|
| | | goodsList = daTaoKeGoodsDetailV2Service.filterTaoBaoGoods(goodsList);
|
| | | } catch (Exception e) {
|
| | | }
|
| | |
|
| | |
| | |
|
| | | return array;
|
| | | }
|
| | | |
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 首页最底部@商品信息流
|
| | | */
|
| | | @Override
|
| | | @Cacheable(value = "qualityCache", key = "'getRecommendToIndexV2-'+#start")
|
| | | public JSONArray getRecommendToIndexV2(long start, int count) {
|
| | | @Cacheable(value = "qualityCache", key = "'getRecommendToIndexV2-'+#start+'-'+#platform+'-'+#version")
|
| | | public JSONArray getRecommendToIndexV2(long start, int count, String platform, String version) {
|
| | |
|
| | | // 返利金额2元以上;
|
| | | Integer commision = 2;
|
| | |
| | | if (fanLiRate != null) {
|
| | | pop = Double.parseDouble(fanLiRate.toString());
|
| | | }
|
| | | |
| | |
|
| | | List<QualityFactory> listQuery = listRecommend(start, count, pop, commision, couponAmount, tkRate, couponRatio);
|
| | |
|
| | | if (listQuery == null || listQuery.size() == 0) {
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | goodsList = daTaoKeGoodsDetailService.filterTaoBaoGoods(goodsList);
|
| | | goodsList = daTaoKeGoodsDetailV2Service.filterTaoBaoGoods(goodsList);
|
| | | } catch (Exception e) {
|
| | | }
|
| | |
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version);
|
| | |
|
| | | for (TaoBaoGoodsBrief taoBaoGoodsBrief : goodsList) {
|
| | | GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief,paramsDTO);
|
| | | GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO);
|
| | | array.add(gson.toJson(detailVO));
|
| | | }
|
| | |
|
| | | return array;
|
| | | }
|
| | |
|
| | | |
| | | |
| | | @Override
|
| | | @Cacheable(value = "qualityCache", key = "'countRecommendToIndex-'+#proportion")
|
| | | public long countRecommendToIndex(String proportion) {
|