| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoGoodsBriefMapper; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteBatchByGoodsId(List<Long> list) { |
| | | public void deleteBatchByGoodsId(List<String> list) { |
| | | taoBaoGoodsBriefMapper.deleteBatchByGoodsId(list); |
| | | } |
| | | |
| | | @Override |
| | | public List<TaoBaoGoodsBrief> queryByAuctionId(Long auctionId) { |
| | | public List<TaoBaoGoodsBrief> queryByAuctionId(String auctionId) { |
| | | return taoBaoGoodsBriefMapper.queryByAuctionId(auctionId); |
| | | } |
| | | |
| | | @Override |
| | | public List<Long> listExistById(List<Long> list) { |
| | | public List<Long> listExistById(List<String> list) { |
| | | if (list != null && list.size() > 0) |
| | | return taoBaoGoodsBriefMapper.listExistById(list); |
| | | else |
| | |
| | | @Override |
| | | public TaoBaoGoodsBrief selectByPrimaryKey(Long id) { |
| | | return taoBaoGoodsBriefMapper.selectByPrimaryKey(id); |
| | | } |
| | | |
| | | @Override |
| | | public TaoBaoGoodsBrief selectByGoodsId(String goodsId) { |
| | | List<TaoBaoGoodsBrief> list = queryByAuctionId(goodsId); |
| | | if(list!=null&&list.size()>0){ |
| | | return list.get(list.size()-1); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public TaoBaoGoodsBrief getTaoBaoGoodsDetailForShare(Long auctionId, Long uid) throws ShareGoodsException { |
| | | public TaoBaoGoodsBrief getTaoBaoGoodsDetailForShare(String auctionId, Long uid) throws ShareGoodsException { |
| | | if (uid == null || uid == 0) |
| | | throw new ShareGoodsException(201, "用户ID为空"); |
| | | if (auctionId == null || auctionId == 0) |
| | | if (StringUtil.isNullOrEmpty(auctionId)) |
| | | throw new ShareGoodsException(202, "商品ID为空"); |
| | | // 获取PID信息 |
| | | TBPid tbPid = tbPidService.getTBPid(uid, PidUser.TYPE_SHARE_GOODS); |
| | |
| | | ids += goods.getAuctionId() + ","; |
| | | } |
| | | ids = ids.endsWith(",") ? ids.substring(0, ids.length() - 1) : ids; |
| | | Map<Long, TaoBaoGoodsBrief> goodsMap = new HashMap<>(); |
| | | Map<String, TaoBaoGoodsBrief> goodsMap = new HashMap<>(); |
| | | try { |
| | | List<TaoBaoGoodsBrief> finalList = TaoKeApiUtil.getBatchGoodsInfos(ids); |
| | | if (finalList != null) |