| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor=Exception.class) |
| | | public void save(PushGoods record, List<Long> goodsIds) throws PushGoodsException, Exception { |
| | | public void save(PushGoods record, List<String> goodsIds) throws PushGoodsException, Exception { |
| | | // 定时时间 |
| | | if (StringUtil.isNullOrEmpty(record.getControlTime_str())) { |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | |
| | | } |
| | | |
| | | @Transactional(rollbackFor=Exception.class) |
| | | public void saveGoodsInfo(boolean isAdd, Long pushId, List<Long> goodsIds) throws Exception { |
| | | public void saveGoodsInfo(boolean isAdd, Long pushId, List<String> goodsIds) throws Exception { |
| | | if (goodsIds == null || goodsIds.size() == 0) { |
| | | if (!isAdd) { |
| | | pushGoodsGroupService.deleteByPushId(pushId); |
| | |
| | | } |
| | | |
| | | // 商品信息获取与保存 |
| | | List<Long> listCommonId = new ArrayList<Long>(); |
| | | for (Long auctionId : goodsIds) { |
| | | List<Long> listCommonId = new ArrayList<>(); |
| | | for (String auctionId : goodsIds) { |
| | | // 获取商品详情 |
| | | try { |
| | | TaoBaoGoodsBrief goodsBrief = TaoKeApiUtil.searchGoodsDetail(auctionId); |
| | |
| | | throw new PushGoodsException(1, "商品详细信息已不存在"); |
| | | } |
| | | |
| | | Long goodsId = commonGoods.getGoodsId(); |
| | | String goodsId = commonGoods.getGoodsId(); |
| | | String url = "https://item.taobao.com/item.htm?id=" + goodsId; |
| | | pushService.pushGoods(pushGoods.getUid(), pushGoods.getTitle(), pushGoods.getContent(), url,listIOS, listAndroid,pushGoods.getSystem()); |
| | | } else { |