| | |
| | | import com.yeshi.fanli.dao.goods.taobao.dataoke.DaTaoKeGoodsDetailV2Dao;
|
| | | import com.yeshi.fanli.dto.dataoke.DaTaoKeGoodsResult;
|
| | | import com.yeshi.fanli.dto.dataoke.DingDongQiangDTO;
|
| | | import com.yeshi.fanli.dto.taobao.DaTaoKeFilterResult;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | for (TaoBaoGoodsBrief goods : goodsList)
|
| | | goodsIdList.add(goods.getAuctionId());
|
| | |
|
| | | List<DaTaoKeDetailV2> dtList = listByGoodsIds(goodsIdList);
|
| | | List<DaTaoKeDetailV2> dtList = null;
|
| | |
|
| | | try {
|
| | | dtList = listByGoodsIds(goodsIdList);
|
| | | } catch (Exception e) {
|
| | |
|
| | | }
|
| | | Map<Long, DaTaoKeDetailV2> map = new HashMap<>();
|
| | | if (dtList != null)
|
| | | for (DaTaoKeDetailV2 goods : dtList)
|
| | |
| | | return goodsList;
|
| | | }
|
| | |
|
| | | @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;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<DaTaoKeDetailV2> listByIds(List<Long> idsList) {
|
| | |
| | |
|
| | | @Override
|
| | | public List<DaTaoKeDetailV2> getGoodsNotInList(Long cid, List<Long> listId, int count) {
|
| | | if (cid != null && cid == 0L)
|
| | | cid = null;
|
| | | return daTaoKeGoodsDetailV2Dao.getGoodsNotInList(cid, listId, count);
|
| | | }
|
| | |
|
| | |
| | | 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 DaTaoKeFilterResult filterTaoBaoGoods(TaoBaoGoodsBrief goods) {
|
| | | List<Long> goodsIdList = new ArrayList<>();
|
| | | goodsIdList.add(goods.getAuctionId());
|
| | |
|
| | | List<DaTaoKeDetailV2> daTaoKeList = listByGoodsIds(goodsIdList);
|
| | | if (daTaoKeList == null || daTaoKeList.size() == 0)
|
| | | return new DaTaoKeFilterResult(goods, DaTaoKeFilterResult.FILTER_TYPE_NONE);
|
| | | // 重新设置标题与券价格
|
| | | return DaTaoKeUtil.filterTaoBaoGoods(goods, daTaoKeList.get(0), true);
|
| | | }
|
| | |
|
| | | }
|