|
@ -86,31 +86,23 @@ public class PostFilter extends ZuulFilter {
|
|
|
jsonObject.put("status",serviceId+status);
|
|
|
BaseExceptionLogDO baseExceptionLogDO = new BaseExceptionLogDO();
|
|
|
baseExceptionLogDO.setCreateTime(new Date());
|
|
|
List<Map<String,Object>> list = baseExceptionService.findExceptionDict("","110001","","1");
|
|
|
List<Map<String,Object>> serviceList=baseExceptionService.findExceptionService("","","1","");
|
|
|
for (Map<String,Object> map:serviceList){
|
|
|
if (ctx.getRequest().getServletPath().contains(map.get("pathUrl").toString())){
|
|
|
serviceId=map.get("id").toString();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
List<Map<String,Object>> list = baseExceptionService.findExceptionDict("",status,"","1");
|
|
|
if (list!=null&&list.size()>0){
|
|
|
responseCode=serviceId+list.get(0).get("code").toString();
|
|
|
exceptionType = list.get(0).get("exceptionType").toString();
|
|
|
baseExceptionLogDO.setExceptionType(exceptionType);
|
|
|
baseExceptionLogDO.setServiceCode(serviceId);
|
|
|
baseExceptionLogDO.setExceptionCode(responseCode);
|
|
|
try {
|
|
|
String in = ctx.getRequest().getParameter("object");
|
|
|
String jsonobject = AesEncryptUtils.decrypt(in);
|
|
|
baseExceptionLogDO.setRequest(jsonobject);
|
|
|
baseExceptionLogDO.setResponse(jsonObject.toString());
|
|
|
baseExceptionLogDao.save(baseExceptionLogDO);
|
|
|
}catch (Exception s){
|
|
|
s.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
baseExceptionLogDO.setExceptionType(exceptionType);
|
|
|
baseExceptionLogDO.setServiceCode(serviceId);
|
|
|
baseExceptionLogDO.setExceptionCode(responseCode);
|
|
|
try {
|
|
|
String in = ctx.getRequest().getParameter("object");
|
|
|
String jsonobject = AesEncryptUtils.decrypt(in);
|
|
|
baseExceptionLogDO.setRequest(jsonobject);
|
|
|
baseExceptionLogDO.setResponse(jsonObject.toString());
|
|
|
baseExceptionLogDao.save(baseExceptionLogDO);
|
|
|
}catch (Exception s){
|
|
|
s.printStackTrace();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
JSONObject object = new JSONObject();
|
|
|
object.put("status","200");
|