From 651a15c78f668bef3859d9ed1bb7ad0b669d3600 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 03 七月 2020 17:52:07 +0800 Subject: [PATCH] 多APP优化 --- fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/SearchController.java | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/SearchController.java b/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/SearchController.java index 9d98fc2..75f7de7 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/SearchController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/SearchController.java @@ -9,6 +9,8 @@ import javax.annotation.Resource; import javax.servlet.http.HttpSession; +import com.yeshi.fanli.entity.SystemEnum; +import com.yeshi.fanli.util.SystemInfoUtil; import org.springframework.core.task.TaskExecutor; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -34,6 +36,7 @@ import com.yeshi.fanli.service.inter.brand.BrandInfoService; import com.yeshi.fanli.service.inter.config.ConfigService; import com.yeshi.fanli.service.inter.config.HotSearchService; +import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService; import com.yeshi.fanli.service.inter.order.config.HongBaoManageService; import com.yeshi.fanli.service.manger.goods.jd.JDGoodsLinkParseManager; import com.yeshi.fanli.tag.PageEntity; @@ -61,6 +64,9 @@ @Resource private HongBaoManageService hongBaoManageService; + + @Resource + private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService; @Resource(name = "taskExecutor") private TaskExecutor executor; @@ -192,7 +198,7 @@ .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); data.put("type", type); data.put("goods", gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods, - hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion())))); + orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion())))); out.print(JsonUtil.loadTrueResult(data)); return; } @@ -224,7 +230,7 @@ JSONObject data = new JSONObject(); data.put("count", list.size()); data.put("hotSearchList", hotSearchList); - data.put("helpLink", configService.get(ConfigKeyEnum.newerGonglue.getKey())); + data.put("helpLink", configService.getValue(ConfigKeyEnum.newerGonglue.getKey(), SystemInfoUtil.getSystem(acceptData))); out.print(JsonUtil.loadTrueResult(data)); } @@ -330,10 +336,10 @@ */ private void searchJDGoods(WXMPAcceptData acceptData, String key, Integer page, String filter, Integer order, PrintWriter out) { - + SystemEnum system= SystemInfoUtil.getSystemByWXCXCAppId(acceptData.getAppId()); JDSearchResult result = null; boolean hasCoupon = false; - String way = configService.get(ConfigKeyEnum.jdApiSearchKey.getKey()); + String way = configService.getValue(ConfigKeyEnum.jdApiSearchKey.getKey(), system); if ("1".equals(way)) { JDFilter filterAPI = new JDFilter(); filterAPI.setKeyword(SearchFilterUtil.filterSearchContent(key)); @@ -473,7 +479,7 @@ if (goodsList != null && goodsList.size() > 0) { Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); - ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), + ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion()); for (JDGoods goods : goodsList) { GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, paramsDTO); @@ -555,7 +561,7 @@ Gson gson = JsonUtil.getApiCommonGson(); List<PDDGoodsDetail> goodsList = result.getGoodsList(); if (goodsList != null && goodsList.size() > 0) { - ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), + ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion()); for (PDDGoodsDetail goods : goodsList) { -- Gitblit v1.8.0