From c9cbad5f5d18c6b2ac5a063e41007933d7028329 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 07 七月 2020 15:24:17 +0800 Subject: [PATCH] 返利配置文件加入系统区分 --- fanli/src/main/java/com/yeshi/fanli/controller/h5/H5SearchController.java | 67 +++------------------------------ 1 files changed, 6 insertions(+), 61 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5SearchController.java b/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5SearchController.java index c2fb565..aec09a0 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5SearchController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5SearchController.java @@ -28,7 +28,7 @@ import com.yeshi.fanli.service.inter.config.CustomerContentService; import com.yeshi.fanli.service.inter.config.SuperHotSearchService; import com.yeshi.fanli.service.inter.config.SystemClientParamsService; -import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService; +import com.yeshi.fanli.service.inter.order.config.HongBaoManageService; import com.yeshi.fanli.service.inter.user.HistorySearchService; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.taobao.TaoBaoUtil; @@ -58,43 +58,7 @@ @Resource private CustomerContentService customerContentService; - // 浼樻儬鍒� - /* - * public final static int quanType = 1; - * - * public final static int baoyou = 2; - * - * public final static int TMALL = 3; - */ - /** - * - * 鏂规硶璇存槑: 鍏抽敭瀛楁彁绀哄缓璁悳绱� - * - * @author mawurui createTime 2018骞�4鏈�25鏃� 涓嬪崍3:04:52 - * @param acceptData - * @param kw - * @param out - */ - @RequestMapping(value = "suggestsearch", method = RequestMethod.GET) - public void getSugguestSearch(String callback, AcceptData acceptData, String kw, PrintWriter out) { - List<String> list = TaoBaoUtil.getSuguestSearch(kw); - if (list != null && list.size() > 0) { - JSONArray array = new JSONArray(); - int num = 0; - for (String st : list) { - array.add(st); - num = num + 1; - if (num >= 5) { - break; - } - } - out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(array))); - } else { - out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(""))); - } - return; - } /** * @@ -114,12 +78,7 @@ @RequestMapping(value = "search", method = RequestMethod.GET) public void search(String callback, AcceptData acceptData, String kw, int page, String filter, String order, String startprice, String endprice, String fastFilter, PrintWriter out) { - /* - * System system = webControllerUtil.getSystem(acceptData); if(system == - * null){ - * out.print(JsonUtil.loadFalseResult(WebControllerUtil.NOSYSTEM)); - * return; } - */ + if (!StringUtil.isNullOrEmpty(fastFilter)) { if (!StringUtil.isNullOrEmpty(filter)) { JSONArray filterArray = JSONArray.fromObject(filter); @@ -130,11 +89,11 @@ filter = fastFilter; } } - JSONObject data = search(kw, page, filter, order, startprice, endprice); + JSONObject data = search(acceptData, kw, page, filter, order, startprice, endprice); out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data))); } - private JSONObject search(String kw, int page, String filter, String order, String startprice, String endprice) { + private JSONObject search(AcceptData acceptData, String kw, int page, String filter, String order, String startprice, String endprice) { SearchFilter sf = new SearchFilter(); sf.setKey(kw); @@ -250,7 +209,7 @@ int fq = sf.getQuan(); int fh = sf.getHongbao(); boolean ft = sf.isTmall(); - BigDecimal proportion = manageService.getFanLiRate(); + BigDecimal proportion = manageService.getFanLiRate(acceptData.getSystem()); if (fq == 0 && fh == 0 && !ft) { for (TaoBaoGoodsBrief bf : result.getTaoBaoGoodsBriefs()) { re.add(TaoBaoUtil.getTaoBaoGoodsBriefExtra(bf, proportion.toString(), "")); @@ -270,20 +229,6 @@ return data; } - /** - * - * 鏂规硶璇存槑: 鑱旂郴瀹㈡湇鎺ュ彛 - * - * @author mawurui createTime 2018骞�4鏈�10鏃� 涓婂崍9:02:41 - */ - @RequestMapping(value = "contactCustomer", method = RequestMethod.GET) - public void contactCustomerService(PrintWriter out) { - String title = "鑱旂郴瀹㈡湇"; - List<CustomerContent> contentList = customerContentService.contactCustomerService(title); - JSONObject data = new JSONObject(); - data.put("contentList", JsonUtil.getSimpleGsonWithDate().toJson(contentList)); - out.print(JsonUtil.loadTrueResult(data)); - } /** * @@ -301,7 +246,7 @@ * out.print(JsonUtil.loadFalseResult(XcxMiniControllerUtil.NOSYSTEM)); * return; } */ - List<SuperHotSearch> superHotSearchList = superHotSearchSerivce.getSuperHotSearchBySystemId(4); // 杩斿埄鍒竌pp + List<SuperHotSearch> superHotSearchList = superHotSearchSerivce.getSuperHotSearchBySystemId(4, null); // 鏉挎牀蹇渷app if (superHotSearchList == null || superHotSearchList.size() == 0) { out.print(JsonUtil.loadFalseResult(H5ControllerUtil.NODATA)); return; -- Gitblit v1.8.0