From 8dc8133fb93405c6fc34c9c3c6c6bbce09ebe7f0 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 24 十二月 2019 10:52:52 +0800
Subject: [PATCH] 品牌商品更新调整 订单维权修改

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
index bbdd211..26bd11e 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -54,6 +54,7 @@
 import com.yeshi.fanli.service.inter.user.HistorySearchService;
 import com.yeshi.fanli.service.inter.user.TokenRecordService;
 import com.yeshi.fanli.service.inter.user.integral.IntegralGetService;
+import com.yeshi.fanli.service.manger.goods.jd.JDGoodsLinkParseManager;
 import com.yeshi.fanli.tag.PageEntity;
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.DouYinUtil;
@@ -132,6 +133,9 @@
 
 	@Resource
 	private BrandInfoService brandInfoService;
+
+	@Resource
+	private JDGoodsLinkParseManager jdGoodsLinkParseManager;
 
 	/**
 	 * 绮樿创鏉夸俊鎭帹鑽�
@@ -267,7 +271,7 @@
 
 				// 棰嗗埜鐭繛鎺�
 				if (StringUtil.isNullOrEmpty(jdId) && text.contains("u.jd.com")) {
-					jdId = JDUtil.getJDGoodsIdByUJD(text);
+					jdId = jdGoodsLinkParseManager.parseGoodsIdByJDShortUrl(text);
 				}
 
 				if (!StringUtil.isNullOrEmpty(jdId)) {
@@ -363,9 +367,8 @@
 			Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
 					.excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 			data.put("type", type);
-			data.put("goods",
-					gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods,hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
-							acceptData.getVersion()))));
+			data.put("goods", gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods,
+					hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion()))));
 			out.print(JsonUtil.loadTrueResult(data));
 			return;
 		}
@@ -487,9 +490,8 @@
 						JSONObject data = new JSONObject();
 						data.put("type", 3);
 						data.put("goods",
-								gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsBrief,
-										hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
-												acceptData.getVersion()))));
+								gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsBrief, hongBaoManageService
+										.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion()))));
 						out.print(JsonUtil.loadTrueResult(data));
 						return true;
 					}
@@ -759,7 +761,7 @@
 		}
 
 		List<GoodsDetailVO> list = new ArrayList<GoodsDetailVO>();
-		ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+		ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
 				acceptData.getVersion());
 
 		for (TaoBaoGoodsBrief goods : taoBaoGoodsBriefs) {
@@ -780,13 +782,15 @@
 					|| ("android".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_0_2(platform, version))) {
 				BrandInfoVO brandInfoVO = null;
 				try {
-					brandInfoVO = brandInfoService.listByAlikeName(key,acceptData.getPlatform(),acceptData.getVersion());
+					brandInfoVO = brandInfoService.listByAlikeName(key, acceptData.getPlatform(),
+							acceptData.getVersion());
 				} catch (Exception e) {
 				}
 				if (brandInfoVO != null)
 					data.put("shop", JsonUtil.getApiCommonGson().toJson(brandInfoVO));
 			} else {
-				List<TaoBaoShopVO> listShop = taoBaoShopService.getShopByKeyV2(key,acceptData.getPlatform(),acceptData.getVersion());
+				List<TaoBaoShopVO> listShop = taoBaoShopService.getShopByKeyV2(key, acceptData.getPlatform(),
+						acceptData.getVersion());
 				if (listShop != null && listShop.size() > 0 && listShop.get(0).getListGoodsVO() != null
 						&& listShop.get(0).getListGoodsVO().size() > 2) {
 					TaoBaoShopVO taoBaoShop = listShop.get(0);
@@ -1047,7 +1051,7 @@
 			Gson gson = JsonUtil.getApiCommonGson();
 			List<PDDGoodsDetail> goodsList = result.getGoodsList();
 			if (goodsList != null && goodsList.size() > 0) {
-				ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+				ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
 						acceptData.getVersion());
 
 				for (PDDGoodsDetail goods : goodsList) {

--
Gitblit v1.8.0