|
|
@ -55,4 +55,31 @@ public class CaseCategoryController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ajaxResult;
|
|
|
|
return ajaxResult;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/search")
|
|
|
|
|
|
|
|
public AjaxResult search(@RequestBody AjaxRequest ajaxRequest,HttpServletRequest request) {
|
|
|
|
|
|
|
|
AjaxResult ajaxResult = new AjaxResult();
|
|
|
|
|
|
|
|
JSONObject data = ajaxRequest.getData();
|
|
|
|
|
|
|
|
if (null == data){
|
|
|
|
|
|
|
|
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
|
|
|
|
|
|
ajaxResult.setRetmsg("data missing");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
Integer pageNum = data.getInteger("pageNum");
|
|
|
|
|
|
|
|
Integer pageSize = data.getInteger("pageSize");
|
|
|
|
|
|
|
|
if (null==pageNum|| null == pageSize){
|
|
|
|
|
|
|
|
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
|
|
|
|
|
|
ajaxResult.setRetmsg("分页参数不可为空");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
String name = data.getString("name");
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(name)){
|
|
|
|
|
|
|
|
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
|
|
|
|
|
|
ajaxResult.setRetmsg("搜索参数不可为空");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
ajaxResult.setRetcode(AjaxResult.SUCCESS);
|
|
|
|
|
|
|
|
ajaxResult.setData(caseCategoryService.search(name,pageNum,pageSize));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ajaxResult;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|