Explorar el Código

fixbug :全局搜索参数新增storeType,type

wangdy hace 7 años
padre
commit
d92608440c

+ 6 - 6
src/main/java/com/uas/platform/b2c/common/search/controller/SearcherController.java

@@ -330,12 +330,12 @@ public class SearcherController {
 	 */
 	@RequestMapping(value = "/201819", method = RequestMethod.GET, params = "type=component")
 	@ResponseBody
-	public ModelMap getCompGoodsBySearch(PageParams params, String keyword, String storeType, HttpServletRequest request) {
+	public ModelMap getCompGoodsBySearch(PageParams params, String keyword, String type, HttpServletRequest request) {
 		if (StringUtils.isEmpty(keyword) || "*".equals(keyword)) {
 			return new ModelMap("total",0);
 		}
 		keyword = keyword.trim();
-		return searcherService.searchComponentGoods(keyword, params, storeType.replace("-",","), request);
+		return searcherService.searchComponentGoods(keyword, params, type.replace("-",","), request);
 	}
 
 	/**
@@ -346,12 +346,12 @@ public class SearcherController {
 	 */
 	@RequestMapping(value = "/201819", method = RequestMethod.GET, params = "type=kind")
 	@ResponseBody
-	public ModelMap getEnterpriseBySearchProduct(PageParams params, String keyword, String storeType, HttpServletRequest request) {
+	public ModelMap getEnterpriseBySearchProduct(PageParams params, String keyword, String type, HttpServletRequest request) {
 		if (StringUtils.isEmpty(keyword) || "*".equals(keyword)) {
 			return new ModelMap("total",0);
 		}
 		keyword = keyword.trim();
-		return searcherService.getEnterpriseBySearchKind(keyword, params, storeType.replace("-",","));
+		return searcherService.getEnterpriseBySearchKind(keyword, params, type.replace("-",","));
 	}
 	/**
 	 * 2018.19期搜索接口
@@ -376,12 +376,12 @@ public class SearcherController {
 	 */
 	@RequestMapping(value = "/201819", method = RequestMethod.GET, params = "type=brand")
 	@ResponseBody
-	public ModelMap getEnterpriseBySearchBrand(PageParams params, String keyword, String storeType, HttpServletRequest request) {
+	public ModelMap getEnterpriseBySearchBrand(PageParams params, String keyword, String type, HttpServletRequest request) {
 		if (StringUtils.isEmpty(keyword) || "*".equals(keyword)) {
 			return new ModelMap("total",0);
 		}
 		keyword = keyword.trim();
-		return searcherService.getEnterpriseBySearchBrand(keyword, params, storeType.replace("-",","));
+		return searcherService.getEnterpriseBySearchBrand(keyword, params, type.replace("-",","));
 	}
 
 	/**

+ 3 - 3
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java

@@ -761,7 +761,7 @@ public class StoreInServiceImpl implements StoreInService {
             switch (field) {
                 // 搜索型号
                 case CODE_FIELD :
-                    map = searcherService.searchComponentGoods(keyword, pageParams, request);
+                    map = searcherService.searchComponentGoods(keyword, pageParams, "",request);
                     List<Goods> goodsList = (List<Goods>) ((Map) map.get("stock")).get("content");
                     if (CollectionUtils.isNotEmpty(goodsList)) {
                         for (Goods goods : goodsList) {
@@ -772,7 +772,7 @@ public class StoreInServiceImpl implements StoreInService {
                     }
                     break;
                 case KIND_FIELD :
-                    map = searcherService.getEnterpriseBySearchKind(keyword, pageParams);
+                    map = searcherService.getEnterpriseBySearchKind(keyword, pageParams, "");
                     List<VendorIntroduction> vendorIntroductions = (List<VendorIntroduction>) ((HashMap) map.get("stock")).get("content");
                     if (CollectionUtils.isNotEmpty(vendorIntroductions)) {
                         for (VendorIntroduction vendorIntroduction : vendorIntroductions) {
@@ -783,7 +783,7 @@ public class StoreInServiceImpl implements StoreInService {
                     }
                     break;
                 case BRAND_FIELD :
-                    map = searcherService.getEnterpriseBySearchBrand(keyword, pageParams);
+                    map = searcherService.getEnterpriseBySearchBrand(keyword, pageParams, "");
                     List<VendorIntroduction> vendorIntroductionsByBrand = (List<VendorIntroduction>) ((HashMap) map.get("stock")).get("content");
                     if (CollectionUtils.isNotEmpty(vendorIntroductionsByBrand)) {
                         for (VendorIntroduction vendorIntroduction : vendorIntroductionsByBrand) {