From 3727469752a977dde6327e2c48d761b20b565d3d Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 15 七月 2022 09:19:21 +0800 Subject: [PATCH] 商品ID字符串化 --- fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushGoodsServiceImpl.java | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushGoodsServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushGoodsServiceImpl.java index 9b6cb0e..a512c52 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushGoodsServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushGoodsServiceImpl.java @@ -91,7 +91,7 @@ @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"); @@ -131,7 +131,7 @@ } @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); @@ -140,8 +140,8 @@ } // 鍟嗗搧淇℃伅鑾峰彇涓庝繚瀛� - 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); @@ -500,7 +500,7 @@ 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 { -- Gitblit v1.8.0