| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.taobao.dataoke.DaTaoKeDetailMapper;
|
| | | import com.yeshi.fanli.dto.dataoke.DaTaoKeApiResult;
|
| | | import com.yeshi.fanli.dto.dataoke.DingDongQiangDTO;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | addGoodsList(result.getDetailList());
|
| | | totalCount += result.getDetailList().size();
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | LogHelper.test("大淘客总共更新数据数量:" + totalCount);
|
| | |
| | | List<DaTaoKeDetail> dtList = listByGoodsIds(goodsIdList);
|
| | |
|
| | | Map<Long, DaTaoKeDetail> map = new HashMap<>();
|
| | | for (DaTaoKeDetail goods : dtList)
|
| | | map.put(goods.getGoodsId(), goods);
|
| | | if (dtList != null)
|
| | | for (DaTaoKeDetail goods : dtList)
|
| | | map.put(goods.getGoodsId(), goods);
|
| | | for (TaoBaoGoodsBrief goods : goodsList) {
|
| | | DaTaoKeDetail detail = map.get(goods.getAuctionId());
|
| | | goods = DaTaoKeUtil.filterTaoBaoGoods(goods, detail);
|
| | |
| | | return daTaoKeDetailMapper.countByCidAndMaxMinPrice(cid, maxPrice, null);
|
| | | }
|
| | |
|
| | |
|
| | | private void updateGoods(Long id) {
|
| | | DaTaoKeDetail detail = daTaoKeDetailMapper.selectByPrimaryKey(id);
|
| | | if (detail != null)
|
| | | return;
|
| | | detail = DaTaoKeApiUtil.getGoodsDetailV1(id);
|
| | | if (detail != null) {
|
| | | List<DaTaoKeDetail> list = new ArrayList<>();
|
| | | list.add(detail);
|
| | | addGoodsList(list);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|