|
|
@@ -1,7 +1,7 @@
|
|
|
package com.uas.platform.b2c.common.search.rpc.service.Impl;
|
|
|
|
|
|
|
|
|
-import com.uas.platform.b2c.common.search.constant.SearchParam;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.uas.platform.b2c.common.search.constant.SearchUrl;
|
|
|
import com.uas.platform.b2c.common.search.rpc.service.SearchService;
|
|
|
import com.uas.platform.b2c.core.config.SysConf;
|
|
|
@@ -92,14 +92,14 @@ public class SearchServiceImpl implements SearchService{
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public SPage<Map<String, Object>> getBrands(String keyword, Integer page, Integer size) throws SearchException {
|
|
|
+ public SPage<Map<String, List<Integer>>> getBrands(String keyword, Integer page, Integer size) throws SearchException {
|
|
|
Map<String, Object> map = initSearchMap(keyword, page, size);
|
|
|
String str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.BRAND_INFO_URL, String.class, map);
|
|
|
if(StringUtils.isEmpty(str)) {
|
|
|
return null;
|
|
|
}else {
|
|
|
try {
|
|
|
- SPage<Map<String, Object>> sPage = FastjsonUtils.fromJson(str, SPage.class);
|
|
|
+ SPage<Map<String, List<Integer>>> sPage = FastjsonUtils.fromJson(str, SPage.class);
|
|
|
return sPage;
|
|
|
}catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -109,7 +109,7 @@ public class SearchServiceImpl implements SearchService{
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> getComponentIds(String keyword, SearchParam var2) throws SearchException {
|
|
|
+ public Map<String, Object> getComponentIds(String keyword, PageParams var2) throws SearchException {
|
|
|
Map<String, Object> map = new HashedMap();
|
|
|
map.put("keyword", keyword);
|
|
|
map.put("params", FlexJsonUtils.toJsonDeep(var2));
|
|
|
@@ -216,9 +216,9 @@ public class SearchServiceImpl implements SearchService{
|
|
|
}else {
|
|
|
try {
|
|
|
List<String> reMapA = FastjsonUtils.fromJson(strA, List.class);
|
|
|
- List<String> reMapC = FastjsonUtils.fromJson(strC, List.class);
|
|
|
- List<String> reMapB = FastjsonUtils.fromJson(strB, List.class);
|
|
|
- List<String> reMapK = FastjsonUtils.fromJson(strK, List.class);
|
|
|
+ List<Object> reMapC = FastjsonUtils.fromJsonArray(strC);
|
|
|
+ List<Object> reMapB = FastjsonUtils.fromJsonArray(strB);
|
|
|
+ List<Object> reMapK = FastjsonUtils.fromJsonArray(strK);
|
|
|
map.clear();
|
|
|
map.put("all",reMapA);
|
|
|
map.put("kind",reMapK);
|
|
|
@@ -345,7 +345,7 @@ public class SearchServiceImpl implements SearchService{
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> getGoodsIds(String keyword, SearchParam var2) throws SearchException {
|
|
|
+ public Map<String, Object> getGoodsIds(String keyword, PageParams var2) throws SearchException {
|
|
|
Map<String, Object> map = new HashedMap();
|
|
|
map.put("keyword", keyword);
|
|
|
map.put("params", FlexJsonUtils.toJsonDeep(var2));
|