1:更新642的表达式结构,及添加opTime字段
2:为0x401 APP载荷特征表添加数值类表APP_TCP_SESSION_BYTE 3:更新urlreport接口 4:更新asnreport接口 5:添加iprange统计入库 6:修改配置入库时,先打印错误信息在回滚事务 7:修改配置入库打印的日志信息 8:更改通联关系app_label的数据类型为varchar 9:提交洪庆发来的trafficIpActiveStatisticDao.xml
This commit is contained in:
@@ -98,17 +98,19 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
thread.setExceptionInfo("Maat 规则存储异常:" + e.getMessage());
|
||||
logger.error("Maat 规则存储异常:" + e.getMessage());
|
||||
thread.setExceptionInfo("Maat 规则存储异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
logger.error("Maat 规则存储异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
if (e instanceof RestServiceException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"Maat 规则存储异常:" + e.getMessage(), ((RestServiceException) e).getErrorCode());
|
||||
"Maat 规则存储异常:" + ExceptionUtil.getExceptionMsg(e), ((RestServiceException) e).getErrorCode());
|
||||
} else if (e instanceof ServiceRuntimeException) {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"Maat 规则存储异常:" + e.getMessage(), ((ServiceRuntimeException) e).getErrorCode());
|
||||
"Maat 规则存储异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
((ServiceRuntimeException) e).getErrorCode());
|
||||
} else {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"Maat 规则存储异常:" + e.getMessage(), RestBusinessCode.service_runtime_error.getValue());
|
||||
"Maat 规则存储异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
RestBusinessCode.service_runtime_error.getValue());
|
||||
}
|
||||
|
||||
} finally {
|
||||
@@ -152,17 +154,21 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
thread.setExceptionInfo("MAAT规则状态更新时出现异常:" + e.getMessage());
|
||||
logger.error("MAAT规则状态更新时出现异常:" + e.getMessage());
|
||||
|
||||
thread.setExceptionInfo("MAAT规则状态更新时出现异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
logger.error("MAAT规则状态更新时出现异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
if (e instanceof RestServiceException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"MAAT规则状态更新时出现异常:" + e.getMessage(), ((RestServiceException) e).getErrorCode());
|
||||
"MAAT规则状态更新时出现异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
((RestServiceException) e).getErrorCode());
|
||||
} else if (e instanceof ServiceRuntimeException) {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"MAAT规则状态更新时出现异常:" + e.getMessage(), ((ServiceRuntimeException) e).getErrorCode());
|
||||
"MAAT规则状态更新时出现异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
((ServiceRuntimeException) e).getErrorCode());
|
||||
} else {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"MAAT规则状态更新时出现异常:" + e.getMessage(), RestBusinessCode.service_runtime_error.getValue());
|
||||
"MAAT规则状态更新时出现异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
RestBusinessCode.service_runtime_error.getValue());
|
||||
}
|
||||
} finally {
|
||||
deblocking(requestId);
|
||||
@@ -213,17 +219,18 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
thread.setExceptionInfo("回调规则存储异常:" + e.getMessage());
|
||||
logger.error("回调规则存储异常:" + e.getMessage());
|
||||
thread.setExceptionInfo("回调规则存储异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
logger.error("回调规则存储异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
if (e instanceof RestServiceException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "回调规则存储异常:" + e.getMessage(),
|
||||
((RestServiceException) e).getErrorCode());
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"回调规则存储异常:" + ExceptionUtil.getExceptionMsg(e), ((RestServiceException) e).getErrorCode());
|
||||
} else if (e instanceof ServiceRuntimeException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, "回调规则存储异常:" + e.getMessage(),
|
||||
((ServiceRuntimeException) e).getErrorCode());
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"回调规则存储异常:" + ExceptionUtil.getExceptionMsg(e), ((ServiceRuntimeException) e).getErrorCode());
|
||||
} else {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"回调规则存储异常:" + e.getMessage(), RestBusinessCode.service_runtime_error.getValue());
|
||||
"回调规则存储异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
RestBusinessCode.service_runtime_error.getValue());
|
||||
}
|
||||
} finally {
|
||||
deblocking(requestId);
|
||||
@@ -247,17 +254,18 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
thread.setExceptionInfo("回调规则内容更新异常:" + e.getMessage());
|
||||
logger.error("回调规则内容更新异常:" + e.getMessage());
|
||||
thread.setExceptionInfo("回调规则内容更新异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
logger.error("回调规则内容更新异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
if (e instanceof RestServiceException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"回调规则内容更新异常:" + e.getMessage(), ((RestServiceException) e).getErrorCode());
|
||||
"回调规则内容更新异常:" + ExceptionUtil.getExceptionMsg(e), ((RestServiceException) e).getErrorCode());
|
||||
} else if (e instanceof ServiceRuntimeException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"回调规则内容更新异常:" + e.getMessage(), ((ServiceRuntimeException) e).getErrorCode());
|
||||
"回调规则内容更新异常:" + ExceptionUtil.getExceptionMsg(e), ((ServiceRuntimeException) e).getErrorCode());
|
||||
} else {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"回调规则内容更新异常:" + e.getMessage(), RestBusinessCode.service_runtime_error.getValue());
|
||||
"回调规则内容更新异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
RestBusinessCode.service_runtime_error.getValue());
|
||||
}
|
||||
} finally {
|
||||
deblocking(requestId);
|
||||
@@ -282,17 +290,18 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
thread.setExceptionInfo("回调规则状态更新异常:" + e.getMessage());
|
||||
logger.error("回调规则状态更新异常:" + e.getMessage());
|
||||
thread.setExceptionInfo("回调规则状态更新异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
logger.error("回调规则状态更新异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
if (e instanceof RestServiceException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"回调规则状态更新异常:" + e.getMessage(), ((RestServiceException) e).getErrorCode());
|
||||
"回调规则状态更新异常:" + ExceptionUtil.getExceptionMsg(e), ((RestServiceException) e).getErrorCode());
|
||||
} else if (e instanceof ServiceRuntimeException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"回调规则状态更新异常:" + e.getMessage(), ((ServiceRuntimeException) e).getErrorCode());
|
||||
"回调规则状态更新异常:" + ExceptionUtil.getExceptionMsg(e), ((ServiceRuntimeException) e).getErrorCode());
|
||||
} else {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"回调规则状态更新异常:" + e.getMessage(), RestBusinessCode.service_runtime_error.getValue());
|
||||
"回调规则状态更新异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
RestBusinessCode.service_runtime_error.getValue());
|
||||
}
|
||||
} finally {
|
||||
deblocking(requestId);
|
||||
@@ -344,24 +353,25 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
logger.error(RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + e.getMessage());
|
||||
thread.setExceptionInfo(RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + e.getMessage());
|
||||
logger.error(RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + ExceptionUtil.getExceptionMsg(e));
|
||||
thread.setExceptionInfo(
|
||||
RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + ExceptionUtil.getExceptionMsg(e));
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + e.getMessage(),
|
||||
RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + ExceptionUtil.getExceptionMsg(e),
|
||||
RestBusinessCode.FileUploadFailure.getValue());
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
logger.error("文件上传异常:" + e.getMessage());
|
||||
thread.setExceptionInfo("文件上传异常:" + e.getMessage());
|
||||
logger.error("文件上传异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
thread.setExceptionInfo("文件上传异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
if (e instanceof RestServiceException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, e.getMessage(),
|
||||
((RestServiceException) e).getErrorCode());
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
ExceptionUtil.getExceptionMsg(e), ((RestServiceException) e).getErrorCode());
|
||||
} else if (e instanceof ServiceRuntimeException) {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start, e.getMessage(),
|
||||
((ServiceRuntimeException) e).getErrorCode());
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
ExceptionUtil.getExceptionMsg(e), ((ServiceRuntimeException) e).getErrorCode());
|
||||
} else {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start, e.getMessage(),
|
||||
RestBusinessCode.FileUploadFailure.getValue());
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
ExceptionUtil.getExceptionMsg(e), RestBusinessCode.FileUploadFailure.getValue());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -415,24 +425,26 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
logger.error(RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + e.getMessage());
|
||||
thread.setExceptionInfo(RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + e.getMessage());
|
||||
logger.error(RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + ExceptionUtil.getExceptionMsg(e));
|
||||
thread.setExceptionInfo(
|
||||
RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + ExceptionUtil.getExceptionMsg(e));
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + e.getMessage(),
|
||||
RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + ExceptionUtil.getExceptionMsg(e),
|
||||
RestBusinessCode.FileUploadFailure.getValue());
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
logger.error(RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + e.getMessage());
|
||||
thread.setExceptionInfo(RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + e.getMessage());
|
||||
logger.error(RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + ExceptionUtil.getExceptionMsg(e));
|
||||
thread.setExceptionInfo(
|
||||
RestBusinessCode.FileUploadFailure.getErrorReason() + ":" + ExceptionUtil.getExceptionMsg(e));
|
||||
if (e instanceof RestServiceException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start, e.getMessage(),
|
||||
((RestServiceException) e).getErrorCode());
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
ExceptionUtil.getExceptionMsg(e), ((RestServiceException) e).getErrorCode());
|
||||
} else if (e instanceof ServiceRuntimeException) {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start, e.getMessage(),
|
||||
((ServiceRuntimeException) e).getErrorCode());
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
ExceptionUtil.getExceptionMsg(e), ((ServiceRuntimeException) e).getErrorCode());
|
||||
} else {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start, e.getMessage(),
|
||||
RestBusinessCode.FileUploadFailure.getValue());
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
ExceptionUtil.getExceptionMsg(e), RestBusinessCode.FileUploadFailure.getValue());
|
||||
}
|
||||
}
|
||||
try {
|
||||
@@ -449,10 +461,12 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
logger.error(RestBusinessCode.GetFileDigestFailure.getValue() + ":" + e.getMessage() + ",请检查摘要获取工具是否安装成功");
|
||||
thread.setExceptionInfo("摘要获取过程中出现异常:" + e.getMessage() + ",请检查摘要获取工具是否安装成功");
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
RestBusinessCode.GetFileDigestFailure.getErrorReason() + ":" + e.getMessage() + ",请检查摘要获取工具是否安装成功",
|
||||
logger.error(RestBusinessCode.GetFileDigestFailure.getValue() + ":" + ExceptionUtil.getExceptionMsg(e)
|
||||
+ ",请检查摘要获取工具是否安装成功");
|
||||
thread.setExceptionInfo("摘要获取过程中出现异常:" + ExceptionUtil.getExceptionMsg(e) + ",请检查摘要获取工具是否安装成功");
|
||||
throw new ServiceRuntimeException(
|
||||
thread, System.currentTimeMillis() - start, RestBusinessCode.GetFileDigestFailure.getErrorReason()
|
||||
+ ":" + ExceptionUtil.getExceptionMsg(e) + ",请检查摘要获取工具是否安装成功",
|
||||
RestBusinessCode.GetFileDigestFailure.getValue());
|
||||
}
|
||||
return serviceResponse(thread, System.currentTimeMillis() - start, request, response, "摘要获取成功", resultObject);
|
||||
@@ -485,17 +499,20 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
thread.setExceptionInfo("Maat 分组复用规则存储异常:" + e.getMessage());
|
||||
logger.error("Maat 分组复用规则存储异常:" + e.getMessage());
|
||||
thread.setExceptionInfo("Maat 分组复用规则存储异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
logger.error("Maat 分组复用规则存储异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
if (e instanceof RestServiceException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"Maat 分组复用规则存储异常:" + e.getMessage(), ((RestServiceException) e).getErrorCode());
|
||||
"Maat 分组复用规则存储异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
((RestServiceException) e).getErrorCode());
|
||||
} else if (e instanceof ServiceRuntimeException) {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"Maat 分组复用规则存储异常:" + e.getMessage(), ((ServiceRuntimeException) e).getErrorCode());
|
||||
"Maat 分组复用规则存储异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
((ServiceRuntimeException) e).getErrorCode());
|
||||
} else {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"Maat 分组复用规则存储异常:" + e.getMessage(), RestBusinessCode.service_runtime_error.getValue());
|
||||
"Maat 分组复用规则存储异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
RestBusinessCode.service_runtime_error.getValue());
|
||||
}
|
||||
|
||||
} finally {
|
||||
@@ -535,17 +552,20 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
thread.setExceptionInfo("MAAT规则状态更新时出现异常:" + e.getMessage());
|
||||
logger.error("删除MAAT规则分组复用域配置时出现异常:" + e.getMessage());
|
||||
thread.setExceptionInfo("MAAT规则状态更新时出现异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
logger.error("删除MAAT规则分组复用域配置时出现异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
if (e instanceof RestServiceException) {
|
||||
throw new RestServiceException(thread, System.currentTimeMillis() - start,
|
||||
"删除MAAT规则分组复用域配置时出现异常:" + e.getMessage(), ((RestServiceException) e).getErrorCode());
|
||||
"删除MAAT规则分组复用域配置时出现异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
((RestServiceException) e).getErrorCode());
|
||||
} else if (e instanceof ServiceRuntimeException) {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"删除MAAT规则分组复用域配置时出现异常:" + e.getMessage(), ((ServiceRuntimeException) e).getErrorCode());
|
||||
"删除MAAT规则分组复用域配置时出现异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
((ServiceRuntimeException) e).getErrorCode());
|
||||
} else {
|
||||
throw new ServiceRuntimeException(thread, System.currentTimeMillis() - start,
|
||||
"删除MAAT规则分组复用域配置时出现异常:" + e.getMessage(), RestBusinessCode.service_runtime_error.getValue());
|
||||
"删除MAAT规则分组复用域配置时出现异常:" + ExceptionUtil.getExceptionMsg(e),
|
||||
RestBusinessCode.service_runtime_error.getValue());
|
||||
}
|
||||
} finally {
|
||||
deblocking(requestId);
|
||||
@@ -563,18 +583,17 @@ public class ConfigSourcesController extends BaseRestController {
|
||||
long start = System.currentTimeMillis();
|
||||
AuditLogThread thread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
compileId);
|
||||
Map map=null;
|
||||
Map map = null;
|
||||
try {
|
||||
map=configRedisService.getAllKVByCompileId(compileId);
|
||||
map = configRedisService.getAllKVByCompileId(compileId);
|
||||
} catch (Exception e) {
|
||||
thread.setExceptionInfo("根据配置id获取对应的编译,组,域等信息时出现异常:" + e.getMessage());
|
||||
logger.error("根据配置id获取对应的编译,组,域等信息时出现异常:" +ExceptionUtil.getExceptionMsg(e));
|
||||
throw new RestServiceException("根据配置id获取对应的编译,组,域等信息失败",
|
||||
RestBusinessCode.ConfigSourceIsNull.getValue());
|
||||
thread.setExceptionInfo("根据配置id获取对应的编译,组,域等信息时出现异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
logger.error("根据配置id获取对应的编译,组,域等信息时出现异常:" + ExceptionUtil.getExceptionMsg(e));
|
||||
throw new RestServiceException("根据配置id获取对应的编译,组,域等信息失败", RestBusinessCode.ConfigSourceIsNull.getValue());
|
||||
|
||||
}
|
||||
return compileServiceResponse(thread, System.currentTimeMillis() - start, request, response,
|
||||
"根据配置id获取对应的编译,组,域等信息成功", map);
|
||||
"根据配置id获取对应的编译,组,域等信息成功", map);
|
||||
}
|
||||
|
||||
private void validateGroupReuseSource(AuditLogThread thread, long start, GroupReuseSource groupReuseSource) {
|
||||
|
||||
@@ -734,10 +734,8 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
if (!StringUtil.isBlank(ntcConnRecordPercent.getSearchFoundEndTime())) {
|
||||
sdf.setLenient(false);
|
||||
sdf.parse(ntcConnRecordPercent.getSearchFoundEndTime());
|
||||
} else {
|
||||
throw new RestServiceException("searchFoundEndTime参数不能为空",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
|
||||
} catch (ParseException e) {
|
||||
throw new RestServiceException("searchFoundEndTime参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
@@ -750,10 +748,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
if (!StringUtil.isBlank(ntcConnRecordPercent.getSearchFoundStartTime())) {
|
||||
sdf.setLenient(false);
|
||||
sdf.parse(ntcConnRecordPercent.getSearchFoundStartTime());
|
||||
} else {
|
||||
throw new RestServiceException("searchFoundStartTime参数不能为空",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
throw new RestServiceException("searchFoundStartTime参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
@@ -801,10 +796,8 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
if (!StringUtil.isBlank(ntcAsnRecord.getSearchFoundEndTime())) {
|
||||
sdf.setLenient(false);
|
||||
sdf.parse(ntcAsnRecord.getSearchFoundEndTime());
|
||||
} else {
|
||||
throw new RestServiceException("searchFoundEndTime参数不能为空",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
|
||||
} catch (ParseException e) {
|
||||
throw new RestServiceException("searchFoundEndTime参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
@@ -817,10 +810,8 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
if (!StringUtil.isBlank(ntcAsnRecord.getSearchFoundStartTime())) {
|
||||
sdf.setLenient(false);
|
||||
sdf.parse(ntcAsnRecord.getSearchFoundStartTime());
|
||||
} else {
|
||||
throw new RestServiceException("searchFoundStartTime参数不能为空",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
|
||||
} catch (ParseException e) {
|
||||
throw new RestServiceException("searchFoundStartTime参数格式错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
@@ -828,6 +819,19 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
throw new RestServiceException("searchFoundStartTime参数错误",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
try {
|
||||
if (!StringUtil.isBlank(ntcAsnRecord.getSearchAsnType())) {
|
||||
Integer.parseInt(ntcAsnRecord.getSearchAsnType());
|
||||
}else {
|
||||
throw new RestServiceException("searchAsnType参数不能为空",
|
||||
RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
throw new RestServiceException("searchAsnType参数格式错误"+e.getMessage(), RestBusinessCode.param_formate_error.getValue());
|
||||
} catch (Exception e) {
|
||||
throw new RestServiceException("searchAsnType参数错误"+e.getMessage(), RestBusinessCode.param_formate_error.getValue());
|
||||
}
|
||||
|
||||
logDataService.getNtcAsnRecord(page, ntcAsnRecord);
|
||||
} catch (Exception e) {
|
||||
auditLogThread.setExceptionInfo("ASN通联关系(源,目的)日志检索失败:" + e.getMessage());
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.nis.domain.restful.NtcReportEntity;
|
||||
import com.nis.domain.restful.NtcServiceReport;
|
||||
import com.nis.domain.restful.NtcSrcipDomesticReport;
|
||||
import com.nis.domain.restful.NtcTagReport;
|
||||
import com.nis.domain.restful.NtcURLReport;
|
||||
import com.nis.domain.restful.NtcURLIpReport;
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.restful.ServiceRuntimeException;
|
||||
@@ -413,7 +413,7 @@ public class SingleDimensionReport extends BaseRestController {
|
||||
|
||||
@RequestMapping(value = "/ntcURLReport", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "URL统计查询服务", httpMethod = "GET", notes = "URL统计查询服务")
|
||||
public Map<String, ?> ntcURLReport(Page page, NtcURLReport urlReport, Model model, HttpServletRequest request,
|
||||
public Map<String, ?> ntcURLReport(Page page, NtcURLIpReport urlReport, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
AuditLogThread saveLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||
@@ -422,16 +422,16 @@ public class SingleDimensionReport extends BaseRestController {
|
||||
Page<?> reportPage = null;
|
||||
try {
|
||||
resetReportTime(urlReport, false);
|
||||
ntcReportService.queryReportConditionCheck(saveLogThread, start, urlReport, NtcURLReport.class, page);
|
||||
ntcReportService.queryReportConditionCheck(saveLogThread, start, urlReport, NtcURLIpReport.class, page);
|
||||
String orderBy = "";
|
||||
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||
orderBy = Page.getOrderBySql(NtcURLReport.class.getSimpleName(), page.getOrderBy());
|
||||
orderBy = Page.getOrderBySql(NtcURLIpReport.class.getSimpleName(), page.getOrderBy());
|
||||
} else {
|
||||
orderBy = "report_time";
|
||||
}
|
||||
page.setOrderBy(orderBy);
|
||||
reportPage = ntcReportService
|
||||
.findNtcURLReport(new Page<NtcURLReport>(request, response, NtcURLReport.class), urlReport);
|
||||
.findNtcURLReport(new Page<NtcURLIpReport>(request, response, NtcURLIpReport.class), urlReport);
|
||||
} catch (Exception e) {
|
||||
saveLogThread.setExceptionInfo("URL统计查询失败:" + e.getMessage());
|
||||
logger.error("URL统计查询失败:" + ExceptionUtil.getExceptionMsg(e));
|
||||
|
||||
Reference in New Issue
Block a user