返回0001处理

parent a6a11158
...@@ -158,13 +158,13 @@ public class UserQueryLogController { ...@@ -158,13 +158,13 @@ public class UserQueryLogController {
} }
//输入enter换行\n //输入enter换行\n
if(org.apache.commons.lang3.StringUtils.isEmpty(keyValues)){ if(org.apache.commons.lang3.StringUtils.isEmpty(keyValues)){
return JsonResult.buildSuccessResult("请输入查询条件",null); return JsonResult.buildErrorStateResult("请输入查询条件",null);
} }
String[] values=keyValues.split("\\n"); String[] values=keyValues.split("\\n");
List<String> queryV= Arrays.asList(values); List<String> queryV= Arrays.asList(values);
if(queryV!=null&&queryV.size()>1000){ if(queryV!=null&&queryV.size()>1000){
return JsonResult.buildSuccessResult("查询记录数是"+queryV.size()+",超过1000条限制",null); return JsonResult.buildErrorStateResult("查询记录数是"+queryV.size()+",超过1000条限制",null);
} }
List<UserQueryInfo> userQueryInfos=new ArrayList<UserQueryInfo>(); List<UserQueryInfo> userQueryInfos=new ArrayList<UserQueryInfo>();
...@@ -191,21 +191,21 @@ public class UserQueryLogController { ...@@ -191,21 +191,21 @@ public class UserQueryLogController {
for(String s:queryV){ for(String s:queryV){
if(s.length()>8){ if(s.length()>8){
return JsonResult.buildSuccessResult("查询的userId"+s+"长度超过8位",null); return JsonResult.buildErrorStateResult("查询的userId"+s+"长度超过8位",null);
} }
long uid=Long.valueOf(s); long uid=Long.valueOf(s);
userIds.add(uid); userIds.add(uid);
} }
}catch(Exception e){ }catch(Exception e){
return JsonResult.buildSuccessResult("查询的userId有误",null); return JsonResult.buildErrorStateResult("查询的userId有误",null);
} }
userDetailPage=userDetailService.getUserDetailsPage(userIds,null,null,pageId,pageSize,"auto"); userDetailPage=userDetailService.getUserDetailsPage(userIds,null,null,pageId,pageSize,"auto");
}else if(key.equals("phoneNo")){ }else if(key.equals("phoneNo")){
for(String pn:queryV){ for(String pn:queryV){
if(!ValidationUtil.validatePhoneNo(pn)){ if(!ValidationUtil.validatePhoneNo(pn)){
return JsonResult.buildSuccessResult("查询的手机号码"+pn+"格式有误",null); return JsonResult.buildErrorStateResult("查询的手机号码"+pn+"格式有误",null);
} }
} }
...@@ -214,7 +214,7 @@ public class UserQueryLogController { ...@@ -214,7 +214,7 @@ public class UserQueryLogController {
IdcardValidator iv = new IdcardValidator(); IdcardValidator iv = new IdcardValidator();
for(String idno:queryV){ for(String idno:queryV){
if(!iv.is18Idcard(idno)&&!iv.is15Idcard(idno)){ if(!iv.is18Idcard(idno)&&!iv.is15Idcard(idno)){
return JsonResult.buildSuccessResult("查询的身份证号"+idno+"格式有误",null); return JsonResult.buildErrorStateResult("查询的身份证号"+idno+"格式有误",null);
} }
} }
userDetailPage=userDetailService.getUserDetailsPage(null,null,queryV,pageId,pageSize,"auto"); userDetailPage=userDetailService.getUserDetailsPage(null,null,queryV,pageId,pageSize,"auto");
...@@ -363,7 +363,7 @@ public class UserQueryLogController { ...@@ -363,7 +363,7 @@ public class UserQueryLogController {
//输入enter换行\n //输入enter换行\n
if(org.apache.commons.lang3.StringUtils.isEmpty(keyValues)){ if(org.apache.commons.lang3.StringUtils.isEmpty(keyValues)){
return JsonResult.buildSuccessResult("请输入查询条件",null); return JsonResult.buildErrorStateResult("请输入查询条件",null);
} }
List<UserQueryInfo> uqls=new ArrayList<UserQueryInfo>(); List<UserQueryInfo> uqls=new ArrayList<UserQueryInfo>();
...@@ -373,7 +373,7 @@ public class UserQueryLogController { ...@@ -373,7 +373,7 @@ public class UserQueryLogController {
List<String> queryV= Arrays.asList(values); List<String> queryV= Arrays.asList(values);
if(queryV!=null&&queryV.size()>1000){ if(queryV!=null&&queryV.size()>1000){
return JsonResult.buildSuccessResult("查询记录数是"+queryV.size()+",超过1000条限制",null); return JsonResult.buildErrorStateResult("查询记录数是"+queryV.size()+",超过1000条限制",null);
} }
...@@ -391,21 +391,21 @@ public class UserQueryLogController { ...@@ -391,21 +391,21 @@ public class UserQueryLogController {
try{ try{
for(String s:queryV){ for(String s:queryV){
if(s.length()>8){ if(s.length()>8){
return JsonResult.buildSuccessResult("查询的userId"+s+"长度超过8位",s); return JsonResult.buildErrorStateResult("查询的userId"+s+"长度超过8位",s);
} }
long uid=Long.valueOf(s); long uid=Long.valueOf(s);
userIds.add(uid); userIds.add(uid);
} }
}catch(Exception e){ }catch(Exception e){
return JsonResult.buildSuccessResult("查询的userId有误",null); return JsonResult.buildErrorStateResult("查询的userId有误",null);
} }
userDetails=userDetailService.findByUserIdIn(userIds); userDetails=userDetailService.findByUserIdIn(userIds);
}else if(key.equals("phoneNo")){ }else if(key.equals("phoneNo")){
for(String pn:queryV){ for(String pn:queryV){
if(!ValidationUtil.validatePhoneNo(pn)){ if(!ValidationUtil.validatePhoneNo(pn)){
return JsonResult.buildSuccessResult("查询的手机号码"+pn+"格式有误",pn); return JsonResult.buildErrorStateResult("查询的手机号码"+pn+"格式有误",pn);
} }
} }
...@@ -414,7 +414,7 @@ public class UserQueryLogController { ...@@ -414,7 +414,7 @@ public class UserQueryLogController {
IdcardValidator iv = new IdcardValidator(); IdcardValidator iv = new IdcardValidator();
for(String idno:queryV){ for(String idno:queryV){
if(!iv.is18Idcard(idno)&&!iv.is15Idcard(idno)){ if(!iv.is18Idcard(idno)&&!iv.is15Idcard(idno)){
return JsonResult.buildSuccessResult("查询的身份证号"+idno+"格式有误",idno); return JsonResult.buildErrorStateResult("查询的身份证号"+idno+"格式有误",idno);
} }
} }
userDetails=userDetailService.findByIdnos(queryV); userDetails=userDetailService.findByIdnos(queryV);
......
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