From 1944844fea7a8edaf6dd1b456793ae251936385d Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期二, 14 五月 2019 15:19:58 +0800 Subject: [PATCH] 动态商品更新 --- fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java | 36 ++++++++++++++++++++---------------- 1 files changed, 20 insertions(+), 16 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 fe21a3b..fc1e349 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 @@ -63,7 +63,6 @@ import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.TaoBaoHttpUtil; import com.yeshi.fanli.util.TimeUtil; -import com.yeshi.fanli.vo.msg.ClientTextStyleVO; import net.sf.json.JSONArray; import net.sf.json.JSONObject; @@ -704,7 +703,10 @@ tg.setUserType(tb.getUserType()); tg.setShopTitle(tb.getShopTitle()); tg.setState(tb.getState()); // 鐘舵�侊細2018-12-03 - if (tb.getCouponAmount().compareTo(BigDecimal.valueOf(0)) == 1) { + if (tb.getCouponAmount().compareTo(BigDecimal.valueOf(0)) > 0) { + + tg.setCoupon(true);// 鏈夊埜 + TaoBaoQuanInfo quanInfo = new TaoBaoQuanInfo(); quanInfo.setCouponAmount(tb.getCouponAmount()); String couponEffectiveEndTime = tb.getCouponEffectiveEndTime(); @@ -758,14 +760,14 @@ tg.setTaoBaoHongBaoInfo(hongBaoInfo); + tg.setMoneyType(1); + tg.setSalesType(1); // 娴嬭瘯浣跨敤 - 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); + // 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,14 +1012,16 @@ } tg.setTaoBaoHongBaoInfo(hongBaoInfo); + tg.setMoneyType(1); + tg.setSalesType(1); // 娴嬭瘯浣跨敤 - 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); + // 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; } -- Gitblit v1.8.0