1、增加Radius泛收日志查询接口;
2、VoIp泛收日志Bean中日期格式数据get方法添加@JsonSerialize注解
This commit is contained in:
@@ -0,0 +1,51 @@
|
|||||||
|
package com.nis.domain.restful;
|
||||||
|
|
||||||
|
import com.nis.domain.LogEntity;
|
||||||
|
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @ClassName:NtcCollectRadiusLog
|
||||||
|
* @Description:TODO(这里用一句话描述这个类的作用)
|
||||||
|
* @author zdx
|
||||||
|
* @date 2018年12月12日 下午2:00:16
|
||||||
|
* @version V1.0
|
||||||
|
*/
|
||||||
|
public class NtcCollectRadiusLog extends LogEntity<NtcCollectRadiusLog> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 6757490542745612556L;
|
||||||
|
@ApiModelProperty(value="报文类型", required=true)
|
||||||
|
protected Integer code;
|
||||||
|
@ApiModelProperty(value="ISN接入的IP", required=true)
|
||||||
|
protected String nasIp;
|
||||||
|
@ApiModelProperty(value="服务器下发的用户地址", required=true)
|
||||||
|
protected String framedIp;
|
||||||
|
@ApiModelProperty(value="用户名", required=true)
|
||||||
|
protected String account;
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
public String getNasIp() {
|
||||||
|
return nasIp;
|
||||||
|
}
|
||||||
|
public void setNasIp(String nasIp) {
|
||||||
|
this.nasIp = nasIp;
|
||||||
|
}
|
||||||
|
public String getFramedIp() {
|
||||||
|
return framedIp;
|
||||||
|
}
|
||||||
|
public void setFramedIp(String framedIp) {
|
||||||
|
this.framedIp = framedIp;
|
||||||
|
}
|
||||||
|
public String getAccount() {
|
||||||
|
return account;
|
||||||
|
}
|
||||||
|
public void setAccount(String account) {
|
||||||
|
this.account = account;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,7 +4,8 @@ import java.io.Serializable;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.nis.domain.LogEntity;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.nis.util.JsonDateSerializer;
|
||||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -178,6 +179,7 @@ public class NtcCollectVoipLog implements Serializable{
|
|||||||
this.pid = pid;
|
this.pid = pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonSerialize(using = JsonDateSerializer.class)
|
||||||
public Date getFoundTime() {
|
public Date getFoundTime() {
|
||||||
return foundTime;
|
return foundTime;
|
||||||
}
|
}
|
||||||
@@ -186,6 +188,7 @@ public class NtcCollectVoipLog implements Serializable{
|
|||||||
this.foundTime = foundTime;
|
this.foundTime = foundTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonSerialize(using = JsonDateSerializer.class)
|
||||||
public Date getRecvTime() {
|
public Date getRecvTime() {
|
||||||
return recvTime;
|
return recvTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.restful.NtcAppLog;
|
import com.nis.domain.restful.NtcAppLog;
|
||||||
import com.nis.domain.restful.NtcBgpLog;
|
import com.nis.domain.restful.NtcBgpLog;
|
||||||
|
import com.nis.domain.restful.NtcCollectRadiusLog;
|
||||||
import com.nis.domain.restful.NtcCollectVoipLog;
|
import com.nis.domain.restful.NtcCollectVoipLog;
|
||||||
import com.nis.domain.restful.NtcDdosLog;
|
import com.nis.domain.restful.NtcDdosLog;
|
||||||
import com.nis.domain.restful.NtcDnsLog;
|
import com.nis.domain.restful.NtcDnsLog;
|
||||||
@@ -584,4 +585,38 @@ public class NtcLogSearchController extends BaseRestController {
|
|||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "VoIp泛收日志检索成功", page,
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "VoIp泛收日志检索成功", page,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/ntcCollectRadiusLogs", method = RequestMethod.GET)
|
||||||
|
@ApiOperation(value = "RADIUS泛收日志查询", httpMethod = "GET", notes = "对日志功能“RADIUS泛收日志查询”提供数据基础查询服务")
|
||||||
|
public Map<String, ?> ntcCollectRadiusLogs(Page page, NtcCollectRadiusLog ntcCollectRadiusLog, Model model,
|
||||||
|
HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
AuditLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request,
|
||||||
|
null);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (StringUtil.isEmpty(ntcCollectRadiusLog.getSearchFoundStartTime())
|
||||||
|
&& StringUtil.isEmpty(ntcCollectRadiusLog.getSearchFoundEndTime())) {
|
||||||
|
Map<String, String> map = DateUtils.getLocalTime(null,
|
||||||
|
null, Constants.LOG_LOCAL_TIME, "minute");
|
||||||
|
ntcCollectRadiusLog.setSearchFoundStartTime(map.get("startTime"));
|
||||||
|
ntcCollectRadiusLog.setSearchFoundEndTime(map.get("endTime"));
|
||||||
|
}
|
||||||
|
|
||||||
|
ntcLogService.queryConditionCheck(auditLogThread, start,ntcCollectRadiusLog, NtcCollectRadiusLog.class, page);
|
||||||
|
logDataService.getData(page, ntcCollectRadiusLog);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(ExceptionUtil.getExceptionMsg(e));
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
throw new ServiceRuntimeException(auditLogThread, System.currentTimeMillis() - start,
|
||||||
|
"RADIUS泛收日志检索失败:" + e.getMessage(), RestBusinessCode.service_runtime_error.getValue());
|
||||||
|
}else{
|
||||||
|
throw ((RestServiceException) e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "RADIUS泛收日志检索成功", page,
|
||||||
|
0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1434,4 +1434,40 @@
|
|||||||
<result column="user_agent" jdbcType="VARCHAR" property="userAgent" />
|
<result column="user_agent" jdbcType="VARCHAR" property="userAgent" />
|
||||||
<result column="server" jdbcType="VARCHAR" property="server" />
|
<result column="server" jdbcType="VARCHAR" property="server" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="NtcCollectRadiusLogMap" type="com.nis.domain.restful.NtcCollectRadiusLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
<result column="server_locate" jdbcType="VARCHAR" property="serverLocate" />
|
||||||
|
<result column="client_locate" jdbcType="VARCHAR" property="clientLocate" />
|
||||||
|
<result column="s_asn" jdbcType="VARCHAR" property="sAsn" />
|
||||||
|
<result column="d_asn" jdbcType="VARCHAR" property="dAsn" />
|
||||||
|
<result column="s_subscribe_id" jdbcType="VARCHAR" property="sSubscribeId" />
|
||||||
|
<result column="d_subscribe_id" jdbcType="VARCHAR" property="dSubscribeId" />
|
||||||
|
<result column="scene_file" jdbcType="VARCHAR" property="sceneFile" />
|
||||||
|
<result column="link_id" jdbcType="BIGINT" property="linkId" />
|
||||||
|
<result column="encap_type" jdbcType="INTEGER" property="encapType" />
|
||||||
|
<result column="inner_smac" jdbcType="VARCHAR" property="innerSmac" />
|
||||||
|
<result column="inner_dmac" jdbcType="VARCHAR" property="innerDmac" />
|
||||||
|
|
||||||
|
<result column="code" jdbcType="INTEGER" property="code" />
|
||||||
|
<result column="nas_ip" jdbcType="VARCHAR" property="nasIp" />
|
||||||
|
<result column="framed_ip" jdbcType="VARCHAR" property="framedIp" />
|
||||||
|
<result column="account" jdbcType="VARCHAR" property="account" />
|
||||||
|
</resultMap>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -36,7 +36,7 @@ NtcStreamingMediaLogClickHouseTable=TBS_ODS_NTC_STREAMING_MEDIA_LOG
|
|||||||
MmFileDigestLogClickHouseTable=TBS_ODS_MM_FILE_DIGEST_LOG
|
MmFileDigestLogClickHouseTable=TBS_ODS_MM_FILE_DIGEST_LOG
|
||||||
NtcKeywordsUrlLogClickHouseTable=TBS_ODS_NTC_KEYWORDS_URL_LOG
|
NtcKeywordsUrlLogClickHouseTable=TBS_ODS_NTC_KEYWORDS_URL_LOG
|
||||||
NtcCollectVoipLogClickHouseTable=TBS_ODS_NTC_COLLECT_VOIP_LOG
|
NtcCollectVoipLogClickHouseTable=TBS_ODS_NTC_COLLECT_VOIP_LOG
|
||||||
|
NtcCollectRadiusLogClickHouseTable=TBS_ODS_NTC_COLLECT_RADIUS_LOG
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ NtcStreamingMediaLogHiveTable=NTC_STREAMING_MEDIA_LOG
|
|||||||
MmFileDigestLogHiveTable=MM_FILE_DIGEST_LOG
|
MmFileDigestLogHiveTable=MM_FILE_DIGEST_LOG
|
||||||
NtcKeywordsUrlLogHiveTable=NTC_KEYWORDS_URL_LOG
|
NtcKeywordsUrlLogHiveTable=NTC_KEYWORDS_URL_LOG
|
||||||
NtcCollectVoipLogHiveTable=NTC_COLLECT_VOIP_LOG
|
NtcCollectVoipLogHiveTable=NTC_COLLECT_VOIP_LOG
|
||||||
|
NtcCollectRadiusLogHiveTable=NTC_COLLECT_RADIUS_LOG
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ NtcStreamingMediaLogHiveTable=singhand_NTC_STREAMING_MEDIA_LOG
|
|||||||
MmFileDigestLogHiveTable=singhand_MM_FILE_DIGEST_LOG
|
MmFileDigestLogHiveTable=singhand_MM_FILE_DIGEST_LOG
|
||||||
NtcKeywordsUrlLogHiveTable=singhand_NTC_KEYWORDS_URL_LOG
|
NtcKeywordsUrlLogHiveTable=singhand_NTC_KEYWORDS_URL_LOG
|
||||||
NtcCollectVoipLogHiveTable=singhand_NTC_COLLECT_VOIP_LOG
|
NtcCollectVoipLogHiveTable=singhand_NTC_COLLECT_VOIP_LOG
|
||||||
|
NtcCollectRadiusLogHiveTable=singhand_NTC_COLLECT_RADIUS_LOG
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user