|
|
@@ -1,13 +1,18 @@
|
|
|
package com.uas.platform.b2c.common.search.controller;
|
|
|
|
|
|
import com.uas.platform.b2c.common.search.service.SearcherService;
|
|
|
+import com.uas.platform.b2c.prod.store.model.StoreIn;
|
|
|
+import com.uas.platform.b2c.prod.store.service.StoreInService;
|
|
|
+import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.model.PageParams;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
@@ -36,6 +41,9 @@ public class SearcherController {
|
|
|
@Autowired
|
|
|
private SearcherService searcherService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private StoreInService storeService;
|
|
|
+
|
|
|
/**
|
|
|
* 作搜索展示跳转
|
|
|
*
|
|
|
@@ -278,4 +286,17 @@ public class SearcherController {
|
|
|
return searcherService.getSimilarBrands(keyword);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据店铺类型和关键字信息分页获取店铺信息
|
|
|
+ *
|
|
|
+ * @param params 分页参数信息
|
|
|
+ * @param types 店铺类型
|
|
|
+ * @param keyword 查询关键字
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/stores", method = RequestMethod.GET, params = "op=pageByType")
|
|
|
+ public Page<StoreIn> pageStoresByTypesAndKeyword(PageParams params, String types, @RequestParam(required = false) String keyword) {
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
+ return storeService.pageStoresByTypesAndKeyword(pageInfo, types, keyword);
|
|
|
+ }
|
|
|
+
|
|
|
}
|