日志:voip样例、音频色情样例、视频色情样例
This commit is contained in:
@@ -18,7 +18,7 @@ public class MmVoipLog extends BaseLogEntity<MmVoipLog> {
|
||||
@ApiModelProperty(value="VOIP通话时长(秒)", required=true)
|
||||
private String duation;
|
||||
@ApiModelProperty(value="VOIP协议", required=true)
|
||||
private String protocol;
|
||||
private String voipProtocol;
|
||||
@ApiModelProperty(value="主叫VOIP账号", required=false)
|
||||
private String callingAccount;
|
||||
@ApiModelProperty(value="被叫VOIP账号", required=false)
|
||||
@@ -68,11 +68,11 @@ public class MmVoipLog extends BaseLogEntity<MmVoipLog> {
|
||||
public void setFdType(Integer fdType) {
|
||||
this.fdType = fdType;
|
||||
}
|
||||
public String getProtocol() {
|
||||
return protocol;
|
||||
public String getVoipProtocol() {
|
||||
return voipProtocol;
|
||||
}
|
||||
public void setProtocol(String protocol) {
|
||||
this.protocol = protocol;
|
||||
public void setVoipProtocol(String voipProtocol) {
|
||||
this.voipProtocol = voipProtocol;
|
||||
}
|
||||
public String getDuation() {
|
||||
return duation;
|
||||
|
||||
@@ -380,7 +380,10 @@ public final class Constants {
|
||||
public static final String NTC_DDOS_LOG = Configurations.getStringProperty("ntcDdosLog", "");
|
||||
public static final String NTC_DKBEHAVIOR_LOG = Configurations.getStringProperty("dkBehaviorLog", "");
|
||||
public static final String NTC_MMVOIP_LOG = Configurations.getStringProperty("mmVoipLog", "");
|
||||
public static final String NTC_MMSAMPLE_VOIP_LOG = Configurations.getStringProperty("mmSampleVoipLog", "");
|
||||
public static final String NTC_MMAVIP_LOG = Configurations.getStringProperty("mmAvIpLog", "");
|
||||
public static final String NTC_MMPORNAUDIOSAMPLE_LOG = Configurations.getStringProperty("mmPornAudioLevelLog", "");
|
||||
public static final String NTC_MMPORNVIDEOSAMPLE_LOG = Configurations.getStringProperty("mmPornVideoLevelLog", "");
|
||||
public static final String NTC_MMAVURL_LOG = Configurations.getStringProperty("mmAvUrlLog", "");
|
||||
public static final String NTC_MMPICIP_LOG = Configurations.getStringProperty("mmPicIpLog", "");
|
||||
public static final String NTC_MMPICURL_LOG = Configurations.getStringProperty("mmPicUrlLog", "");
|
||||
|
||||
@@ -588,7 +588,7 @@ public class BaseController {
|
||||
public void setLogAction(BaseLogEntity log) {
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
for (FunctionServiceDict dict : serviceList) {
|
||||
if (dict.getServiceId().intValue() == log.getService().intValue()) {
|
||||
if (dict.getServiceId().intValue() == log.getService()) {
|
||||
log.setAction(dict.getAction());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmAvIpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/log/ntc")
|
||||
public class MmPornAvSampleController extends BaseController {
|
||||
|
||||
@RequestMapping(value = {"mmSampleAudioLevelLogs", "mmSampleAudioLevelLogs/list"})
|
||||
public String audioList(Model model, @ModelAttribute("log") MmAvIpLog entry, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
try {
|
||||
PageLog<MmAvIpLog> page = new PageLog<MmAvIpLog>(request, response);
|
||||
Map<String, Object> params=new HashMap<>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
//查询值判断
|
||||
initLogSearchValue(entry, params);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL + Constants.NTC_MMPORNAUDIOSAMPLE_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url, params, request);
|
||||
|
||||
Gson gson = new GsonBuilder().create();
|
||||
//gson泛型支持
|
||||
LogRecvData<MmAvIpLog> fromJson = gson.fromJson(jsonString, new TypeToken<LogRecvData<MmAvIpLog>>(){}.getType());
|
||||
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
Page<MmAvIpLog> data = fromJson.getData();
|
||||
page.setList(data.getList());
|
||||
List<MmAvIpLog> list = page.getList();
|
||||
for (MmAvIpLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询音频色情样例日志成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("查询音频色情样例日志失败", e);
|
||||
addMessage(model, e.getMessage());
|
||||
}
|
||||
return "/log/ntc/mmPornAudioSampleList";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"mmSampleVideoLevelLogs", "mmSampleVideoLevelLogs/list"})
|
||||
public String videoList(Model model, @ModelAttribute("log") MmAvIpLog entry, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
try {
|
||||
|
||||
PageLog<MmAvIpLog> page = new PageLog<MmAvIpLog>(request, response);
|
||||
Map<String, Object> params=new HashMap<>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
//查询值判断
|
||||
initLogSearchValue(entry, params);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL + Constants.NTC_MMPORNVIDEOSAMPLE_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
|
||||
Gson gson = new GsonBuilder().create();
|
||||
//gson泛型支持
|
||||
LogRecvData<MmAvIpLog> fromJson = gson.fromJson(jsonString, new TypeToken<LogRecvData<MmAvIpLog>>(){}.getType());
|
||||
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
Page<MmAvIpLog> data = fromJson.getData();
|
||||
page.setList(data.getList());
|
||||
List<MmAvIpLog> list = page.getList();
|
||||
for (MmAvIpLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询视频色情样例日志成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("查询视频色情样例日志失败", e);
|
||||
addMessage(model, e.getMessage());
|
||||
}
|
||||
return "/log/ntc/mmPornVideoSampleList";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmVoipLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/log/ntc/mmSampleVoipLogs")
|
||||
public class MmSampleVoipLogController extends BaseController {
|
||||
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(Model model, @ModelAttribute("log") MmVoipLog entry, HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException {
|
||||
try {
|
||||
|
||||
PageLog<MmVoipLog> page = new PageLog<MmVoipLog>(request, response);
|
||||
Map<String, Object> params=new HashMap<>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
String url = Constants.LOG_BASE_URL+Constants.NTC_MMSAMPLE_VOIP_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
//String path = request.getClass().getClassLoader().getResource("").getPath();
|
||||
//String jsonString = FileUtil.readAsString(new File(path + "com/nis/web/test/voipSampleLogTest.txt"));
|
||||
|
||||
Gson gson = new GsonBuilder().create();
|
||||
//gson泛型支持
|
||||
LogRecvData<MmVoipLog> fromJson = gson.fromJson(jsonString, new TypeToken<LogRecvData<MmVoipLog>>(){}.getType());
|
||||
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
Page<MmVoipLog> data = fromJson.getData();
|
||||
page.setList(data.getList());
|
||||
List<MmVoipLog> list = page.getList();
|
||||
for (MmVoipLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询Voip样例日志成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("查询Voip日志失败", e);
|
||||
addMessage(model, e.getMessage());
|
||||
}
|
||||
return "/log/ntc/mmSampleVoipList";
|
||||
}
|
||||
}
|
||||
81
src/main/java/com/nis/web/test/voipSampleLogTest.txt
Normal file
81
src/main/java/com/nis/web/test/voipSampleLogTest.txt
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"status":200,
|
||||
"businessCode":2000,
|
||||
"reason":"Success",
|
||||
"msg":"success",
|
||||
"fromuri":"abc",
|
||||
"logSource":0,
|
||||
"data":{
|
||||
"pageNo":1,
|
||||
"pageSize":15,
|
||||
"count":41,
|
||||
"last":3,
|
||||
"list":[
|
||||
{
|
||||
"cfgId":21,
|
||||
"foundTime":"2018-06-10 10:10:10",
|
||||
"recvTime":"2018-06-11 11:11:11",
|
||||
"transProto":"L2TP",
|
||||
"addrType":4,
|
||||
"dIp":"10.0.6.121",
|
||||
"sIp":"10.0.6.122",
|
||||
"dPort":"8080",
|
||||
"sPort":"8080",
|
||||
"service":264,
|
||||
"entranceId":21,
|
||||
"deviceId":2,
|
||||
"direction":1,
|
||||
"streamDir":0,
|
||||
"capIp":"10.1.1.2",
|
||||
"addrList":"11111",
|
||||
"userRegion":"aaa",
|
||||
"duation":"123",
|
||||
"voipProtocol":"SIP",
|
||||
"callingAccount":"yiyiwyf",
|
||||
"calledAccount":"jingl",
|
||||
"callingNumber":"13041000000",
|
||||
"calledNumber":"13113113133",
|
||||
"fromToStoreIp":"10.1.1.1",
|
||||
"fromToStoreUrl":"www.baidu.com",
|
||||
"toFromStoreIp":"10.2.2.2",
|
||||
"toFromStoreUrl":"beian.baidu.com",
|
||||
"pid":"5",
|
||||
"logUri":"aaacc",
|
||||
"level":2,
|
||||
"fdType":1
|
||||
},{
|
||||
"cfgId":22,
|
||||
"foundTime":"2018-06-10 10:10:10",
|
||||
"recvTime":"2018-06-11 11:11:11",
|
||||
"transProto":"L2TP",
|
||||
"addrType":4,
|
||||
"dIp":"10.0.6.121",
|
||||
"sIp":"10.0.6.122",
|
||||
"dPort":"8080",
|
||||
"sPort":"8080",
|
||||
"service":392,
|
||||
"entranceId":112,
|
||||
"deviceId":2,
|
||||
"direction":0,
|
||||
"streamDir":1,
|
||||
"capIp":"10.1.1.2",
|
||||
"addrList":"11111",
|
||||
"userRegion":"aaa",
|
||||
"duation":"123",
|
||||
"voipProtocol":"SIP",
|
||||
"callingAccount":"yiyiwyf",
|
||||
"calledAccount":"jingl",
|
||||
"callingNumber":"13041000000",
|
||||
"calledNumber":"13113113133",
|
||||
"fromToStoreIp":"10.1.1.1",
|
||||
"fromToStoreUrl":"www.baidu.com",
|
||||
"toFromStoreIp":"10.2.2.2",
|
||||
"toFromStoreUrl":"beian.baidu.com",
|
||||
"pid":"5",
|
||||
"logUri":"aaacc",
|
||||
"level":2,
|
||||
"fdType":1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user