| | |
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.dataoke.DaTaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.taobao.DaTaoKeUtil;
|
| | |
| | |
|
| | | @Override
|
| | | public void startSyncGoods() {
|
| | | LogHelper.test("大淘客同步开始");
|
| | | // 判断是否有正在进行的更新
|
| | | long firstTime = System.currentTimeMillis() - 1000 * 60 * 5L;
|
| | | int totalCount = 0;
|
| | |
| | | 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.getGoodsNotInList(cid, listId, count);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<DaTaoKeDetail> listByCidAndMaxPrice(Integer cid, BigDecimal maxPrice, int page, int pageSize) {
|
| | | return daTaoKeDetailMapper.listByCidAndMaxMinPrice(cid, maxPrice, null, (page - 1) * pageSize, pageSize);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public Long countByCidAndMaxPrice(Integer cid, BigDecimal maxPrice) {
|
| | |
|
| | | return daTaoKeDetailMapper.countByCidAndMaxMinPrice(cid, maxPrice, null);
|
| | | }
|
| | |
|
| | | }
|