| | |
| | | List<Long> listCommonId = new ArrayList<Long>();
|
| | | for (Long auctionId : goodsIds) {
|
| | | // 获取商品详情
|
| | | TaoBaoGoodsBrief goodsBrief = TaoKeApiUtil.searchGoodsDetail(auctionId);
|
| | |
|
| | | // 转换简版商品信息
|
| | | CommonGoods commonGoods = CommonGoodsFactory.create(goodsBrief);
|
| | | if (commonGoods != null) {
|
| | | commonGoodsService.addOrUpdateCommonGoods(commonGoods);
|
| | | Long cid = commonGoods.getId();
|
| | | if (cid != null) {
|
| | | listCommonId.add(cid);
|
| | | try {
|
| | | TaoBaoGoodsBrief goodsBrief = TaoKeApiUtil.searchGoodsDetail(auctionId);
|
| | | // 转换简版商品信息
|
| | | CommonGoods commonGoods = CommonGoodsFactory.create(goodsBrief);
|
| | | if (commonGoods != null) {
|
| | | commonGoodsService.addOrUpdateCommonGoods(commonGoods);
|
| | | Long cid = commonGoods.getId();
|
| | | if (cid != null) {
|
| | | listCommonId.add(cid);
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | /* 修改时删除 部分 */
|