用post啊,不要用get啊
@RequestMapping(value = "coop/searchInventoryById", method = RequestMethod.POST)
@ResponseBody
public InventoryInfo searchInventoryById(
@RequestParam(required = true) final String searchId) {
String[] ids = searchId.split(",");
InventoryInfo inventoryInfo = null;
if (ids.length < 1) {
inventoryInfo = inventoryInfoService.getInventoryInfoByPK(searchId);
} else {
inventoryInfo = inventoryInfoService.getInventoryInfoByPK(ids[0]);
}
// TODO:测试用
System.out.println("search-----" + inventoryInfo.toString());
return inventoryInfo;
}