Authored by hugufei

no message

... ... @@ -83,7 +83,7 @@ public class SearchController {
long count = searchService.searchCount(transParamType(paramMap));
return count;
} catch (Exception e) {
logger.error("[※查询]失败:"+ e.getMessage());
logger.error("[※查询]失败:" + e.getMessage());
Map<String, Object> rtnMap = new HashMap<String, Object>();
rtnMap.put("code", 400);
rtnMap.put("status", "error");
... ... @@ -144,7 +144,6 @@ public class SearchController {
}
}
@SuppressWarnings("unchecked")
@RequestMapping(method = RequestMethod.GET, value = "/new-shelve")
@ResponseBody
... ... @@ -190,18 +189,19 @@ public class SearchController {
rtnMap.put("code", 400);
rtnMap.put("status", "error");
rtnMap.put("errmsg", errorMessage);
return rtnMap; //new ModelAndView(ISearchConstans.JSON_VIEW_NAME, rtnMap);
return rtnMap; // new ModelAndView(ISearchConstans.JSON_VIEW_NAME,
// rtnMap);
}
/**
* 将HttpServletRequest中被锁定的ParameterMap转化为普通的HashMap
* */
public static Map<String, String> transParamType(Map<String, Object> paramMap){
public static Map<String, String> transParamType(Map<String, Object> paramMap) {
Map<String, String> rtnMap = new HashMap<String, String>();
Iterator<String> itKeys = paramMap.keySet().iterator();
while(itKeys.hasNext()){
while (itKeys.hasNext()) {
String key = itKeys.next();
String val = ((String[])paramMap.get(key))[0];
String val = ((String[]) paramMap.get(key))[0];
rtnMap.put(key, val);
}
return rtnMap;
... ... @@ -221,7 +221,7 @@ public class SearchController {
@SuppressWarnings("unchecked")
@RequestMapping(method = RequestMethod.GET, value = "/sort_size_products")
public Map<String,Object> sort_size_products(HttpServletRequest request) {
public Map<String, Object> sort_size_products(HttpServletRequest request) {
Map<String, Object> paramMap = request.getParameterMap();
try {
Map<String, Object> jsonMap = searchSortSizeService.sortSizeProducts(transParamType(paramMap));
... ...