Commit fbd86118 by java-温文海

校验

parent bc1c7c8c
......@@ -103,7 +103,9 @@ public class StatisticalController{
public ResponseBean getList(RequestBean requestBean){
ResponseBean responseBean = new ResponseBean();
StatisticalListBean bean = requestBean.getObjectBean(StatisticalListBean.class);
String message = statisticalService.validate(bean);
if(message == null){
bean.setPageSize(1000);
// 参数校验为通过
PageEntity<StatisticalListEntity> list = statisticalService.getList(bean);
// 查询结果为空
......@@ -117,12 +119,18 @@ public class StatisticalController{
responseBean.setStatus(ErrorCode.STATUS_CODE_2000);
return responseBean;
}
responseBean.setMessage(message);
responseBean.setStatus(ErrorCode.STATUS_CODE_4001);
return responseBean;
}
@RequestMapping(value = "newExport")
public ResponseBean newExport(RequestBean requestBean,HttpServletResponse response){
ResponseBean responseBean = new ResponseBean();
StatisticalListBean bean = requestBean.getObjectBean(StatisticalListBean.class);
String message = statisticalService.validate(bean);
if(message == null){
bean.setPageSize(1000);
// 参数校验为通过
PageEntity<StatisticalListEntity> page = statisticalService.getList(bean);
List<StatisticalListEntity> list=new ArrayList<StatisticalListEntity>();
......@@ -142,4 +150,8 @@ public class StatisticalController{
responseBean.setStatus(ErrorCode.STATUS_CODE_4001);
return responseBean;
}
responseBean.setMessage(message);
responseBean.setStatus(ErrorCode.STATUS_CODE_4001);
return responseBean;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment