添加异常打印日志

parent a90969ed
......@@ -77,10 +77,12 @@ public class UserQueryLogController {
LOGGER.info("查询日期:beginDate{},endDate{}",beginDate,endDate);
String token=request.getHeader("x-auth-token");
if(token==null||token.equals("")){
LOGGER.info("token为空,非法查询");
return JsonResult.buildErrorStateResult("缺少授权信息",null);
}
if(checkUserToken(token).equals("")){
LOGGER.info("token授权异常");
return JsonResult.buildErrorStateResult("未授权查询",null);
}
try{
......@@ -131,6 +133,7 @@ public class UserQueryLogController {
LOGGER.info("查询条件:key{},columns{}",key,columns);
String token=request.getHeader("x-auth-token");
if(token==null||token.equals("")){
LOGGER.info("token为空,非法查询");
return JsonResult.buildErrorStateResult("缺少授权信息",null);
}
//columns=> userId,phoneNo,idNo,bankCard,address
......@@ -140,6 +143,7 @@ public class UserQueryLogController {
//校验用户权限
String userName=checkUserToken(token);
if(userName.equals("")){
LOGGER.info("token授权异常");
return JsonResult.buildErrorStateResult("未授权查询",null);
}
String[] values=keyValues.split(";");
......@@ -277,6 +281,7 @@ public class UserQueryLogController {
data=RSA.encrypt(phoneNoStr,publicKey);
sign= MD5Util.build(data);
}catch(Exception e){
LOGGER.info("参数加密异常");
return null;
}
HashMap<String,String> phonesMap=new HashMap<String,String>();
......@@ -307,9 +312,14 @@ public class UserQueryLogController {
}
phonesMap.put(phone,cards);
}
}else{
LOGGER.info("签名校验失败!");
}
}else{
LOGGER.info("从支付中心接口返回data为null");
}
}catch(Exception e){
LOGGER.info("查询银行卡信息接口返回解析异常");
}
return phonesMap;
}
......@@ -526,7 +536,7 @@ public class UserQueryLogController {
return userName;
}
}catch(Exception e){
LOGGER.info("解析支付中心返回结果resultStr异常");
}
return "";
}
......
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