From cdcbed9af813b2a02cdc01eefa24db8bec6b51a9 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期三, 27 三月 2019 12:17:33 +0800 Subject: [PATCH] 主分类 + 子分类 DAO改造 --- fanli/src/main/java/com/yeshi/fanli/controller/xcx/XcxSearchController.java | 50 ++------------------------------------------------ 1 files changed, 2 insertions(+), 48 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/xcx/XcxSearchController.java b/fanli/src/main/java/com/yeshi/fanli/controller/xcx/XcxSearchController.java index 428b675..767ac50 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/xcx/XcxSearchController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/xcx/XcxSearchController.java @@ -14,6 +14,7 @@ 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; @@ -29,13 +30,11 @@ import com.yeshi.fanli.service.inter.config.ConfigService; import com.yeshi.fanli.service.inter.config.SuperHotSearchService; import com.yeshi.fanli.service.inter.goods.GoodsClassService; -import com.yeshi.fanli.service.inter.goods.HonestService; import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService; import com.yeshi.fanli.service.inter.user.HistorySearchService; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.taobao.DaTaoKeUtil; import com.yeshi.fanli.util.taobao.TaoBaoUtil; -import org.yeshi.utils.JsonUtil; import net.sf.json.JSONArray; import net.sf.json.JSONObject; @@ -55,9 +54,6 @@ @Resource private HongBaoManageService manageService; - - @Resource - private HonestService honestService; @Resource private GoodsClassService goodsClassService; @@ -181,7 +177,7 @@ return; } - String kw = goodsClassService.getKwById(id); + String kw = goodsClassService.getKeysById(id); filter = "[{\"type\": \"quantype\"}]"; JSONObject data = search(kw, pagesize, filter, order, startprice, endprice); // if (StringUtil.isNullOrEmpty(kw)) { @@ -408,48 +404,6 @@ data.put("result", gson2.toJson(re)); data.put("count", result.getTaoBaoHead().getDocsfound()); return data; - } - - /** - * - * 鏂规硶璇存槑: 鍘嗗彶鎼滅储 - * - * @author mawurui createTime 2018骞�4鏈�25鏃� 涓嬪崍3:04:06 - * @param acceptData - * @param out - */ - @RequestMapping(value = "gethistorysearch", method = RequestMethod.POST) - public void getHistorySearch(AcceptData acceptData, PrintWriter out) { - String bid = getHistorySearchBid(acceptData); - List<HistorySearch> historySearchList = historySearchService.getHistorySearch(bid); - if (historySearchList == null || historySearchList.size() == 0) { - out.print(JsonUtil.loadFalseResult(XcxMiniControllerUtil.NODATA)); - return; - } - JSONObject data = new JSONObject(); - data.put("count", historySearchList.size()); - Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create(); - data.put("historySearchList", gson.toJson(historySearchList)); - out.print(JsonUtil.loadTrueResult(data)); - return; - } - - /** - * - * 鏂规硶璇存槑: 娓呯┖鍘嗗彶鎼滅储 - * - * @author mawurui createTime 2018骞�4鏈�25鏃� 涓嬪崍3:04:23 - * @param acceptData - * @param out - */ - @RequestMapping(value = "clearhistorysearch", method = RequestMethod.POST) - public void clearHistorySearch(AcceptData acceptData, PrintWriter out) { - String bid = getHistorySearchBid(acceptData); - long count = historySearchService.clearHistorySearch(bid); - JSONObject data = new JSONObject(); - data.put("count", count); - out.print(JsonUtil.loadTrueResult(data)); - return; } /** -- Gitblit v1.8.0