改查询条件的显示和 查询内容分隔符换成\n回车符

parent 54058481
......@@ -146,7 +146,8 @@ public class UserQueryLogController {
LOGGER.info("token授权异常");
return JsonResult.buildErrorStateResult("未授权查询",null);
}
String[] values=keyValues.split(";");
//输入enter换行\n
String[] values=keyValues.split("\\n");
List<String> queryV= Arrays.asList(values);
List<UserQueryInfo> userQueryInfos=new ArrayList<UserQueryInfo>();
List<UserDetail> userDetails=new ArrayList<UserDetail>();
......@@ -161,26 +162,32 @@ public class UserQueryLogController {
pageSize=200;
}
//如果维度里面没有保护查询条件则加入条件
if(!columns.contains(key)){
columns=columns+","+key;
}
if(key.equals("userId")){
List<Long> userIds=new ArrayList<Long>();
try{
for(String s:queryV){
if(s.length()>8){
return JsonResult.buildErrorStateResult("查询的userId长度超过8位",s);
return JsonResult.buildSuccessResult("查询的userId"+s+"长度超过8位",null);
}
long uid=Long.valueOf(s);
userIds.add(uid);
}
}catch(Exception e){
return JsonResult.buildErrorStateResult("查询的userId有误",null);
return JsonResult.buildSuccessResult("查询的userId有误",null);
}
userDetailPage=userDetailService.getUserDetailsPage(userIds,null,null,pageId,pageSize,"auto");
}else if(key.equals("phoneNo")){
for(String pn:queryV){
if(!ValidationUtil.validatePhoneNo(pn)){
return JsonResult.buildErrorStateResult("查询的手机号码格式有误",pn);
return JsonResult.buildSuccessResult("查询的手机号码"+pn+"格式有误",null);
}
}
......@@ -189,7 +196,7 @@ public class UserQueryLogController {
IdcardValidator iv = new IdcardValidator();
for(String idno:queryV){
if(!iv.is18Idcard(idno)&&!iv.is15Idcard(idno)){
return JsonResult.buildErrorStateResult("查询的身份证号格式有误",idno);
return JsonResult.buildSuccessResult("查询的身份证号"+idno+"格式有误",null);
}
}
userDetailPage=userDetailService.getUserDetailsPage(null,null,queryV,pageId,pageSize,"auto");
......@@ -349,21 +356,21 @@ public class UserQueryLogController {
try{
for(String s:queryV){
if(s.length()>8){
return JsonResult.buildErrorStateResult("查询的userId长度超过8位",s);
return JsonResult.buildSuccessResult("查询的userId"+s+"长度超过8位",s);
}
long uid=Long.valueOf(s);
userIds.add(uid);
}
}catch(Exception e){
return JsonResult.buildErrorStateResult("查询的userId有误",null);
return JsonResult.buildSuccessResult("查询的userId有误",null);
}
userDetails=userDetailService.findByUserIdIn(userIds);
}else if(key.equals("phoneNo")){
for(String pn:queryV){
if(!ValidationUtil.validatePhoneNo(pn)){
return JsonResult.buildErrorStateResult("查询的手机号码格式有误",pn);
return JsonResult.buildSuccessResult("查询的手机号码"+pn+"格式有误",pn);
}
}
......@@ -372,7 +379,7 @@ public class UserQueryLogController {
IdcardValidator iv = new IdcardValidator();
for(String idno:queryV){
if(!iv.is18Idcard(idno)&&!iv.is15Idcard(idno)){
return JsonResult.buildErrorStateResult("查询的身份证号格式有误",idno);
return JsonResult.buildSuccessResult("查询的身份证号"+idno+"格式有误",idno);
}
}
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