From b1f7380b94ff1189759ed14b563fed6534f73ab0 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期二, 14 五月 2019 10:49:13 +0800 Subject: [PATCH] Merge branch 'dev_4' --- fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java | 36 +++++++++++++++++++++++------------- 1 files changed, 23 insertions(+), 13 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java index f00a002..3ad5932 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java @@ -1602,6 +1602,8 @@ if ("ios".equalsIgnoreCase(platform)) { root.put("htmlLink", configService.get("index_html_link_ios")); } + + root.put("spikeGoods", getSpikeGoodsContent(acceptData)); out.print(JsonUtil.loadTrueResult(root)); } catch (Exception e) { @@ -1648,15 +1650,7 @@ return swiperList; } - /** - * 闄愭椂绉掓潃 1.5.3 - * - * @param acceptData - * @param out - */ - @RequestMapping(value = "getSpikeGoods") - public void getSpikeGoods(AcceptData acceptData, PrintWriter out) { - + private JSONObject getSpikeGoodsContent(AcceptData acceptData) { // 涓嬩竴娆″�掕鏃剁殑鏃堕棿 int type = qualityFlashSaleService.getNowType() + 1; int hour = 0; @@ -1733,10 +1727,24 @@ // 缂撳瓨鍗婁釜灏忔椂 redisManager.cacheCommonString(cachekey, array.toString(), 60 * 30); } - + Long endTime = nextTime.getTimeInMillis() - java.lang.System.currentTimeMillis(); JSONObject root = new JSONObject(); root.put("time", nextTime.getTimeInMillis()); + root.put("endTime", endTime > 0? endTime : 0); root.put("listgoods", array); + + return root; + } + + /** + * 闄愭椂绉掓潃 1.5.3 + * + * @param acceptData + * @param out + */ + @RequestMapping(value = "getSpikeGoods") + public void getSpikeGoods(AcceptData acceptData, PrintWriter out) { + JSONObject root = getSpikeGoodsContent(acceptData); out.print(JsonUtil.loadTrueResult(root)); } @@ -2010,8 +2018,8 @@ goodsJson.put("hongBao", hongBao); List<ClientTextStyleVO> labels = new ArrayList<>(); - labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭1", "#FF0000")); - labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭2", "#00FF00")); + labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭", "#FF0000")); + labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭", "#00FF00")); goodsJson.put("labels", labels); data.put("tbPidInfo", clientTBPid); @@ -2042,7 +2050,9 @@ } } // 搴楅摵 - if ("android".equalsIgnoreCase(acceptData.getPlatform())&&Integer.parseInt(acceptData.getVersion()) >= 40) { + if (("android".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) >= 40) + || ("ios".equalsIgnoreCase(acceptData.getPlatform()) + && Integer.parseInt(acceptData.getVersion()) >= 49)) { TaoBaoShop shop = taoBaoShopService.getTaoBaoShop(goods.getAuctionId(), goods.getSellerId()); if (shop != null) goodsJson.put("shopInfo", shop); -- Gitblit v1.8.0