| | |
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.dataoke.DaTaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.taobao.DaTaoKeUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
| | |
|
| | | @Override
|
| | | public TaoBaoGoodsBrief filterTaoBaoGoods(TaoBaoGoodsBrief goods) {
|
| | | List<Long> goodsIdList = new ArrayList<>();
|
| | | goodsIdList.add(goods.getAuctionId());
|
| | |
|
| | | List<DaTaoKeDetailV2> daTaoKeList = listByGoodsIds(goodsIdList);
|
| | | if (daTaoKeList == null || daTaoKeList.size() == 0)
|
| | | return goods;
|
| | |
|
| | | // 重新设置标题与券价格
|
| | | goods = DaTaoKeUtil.filterTaoBaoGoods(goods, daTaoKeList.get(0));
|
| | |
|
| | | return goods;
|
| | | return filterTaoBaoGoods(goods, null, null);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | return daTaoKeGoodsDetailV2Dao.listBySellerId((int) start, count, sellerId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public DaTaoKeDetailV2 selectByAuctionId(Long auctionId) {
|
| | | return daTaoKeGoodsDetailV2Dao.selectByAuctionId(auctionId);
|
| | | }
|
| | |
|
| | | @Cacheable(value = "daTaoKeGoodsCache", key = "'selectByAuctionId-'+#auctionId")
|
| | | @Override
|
| | | public DaTaoKeDetailV2 selectByAuctionIdCache(Long auctionId) {
|
| | | return selectByAuctionId(auctionId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public TaoBaoGoodsBrief filterTaoBaoGoods(TaoBaoGoodsBrief goods, String platform, String version) {
|
| | | List<Long> goodsIdList = new ArrayList<>();
|
| | | goodsIdList.add(goods.getAuctionId());
|
| | |
|
| | | List<DaTaoKeDetailV2> daTaoKeList = listByGoodsIds(goodsIdList);
|
| | | if (daTaoKeList == null || daTaoKeList.size() == 0)
|
| | | return goods;
|
| | |
|
| | | if (platform != null && version != null && VersionUtil.greaterThan_2_1(platform, version)) {
|
| | | // 重新设置标题与券价格
|
| | | goods = DaTaoKeUtil.filterTaoBaoGoods(goods, daTaoKeList.get(0), true);
|
| | | } else
|
| | | goods = DaTaoKeUtil.filterTaoBaoGoods(goods, daTaoKeList.get(0), false);
|
| | |
|
| | | return goods;
|
| | | }
|
| | |
|
| | | }
|