添加异常打印日志

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