| | |
| | | if (goods.getAuctionId() == null || goods.getAuctionId() == 0)
|
| | | throw new TaobaoGoodsUpdateException(2, "商品ID为空");
|
| | |
|
| | | List<TaoBaoGoodsBrief> goodsList = taoBaoGoodsBriefMapper.queryByAuctionId(goods.getAuctionId());
|
| | | if (goodsList == null || goodsList.size() == 0)
|
| | | throw new TaobaoGoodsUpdateException(3, "商品不在商品库中");
|
| | | // 更新收藏信息
|
| | | collectionGoodsService.updateCollectionGoods(goods);
|
| | |
|
| | | for (TaoBaoGoodsBrief tb : goodsList) {
|
| | | goods.setId(tb.getId());
|
| | | TaoBaoGoodsBrief updateGoods = getUpdateTaoBaoGoodsBrief(goods);
|
| | | System.out.println("更细信息:" + new Gson().toJson(updateGoods));
|
| | | taoBaoGoodsBriefMapper.updateByPrimaryKeySelective(updateGoods);
|
| | | // 更新收藏信息
|
| | | collectionGoodsService.updateCollectionGoods(goods);
|
| | | }
|
| | | List<TaoBaoGoodsBrief> goodsList = taoBaoGoodsBriefMapper.queryByAuctionId(goods.getAuctionId());
|
| | | if (goodsList != null)
|
| | | for (TaoBaoGoodsBrief tb : goodsList) {
|
| | | goods.setId(tb.getId());
|
| | | TaoBaoGoodsBrief updateGoods = getUpdateTaoBaoGoodsBrief(goods);
|
| | | System.out.println("更细信息:" + new Gson().toJson(updateGoods));
|
| | | taoBaoGoodsBriefMapper.updateByPrimaryKeySelective(updateGoods);
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|