| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.exception.QualityFactoryException;
|
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
|
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsUpdateException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.lable.LabelService;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | List<String> strList = new ArrayList<String>();
|
| | | for (Long id : auctionIdList) {
|
| | | strList.add(id + "");
|
| | | }
|
| | | List<TaoBaoGoodsBrief> existList = taoBaoGoodsBriefRecordMapper.queryGoodsByAuctionId(strList);
|
| | | List<TaoBaoGoodsBrief> existList = taoBaoGoodsBriefRecordMapper.queryByAuctionIdList(auctionIdList);
|
| | |
|
| | | List<QualityFactory> addList = new ArrayList<QualityFactory>();
|
| | | List<LabelGoods> addLabelList = new ArrayList<LabelGoods>();
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | |
| | | // 删除精选库
|
| | | List<Long> listDeleteQuality = new ArrayList<Long>();
|
| | | // 删除标签
|
| | | List<Long> listDeleteLabel = new ArrayList<Long>();
|
| | | |
| | |
|
| | | List<QualityFactory> listUpdateQuality = new ArrayList<QualityFactory>();
|
| | |
|
| | |
| | |
|
| | | /* 无券信息 移除精选库 */
|
| | | listDeleteQuality.add(quality.getId());
|
| | | // 移除标签
|
| | | listDeleteLabel.add(goods.getId());
|
| | |
|
| | | } else {
|
| | | /* 无券信息 移除精选库 */
|
| | |
| | |
|
| | | // 移除精选库
|
| | | listDeleteQuality.add(quality.getId());
|
| | | // 移除标签
|
| | | listDeleteLabel.add(goods.getId());
|
| | |
|
| | | } else {
|
| | | /* 更新商品信息 */
|
| | | TaoBaoGoodsBrief updateGoods = taoBaoGoodsUpdateService
|
| | | .getUpdateTaoBaoGoodsBrief(newGoodsBrief);
|
| | | TaoBaoGoodsBrief updateGoods = taoBaoGoodsUpdateService.getUpdateTaoBaoGoodsBrief(newGoodsBrief);
|
| | | |
| | | updateGoods.setId(id);
|
| | | taoBaoGoodsBriefService.setGoodsBriefDefault(updateGoods);
|
| | | |
| | | listUpdateGoodsBrief.add(updateGoods);
|
| | |
|
| | | /* 更新精选库 信息时间 */
|
| | |
| | |
|
| | | // 更新商品信息
|
| | | if (listUpdateGoodsBrief.size() > 0) {
|
| | | taoBaoGoodsBriefService.updateBatchSelective(listUpdateGoodsBrief);
|
| | | taoBaoGoodsUpdateService.updateTaoBaoGoods(listUpdateGoodsBrief);
|
| | | }
|
| | |
|
| | | // 更新精选库
|
| | |
| | | // 批量删除精选库
|
| | | if (listDeleteQuality.size() > 0) {
|
| | | qualityFactoryMapper.deleteBatchByPrimaryKey(listDeleteQuality);
|
| | | // 批量删除限时抢购
|
| | | qualityFlashSaleMapper.deleteBatchByQualityID(listDeleteQuality);
|
| | | }
|
| | |
|
| | | // 删除对应标签
|
| | | if (listDeleteLabel.size() > 0) {
|
| | | labelGoodsMapper.deleteBatchByGoodsId(listDeleteLabel);
|
| | | }
|
| | | |
| | | // 添加标签
|
| | | if (listLabelAdd.size() > 0) {
|
| | | labelGoodsMapper.insertBatch(listLabelAdd);
|
| | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | taoBaoGoodsBriefService.updateBatchSelective(listGoodsUpdate);
|
| | | try {
|
| | | taoBaoGoodsUpdateService.updateTaoBaoGoods(listGoodsUpdate);
|
| | | } catch (TaobaoGoodsUpdateException e) {
|
| | | System.out.println(e.getMsg());
|
| | | }
|
| | | }
|
| | |
|
| | | // 淘宝商品插入数据库
|