From ecfbc24553fb24c788f1735b41a47b4970ce70e1 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期日, 05 五月 2019 12:36:12 +0800 Subject: [PATCH] 推送奖励券 + 新人抽奖奖励券随机 --- fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 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 acfba6b..c17ca9f 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 @@ -760,8 +760,10 @@ // 娴嬭瘯浣跨敤 tg.setMoneyType(Math.random() > 0.5 ? 1 : 2); tg.setSalesType(Math.random() > 0.5 ? 1 : 2); + tg.setSalesType(Math.random() > 0.5 ? tg.getSalesType() : 3); List<ClientTextStyleVO> labels = new ArrayList<>(); labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭", "#FF0000")); + labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭", "#00FF00")); tg.setLabels(labels); return tg; @@ -1010,8 +1012,10 @@ // 娴嬭瘯浣跨敤 tg.setMoneyType(Math.random() > 0.5 ? 1 : 2); tg.setSalesType(Math.random() > 0.5 ? 1 : 2); + tg.setSalesType(Math.random() > 0.5 ? tg.getSalesType() : 3); List<ClientTextStyleVO> labels = new ArrayList<>(); labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭", "#FF0000")); + labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭", "#00FF00")); tg.setLabels(labels); return tg; @@ -1325,9 +1329,9 @@ * @return */ public static String getGoodsHongBaoInfo(TaoBaoGoodsBrief goodsBrief, BigDecimal rate) { - if (goodsBrief != null && goodsBrief.getMaterialLibType() != null && goodsBrief.getMaterialLibType() == 0) - return "楼0.00"; - else +// if (goodsBrief != null && goodsBrief.getMaterialLibType() != null && goodsBrief.getMaterialLibType() == 0) +// return "楼0.00"; +// else return "楼" + getGoodsHongBaoMoney(goodsBrief, rate).toString(); } @@ -1801,9 +1805,21 @@ else shop.setUserType(0); + shop.setShopLink(TaoBaoUtil.getShopLink(shop.getId())); + return shop; } + /** + * 鏍规嵁鍗栧id鑾峰彇搴楅摵閾炬帴 + * + * @param sellerId + * @return + */ + public static String getShopLink(Long sellerId) { + return "http://store.taobao.com/shop/view_shop.htm?user_number_id=" + sellerId; + } + public static void main(String[] args) { String s = channelMap.get("3"); System.out.println(s); -- Gitblit v1.8.0