From e021e32a6ff0ec216f69c24f7ea929798bdce4c5 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 05 十一月 2019 11:37:58 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/BrandControllerV2.java |   31 +++++++++++++++----------------
 1 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/BrandControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/BrandControllerV2.java
index bbbd733..7ea420c 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/BrandControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/BrandControllerV2.java
@@ -14,6 +14,7 @@
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
+import com.yeshi.fanli.dto.ConfigParamsDTO;
 import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
 import com.yeshi.fanli.entity.accept.AcceptData;
 import com.yeshi.fanli.entity.brand.BrandGoodsCahe;
@@ -308,7 +309,7 @@
 
 			BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
 			BigDecimal shareRate = hongBaoManageService.getShareRate();
-
+			ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
 			// 鍟嗗搧淇℃伅杩囨护
 			listGoodsBrief = taoBaoGoodsUpdateService.filterImportantTaoBaoGoods(listGoodsBrief);
 
@@ -327,8 +328,7 @@
 						continue;
 					}
 				}
-				GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, fanLiRate,
-						shareRate);
+				GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO);
 				array.add(gson.toJson(goodsDetailVO));
 			}
 		}
@@ -349,7 +349,7 @@
 	 * @param acceptData
 	 * @param out
 	 */
-//	@RequestMapping(value = "getList", method = RequestMethod.POST)
+	@RequestMapping(value = "getList", method = RequestMethod.POST)
 	public void getList(AcceptData acceptData, Integer page, Long cid, Long uid, PrintWriter out) {
 		if (page == null || page < 1) {
 			out.print(JsonUtil.loadFalseResult("椤电爜涓嶆纭�"));
@@ -391,7 +391,7 @@
 	 * @param acceptData
 	 * @param out
 	 */
-//	@RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
+	@RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
 	public void getShopInfoV2(AcceptData acceptData, Integer page, Long id, Long uid, PrintWriter out) {
 		
 		if (id == null) {
@@ -510,7 +510,7 @@
 
 			BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
 			BigDecimal shareRate = hongBaoManageService.getShareRate();
-
+			ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
 			// 鍟嗗搧淇℃伅杩囨护
 			listGoodsBrief = taoBaoGoodsUpdateService.filterImportantTaoBaoGoods(listGoodsBrief);
 
@@ -529,8 +529,7 @@
 						continue;
 					}
 				}
-				GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, fanLiRate,
-						shareRate);
+				GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO);
 				array.add(gson.toJson(goodsDetailVO));
 			}
 		}
@@ -551,7 +550,7 @@
 	 *            绮鹃��1锛� 瓒宠抗鍒楄〃2
 	 * @param out
 	 */
-//	@RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
+	@RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
 	public void getHistoryV2(AcceptData acceptData, Integer page, Long uid, Integer type, PrintWriter out) {
 		if (type == null) {
 			out.print(JsonUtil.loadFalseResult("绫诲瀷涓嶆纭�"));
@@ -623,7 +622,7 @@
 	 * @param acceptData
 	 * @param out
 	 */
-	@RequestMapping(value = "getList", method = RequestMethod.POST)
+//	@RequestMapping(value = "getList", method = RequestMethod.POST)
 	public void getListV3(AcceptData acceptData, Integer page, Long cid, Long uid, PrintWriter out) {
 		if (page == null || page < 1) {
 			out.print(JsonUtil.loadFalseResult("椤电爜涓嶆纭�"));
@@ -666,7 +665,7 @@
 	 * @param acceptData
 	 * @param out
 	 */
-	@RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
+//	@RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
 	public void getShopInfoV3(AcceptData acceptData, Integer page, Long id, Long uid, PrintWriter out) {
 		if (id == null) {
 			out.print(JsonUtil.loadFalseResult("缂哄け搴楅摵id"));
@@ -682,25 +681,25 @@
 		BigDecimal shareRate = hongBaoManageService.getShareRate();
 		Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
 				.excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
-		
+		ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
 		JSONArray array = new JSONArray();
 		List<BrandGoodsCahe> listGoods = brandGoodsCaheService.getByBrandId((page - 1) * 50, 50,id);
 		for (BrandGoodsCahe brandGoods: listGoods) {
 			JDGoods goodsJD = brandGoods.getGoodsJD();
 			if (goodsJD != null) {
-				array.add(gson.toJson(GoodsDetailVOFactory.convertJDGoods(goodsJD, fanLiRate, shareRate)));
+				array.add(gson.toJson(GoodsDetailVOFactory.convertJDGoods(goodsJD, paramsDTO)));
 				continue;
 			}
 			
 			TaoBaoGoodsBrief goodsTB = brandGoods.getGoodsTB();
 			if (goodsTB != null) {
-				array.add(gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsTB, null, fanLiRate, shareRate)));
+				array.add(gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsTB, paramsDTO)));
 				continue;
 			}
 			
 			PDDGoodsDetail goodsPDD = brandGoods.getGoodsPDD();
 			if (goodsPDD != null) {
-				array.add(gson.toJson(GoodsDetailVOFactory.convertPDDGoods(goodsPDD, fanLiRate, shareRate)));
+				array.add(gson.toJson(GoodsDetailVOFactory.convertPDDGoods(goodsPDD, paramsDTO)));
 				continue;
 			}
 		}
@@ -739,7 +738,7 @@
 	 *            绮鹃��1锛� 瓒宠抗鍒楄〃2
 	 * @param out
 	 */
-	@RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
+//	@RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
 	public void getHistoryV3(AcceptData acceptData, Integer page, Long uid, Integer type, PrintWriter out) {
 		if (type == null) {
 			out.print(JsonUtil.loadFalseResult("绫诲瀷涓嶆纭�"));

--
Gitblit v1.8.0