Authored by wangnan9279

fix

... ... @@ -27,15 +27,6 @@ public class UfoBrandIndexBaseService {
private static final String UFO_BRAND_INDEX_NAME = ISearchConstants.INDEX_NAME_UFO_BRAND;
public Map<String, Object> getBrandMap(Map<String, Object> esMap) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("id", MapUtils.getIntValue(esMap, "id", 0));
map.put("brand_name", MapUtils.getString(esMap, "brandName", ""));
map.put("brand_name_en", MapUtils.getString(esMap, "brandNameEn", ""));
map.put("brand_logo", MapUtils.getString(esMap, "brandLogo", ""));
return map;
}
public Map<String, Map<String, Object>> getUfoBrandMapByIds(Collection<?> brandIds, int status) {
List<Map<String, Object>> resultList = this.getUfoBrandListByIds(brandIds, status);
Map<String, Map<String, Object>> resultMap = new HashMap<String, Map<String, Object>>();
... ... @@ -65,11 +56,29 @@ public class UfoBrandIndexBaseService {
List<Map<String, Object>> esResults = searchResult.getResultList();
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
for (Map<String, Object> esResult : esResults) {
list.add(this.getBrandMap(esResult));
list.add(this.getBrandMapForYoho(esResult));
}
return list;
}
public Map<String, Object> getBrandMapForYoho(Map<String, Object> esMap) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("id", MapUtils.getIntValue(esMap, "id", 0));
map.put("brand_name", MapUtils.getString(esMap, "brandName", ""));
map.put("brand_name_en", MapUtils.getString(esMap, "brandNameEn", ""));
map.put("brand_ico", MapUtils.getString(esMap, "brandLogo", ""));
return map;
}
public Map<String, Object> getBrandMap(Map<String, Object> esMap) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("id", MapUtils.getIntValue(esMap, "id", 0));
map.put("brand_name", MapUtils.getString(esMap, "brandName", ""));
map.put("brand_name_en", MapUtils.getString(esMap, "brandNameEn", ""));
map.put("brand_logo", MapUtils.getString(esMap, "brandLogo", ""));
return map;
}
public List<Map<String, Object>> getBrandListByIds(Collection<?> brandIds) {
List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
try {
... ...
... ... @@ -319,10 +319,6 @@ public class ShopListService {
if (results.isEmpty()) {
return results;
}
for (Map<String, Object> ufoBrand : results.values()) {
ufoBrand.put("search_show_image", "");
ufoBrand.put("shop_intro", "品牌官方授权");
}
return results;
}
... ...