| | |
| | | }
|
| | | }
|
| | |
|
| | | // 已下架ID
|
| | | List<Long> listDown = new ArrayList<Long>();
|
| | | // 商品列表
|
| | | List<TaoBaoGoodsBrief> listGoods = new ArrayList<TaoBaoGoodsBrief>();
|
| | |
|
| | |
| | | newExtra.setState(1);
|
| | | }
|
| | | newExtra.setUpdatetime(new Date());
|
| | | goodsPicture.setGoods(newExtra);
|
| | | goodsPicture.setGoods(oldExtra);
|
| | |
|
| | | } catch (TaobaoGoodsDownException e) {
|
| | | listDown.add(oldExtra.getAuctionId());
|
| | | |
| | | oldExtra.setState(1);
|
| | | oldExtra.setCoupon(false);
|
| | | oldExtra.setUpdatetime(new Date());
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | dynamicInfo.setImgs(imgs);
|
| | |
|
| | | // 更新商品
|
| | | // 商品已下架
|
| | | List<TaoBaoGoodsBrief> listGoodsBrief = dynamicInfo.getListGoodsBrief();
|
| | | if (listGoods != null && listGoods.size() > 0 && listGoodsBrief != null && listGoodsBrief.size() > 0) {
|
| | | if (listGoodsBrief != null && listGoodsBrief.size() > 0) {
|
| | |
|
| | | if (listGoods.size() > 0 ) {
|
| | | if (classId == 1) {
|
| | | dynamicInfo.setListGoodsBrief(listGoods);
|
| | | } else {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | // 商品已下架 则添加原来商品信息
|
| | | if (isadd) {
|
| | | // 商品已下架 则添加原来商品信息
|
| | | if (listDown.size() > 0 && listDown.contains(taoBaoGoodsBrief.getAuctionId())) {
|
| | | taoBaoGoodsBrief.setState(1);
|
| | | }
|
| | | listGoods.add(taoBaoGoodsBrief);
|
| | | }
|
| | | }
|
| | | dynamicInfo.setListGoodsBrief(listGoods);
|
| | | }
|
| | | } else {
|
| | | if (listDown.size() > 0) {
|
| | | for (TaoBaoGoodsBrief taoBaoGoodsBrief: listGoodsBrief) {
|
| | | if (listDown.contains(taoBaoGoodsBrief.getAuctionId())) {
|
| | | taoBaoGoodsBrief.setState(1);
|
| | | }
|
| | | dynamicInfo.setImgs(imgs);
|
| | | }
|
| | | dynamicInfo.setListGoodsBrief(listGoodsBrief);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | dynamicInfo.setUpdateTime(new Date());
|
| | | dynamicInfoDao.updateGoodInfo(dynamicInfo);
|
| | | }
|