From 9b55262bb45c81c997ab04e55e8de13e14b8ca7d Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期二, 29 十月 2019 15:11:37 +0800
Subject: [PATCH] 商品最高返

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/BrandControllerV2.java |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 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..6a4daba 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));
 			}
 		}
@@ -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));
 			}
 		}
@@ -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;
 			}
 		}

--
Gitblit v1.8.0