From 99edd3ce8ee02b358245bff195a9f63677ef61d6 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期二, 10 十二月 2019 17:37:16 +0800 Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div --- fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5ShareController.java | 51 +++++++++++++++++++++++++++------------------------ 1 files changed, 27 insertions(+), 24 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5ShareController.java b/fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5ShareController.java index d125aea..e0a3bfe 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5ShareController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5ShareController.java @@ -50,8 +50,10 @@ * 鍒嗕韩鍟嗗搧璇︽儏 * * @param callback - * @param shareId 鍒嗕韩id - * @param source 鏉ユ簮 + * @param shareId + * 鍒嗕韩id + * @param source + * 鏉ユ簮 * @param out */ @RequestMapping(value = "getDetail") @@ -78,8 +80,10 @@ * 鍒嗕韩鍟嗗搧鍒楄〃 * * @param callback - * @param shareId 鍒嗕韩id - * @param source 鏉ユ簮 + * @param shareId + * 鍒嗕韩id + * @param source + * 鏉ユ簮 * @param out */ @RequestMapping(value = "getList") @@ -97,18 +101,18 @@ List<Long> listIdTB = new ArrayList<Long>(); List<Long> listIdJD = new ArrayList<Long>(); List<Long> listIdPDD = new ArrayList<Long>(); - + for (int i = 0; i < list.size(); i++) { CommonGoods commonGoods = list.get(i).getCommonGoods(); if (commonGoods == null) { continue; } - + Integer goodsType = commonGoods.getGoodsType(); if (goodsType == null) { continue; } - + if (Constant.SOURCE_TYPE_TAOBAO == goodsType) { listIdTB.add(commonGoods.getGoodsId()); } else if (Constant.SOURCE_TYPE_JD == goodsType) { @@ -117,7 +121,7 @@ listIdPDD.add(commonGoods.getGoodsId()); } } - + // 娣樺疂楠岃瘉鏄惁鍦ㄥ敭 List<TaoBaoGoodsBrief> listTB = null; if (listIdTB.size() > 0) { @@ -127,7 +131,7 @@ e.printStackTrace(); } } - + // 浜笢楠岃瘉鏄惁鍦ㄥ敭 List<JDGoods> listJD = null; if (listIdJD.size() > 0) { @@ -136,7 +140,7 @@ filter.setListId(listIdJD); filter.setPageIndex(1); filter.setPageSize(100); - JDSearchResult result = JDApiUtil.queryByKey(filter); + JDSearchResult result = JDApiUtil.queryByKey(filter); if (result != null) { listJD = result.getGoodsList(); } @@ -144,8 +148,7 @@ e.printStackTrace(); } } - - + // 鎷煎澶氶獙璇佹槸鍚﹀湪鍞� List<PDDGoodsDetail> listPDD = null; if (listIdPDD.size() > 0) { @@ -155,7 +158,7 @@ sf.setPage(1); sf.setPageSize(100); sf.setGoodsIdList(listIdPDD.toArray(ids)); - PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(sf); + PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(sf); if (result != null) { listPDD = result.getGoodsList(); } @@ -163,13 +166,13 @@ e.printStackTrace(); } } - - + Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); - ConfigParamsDTO configParamsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE); + ConfigParamsDTO configParamsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE, + hongBaoManageService.getVIPFanLiRate()); for (UserShareGoodsGroup goodsGroup : list) { CommonGoods commonGoods = goodsGroup.getCommonGoods(); if (commonGoods == null) { @@ -180,11 +183,11 @@ goodsType = Constant.SOURCE_TYPE_TAOBAO; } Long commonGid = commonGoods.getGoodsId(); - + if (goodsType == Constant.SOURCE_TYPE_TAOBAO && listTB != null && listTB.size() > 0) { int state = 1; // 榛樿鍋滃敭 for (TaoBaoGoodsBrief goodsDetail : listTB) { - Long goodsId =goodsDetail.getAuctionId(); + Long goodsId = goodsDetail.getAuctionId(); if (goodsId == commonGid || goodsId.equals(commonGid)) { state = 0; // 鍦ㄥ敭 break; @@ -192,11 +195,11 @@ } commonGoods.setState(state); } - + if (goodsType == Constant.SOURCE_TYPE_JD && listJD != null && listJD.size() > 0) { int state = 1; // 榛樿鍋滃敭 for (JDGoods goodsDetail : listJD) { - Long goodsId =goodsDetail.getSkuId(); + Long goodsId = goodsDetail.getSkuId(); if (goodsId == commonGid || goodsId.equals(commonGid)) { state = 0; // 鍦ㄥ敭 break; @@ -204,12 +207,11 @@ } commonGoods.setState(state); } - - + if (goodsType == Constant.SOURCE_TYPE_PDD && listPDD != null && listPDD.size() > 0) { int state = 1; // 榛樿鍋滃敭 for (PDDGoodsDetail goodsDetail : listPDD) { - Long goodsId =goodsDetail.getGoodsId(); + Long goodsId = goodsDetail.getGoodsId(); if (goodsId == commonGid || goodsId.equals(commonGid)) { state = 0; // 鍦ㄥ敭 break; @@ -219,7 +221,8 @@ } GoodsDetailVO detailVO = GoodsDetailVOFactory.convertCommonGoods(commonGoods, configParamsDTO); if (!detailVO.isHasCoupon()) { - detailVO.setState(1);; // 宸叉姠鍏� + detailVO.setState(1); + ; // 宸叉姠鍏� } array.add(gson.toJson(detailVO)); } -- Gitblit v1.8.0