From 3164f689c2a1fe18e2ea7c5f512657305790a3d2 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期一, 29 六月 2020 16:20:15 +0800
Subject: [PATCH] 拉新券统计
---
fanli/src/main/java/com/yeshi/fanli/controller/h5/H5SearchController.java | 74 +++++-------------------------------
1 files changed, 11 insertions(+), 63 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 57915fb..24d9520 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
@@ -5,17 +5,14 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import javax.annotation.Resource;
-import net.sf.json.JSONArray;
-import net.sf.json.JSONObject;
-
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
+import org.yeshi.utils.JsonUtil;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -28,13 +25,16 @@
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
import com.yeshi.fanli.entity.taobao.TaoBaoSearchNav;
import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
+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;
-import org.yeshi.utils.JsonUtil;
+
+import net.sf.json.JSONArray;
+import net.sf.json.JSONObject;
@Controller
@RequestMapping("api/h5/v1/webSearch")
@@ -54,44 +54,11 @@
@Resource
private SuperHotSearchService superHotSearchSerivce;
+
+ @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;
- }
/**
*
@@ -111,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);
@@ -267,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 = systemClientParamsService.contactCustomerService(title);
- JSONObject data = new JSONObject();
- data.put("contentList", JsonUtil.getSimpleGsonWithDate().toJson(contentList));
- out.print(JsonUtil.loadTrueResult(data));
- }
/**
*
@@ -298,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