From 10e423b5a82eca7ad670435ba079f1fe74eac4d9 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 02 八月 2019 11:35:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java | 46 ++++++++++++++++++++++++++++++++++++---------- 1 files changed, 36 insertions(+), 10 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java index b3ffe4c..78155da 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java @@ -93,10 +93,13 @@ goodsInfo.setBaoyou(true); } + List<ClientTextStyleVO> labels = goodsInfo.getLabels(); // 鑷惀 String owner = otherDTO.getOwner(); if (!StringUtil.isNullOrEmpty(owner) && "g".equalsIgnoreCase(owner)) { - List<ClientTextStyleVO> labels = new ArrayList<ClientTextStyleVO>(); + if (labels == null) { + labels = new ArrayList<ClientTextStyleVO>(); + } ClientTextStyleVO textStyleVO = new ClientTextStyleVO(); textStyleVO.setContent("浜笢鑷惀"); textStyleVO.setColor("#E42219"); @@ -108,6 +111,15 @@ if (pinGouInfo != null) { goods.setPrice(pinGouInfo.getPingouPrice()); goodsInfo.setPriceName("鎷艰喘浠�"); + + if (labels == null) { + labels = new ArrayList<ClientTextStyleVO>(); + } + ClientTextStyleVO textStyleVO = new ClientTextStyleVO(); + textStyleVO.setContent("鎷艰喘"); + textStyleVO.setColor("#FF9600"); + labels.add(textStyleVO); + goodsInfo.setLabels(labels); } else { goodsInfo.setPriceName("浜笢浠�"); } @@ -382,14 +394,6 @@ } goodsInfo.setSalesCount(salesCountMidea); - JDPingouInfo pinGouInfo = goods.getPinGouInfo(); - if (pinGouInfo != null) { - goodsInfo.setZkPrice(pinGouInfo.getPingouPrice()); - goodsInfo.setPriceName("鎷艰喘浠�"); - } else { - goodsInfo.setZkPrice(goods.getPrice()); - goodsInfo.setPriceName("浜笢浠�"); - } // 璧勯噾淇℃伅 MoneyInfoVO moneyInfoVO = new MoneyInfoVO(); @@ -423,10 +427,13 @@ goodsInfo.setCouponInfo(coupon); } + List<ClientTextStyleVO> labels = goodsInfo.getLabels(); // 浜笢鑷惀鏍囩 String owner = goods.getOwner(); if (!StringUtil.isNullOrEmpty(owner) && "g".equalsIgnoreCase(owner)) { - List<ClientTextStyleVO> labels = new ArrayList<ClientTextStyleVO>(); + if (labels == null) { + labels = new ArrayList<ClientTextStyleVO>(); + } ClientTextStyleVO textStyleVO = new ClientTextStyleVO(); textStyleVO.setContent("浜笢鑷惀"); textStyleVO.setColor("#E42219"); @@ -437,6 +444,25 @@ goodsInfo.setShopType(20); // 浜笢 } + + JDPingouInfo pinGouInfo = goods.getPinGouInfo(); + if (pinGouInfo != null) { + goodsInfo.setZkPrice(pinGouInfo.getPingouPrice()); + goodsInfo.setPriceName("鎷艰喘浠�"); + + if (labels == null) { + labels = new ArrayList<ClientTextStyleVO>(); + } + ClientTextStyleVO textStyleVO = new ClientTextStyleVO(); + textStyleVO.setContent("鎷艰喘"); + textStyleVO.setColor("#FF9600"); + labels.add(textStyleVO); + goodsInfo.setLabels(labels); + } else { + goodsInfo.setZkPrice(goods.getPrice()); + goodsInfo.setPriceName("浜笢浠�"); + } + // 搴楅摵淇℃伅 JDShopInfo shopInfo = goods.getShopInfo(); if (shopInfo != null && !StringUtil.isNullOrEmpty(shopInfo.getShopName())) { -- Gitblit v1.8.0