From 0ec22dcf4fd9c4496e6f681e7fab89f56c6e4e8a Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期四, 02 四月 2020 14:45:20 +0800 Subject: [PATCH] vip 消息 --- fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java b/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java index 6e05105..ade2758 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java @@ -1750,15 +1750,27 @@ TaoBaoGoodsBrief taoBaoGoods = new TaoBaoGoodsBrief(); taoBaoGoods.setAuctionId(detail.getGoodsId()); taoBaoGoods.setBiz30day(detail.getMonthSales()); + // 鍒哥浉鍏宠浆鎹� taoBaoGoods.setCouponAmount(detail.getCouponPrice()); - taoBaoGoods.setCouponInfo(String.format("婊�%s鍏冨噺%s鍏�", detail.getCouponConditions(), + taoBaoGoods.setCouponInfo(String.format("婊�%s鍏冨噺%s鍏�", detail.getOriginalPrice(), MoneyBigDecimalUtil.getWithNoZera(detail.getCouponPrice()))); if (detail.getCouponTotalNum() != null && detail.getCouponReceiveNum() != null) taoBaoGoods.setCouponLeftCount(detail.getCouponTotalNum() - detail.getCouponReceiveNum()); else taoBaoGoods.setCouponLeftCount(0); taoBaoGoods.setCouponStartFee(detail.getOriginalPrice()); + try { + taoBaoGoods.setCouponStartFee(detail.getOriginalPrice()); + } catch (Exception e) { + } + taoBaoGoods.setCouponTotalCount(detail.getCouponTotalNum()); + taoBaoGoods.setCouponLink(detail.getCouponLink()); + taoBaoGoods.setCouponEffectiveStartTime(TimeUtil.getGernalTime( + TimeUtil.convertToTimeTemp(detail.getCouponStartTime(), "yyyy-MM-dd HH:mm:ss"), "yyyy-MM-dd")); + taoBaoGoods.setCouponEffectiveEndTime(TimeUtil.getGernalTime( + TimeUtil.convertToTimeTemp(detail.getCouponEndTime(), "yyyy-MM-dd HH:mm:ss"), "yyyy-MM-dd")); + taoBaoGoods.setPictUrl(detail.getMainPic()); taoBaoGoods.setPictUrlWhite(detail.getMainPic()); if (taoBaoGoods.getPictUrl() != null && !taoBaoGoods.getPictUrl().startsWith("http")) @@ -2002,14 +2014,14 @@ if (elements.size() >= 0) { for (int i = 0; i < elements.size(); i++) { String content = elements.get(i).toString(); - if (content.contains("var _DATA_Mdskip")) { + if (content.contains("var _DATA_Detail")) { content = content.replace("<script>", ""); content = content.replace("</script>", ""); if (content.contains("videoDetail")) { - content += ";function getData(){ var json={title:_DATA_Mdskip.item.title,pictUrl:_DATA_Mdskip.item.videoDetail.videoThumbnailURL}; return JSON.stringify(json);}"; + content += ";function getData(){ var json={title:_DATA_Detail.item.title,pictUrl:_DATA_Detail.item.images[0]}; return JSON.stringify(json);}"; } else { - content += ";function getData(){ var json={title:_DATA_Mdskip.item.title,pictUrl:_DATA_Mdskip.item.videos[0].videoThumbnailURL}; return JSON.stringify(json);}"; + content += ";function getData(){ var json={title:_DATA_Detail.item.title,pictUrl:_DATA_Detail.item.images[0]}; return JSON.stringify(json);}"; } ScriptEngineManager manager = new ScriptEngineManager(); @@ -2024,6 +2036,9 @@ taoBaoGoodsBrief = new TaoBaoGoodsBrief(); taoBaoGoodsBrief.setTitle(title.toString()); taoBaoGoodsBrief.setPictUrl(pictUrl.toString()); + if (!pictUrl.toString().startsWith("http")) { + taoBaoGoodsBrief.setPictUrl(TbImgUtil.getTBSize220Img("http:" + pictUrl.toString())); + } } break; -- Gitblit v1.8.0