1.日志检索增加音视频IP,url 2.日志页面修改service 为action
This commit is contained in:
59
src/main/java/com/nis/domain/log/DkBehaviorLog.java
Normal file
59
src/main/java/com/nis/domain/log/DkBehaviorLog.java
Normal file
@@ -0,0 +1,59 @@
|
||||
package com.nis.domain.log;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @ClassName:DkBehaviorLog
|
||||
* @Description:TODO(这里用一句话描述这个类的作用)
|
||||
* @author (zdx)
|
||||
* @date 2018年7月12日 下午5:09:21
|
||||
* @version V1.0
|
||||
*/
|
||||
public class DkBehaviorLog extends BaseLogEntity<DkBehaviorLog> {
|
||||
private static final long serialVersionUID = -589390375816690510L;
|
||||
@ApiModelProperty(value = "协议标签", required = true)
|
||||
protected String appLabel;
|
||||
@ApiModelProperty(value = "c2s包数", required = true)
|
||||
protected String c2sPktNum;
|
||||
@ApiModelProperty(value = "s2c包数", required = true)
|
||||
protected String s2cPktNum;
|
||||
@ApiModelProperty(value = "c2s字节数", required = true)
|
||||
protected String c2sByteNum;
|
||||
@ApiModelProperty(value = "s2c字节数", required = true)
|
||||
protected String s2cByteNum;
|
||||
|
||||
public String getAppLabel() {
|
||||
return appLabel;
|
||||
}
|
||||
public void setAppLabel(String appLabel) {
|
||||
this.appLabel = appLabel;
|
||||
}
|
||||
public String getC2sPktNum() {
|
||||
return c2sPktNum;
|
||||
}
|
||||
public void setC2sPktNum(String c2sPktNum) {
|
||||
this.c2sPktNum = c2sPktNum;
|
||||
}
|
||||
public String getS2cPktNum() {
|
||||
return s2cPktNum;
|
||||
}
|
||||
public void setS2cPktNum(String s2cPktNum) {
|
||||
this.s2cPktNum = s2cPktNum;
|
||||
}
|
||||
public String getC2sByteNum() {
|
||||
return c2sByteNum;
|
||||
}
|
||||
public void setC2sByteNum(String c2sByteNum) {
|
||||
this.c2sByteNum = c2sByteNum;
|
||||
}
|
||||
public String getS2cByteNum() {
|
||||
return s2cByteNum;
|
||||
}
|
||||
public void setS2cByteNum(String s2cByteNum) {
|
||||
this.s2cByteNum = s2cByteNum;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
71
src/main/java/com/nis/domain/log/MmAvIpLog.java
Normal file
71
src/main/java/com/nis/domain/log/MmAvIpLog.java
Normal file
@@ -0,0 +1,71 @@
|
||||
package com.nis.domain.log;
|
||||
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @ClassName:MmAvIpLog
|
||||
* @Description:TODO(这里用一句话描述这个类的作用)
|
||||
* @author (zdx)
|
||||
* @date 2018年7月16日 下午2:54:23
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MmAvIpLog extends BaseLogEntity<MmAvIpLog> {
|
||||
|
||||
private static final long serialVersionUID = -6177790560553329386L;
|
||||
@ApiModelProperty(value="节目ID", required=true)
|
||||
protected String pid;
|
||||
@ApiModelProperty(value="节目访问地址", required=true)
|
||||
protected String url;
|
||||
@ApiModelProperty(value="封堵现场片段路径", required=true)
|
||||
protected String logUri;
|
||||
@ApiModelProperty(value="入口页面", required=true)
|
||||
protected String refer;
|
||||
@ApiModelProperty(value="有害级别", required=true)
|
||||
protected Integer level;
|
||||
@ApiModelProperty(value="封堵类型", required=true)
|
||||
protected Integer fdType;
|
||||
@ApiModelProperty(value="协议", required=true)
|
||||
protected String protocol;
|
||||
public String getPid() {
|
||||
return pid;
|
||||
}
|
||||
public void setPid(String pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
public String getLogUri() {
|
||||
return logUri;
|
||||
}
|
||||
public void setLogUri(String logUri) {
|
||||
this.logUri = logUri;
|
||||
}
|
||||
public String getRefer() {
|
||||
return refer;
|
||||
}
|
||||
public void setRefer(String refer) {
|
||||
this.refer = refer;
|
||||
}
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
}
|
||||
public void setLevel(Integer level) {
|
||||
this.level = level;
|
||||
}
|
||||
public Integer getFdType() {
|
||||
return fdType;
|
||||
}
|
||||
public void setFdType(Integer fdType) {
|
||||
this.fdType = fdType;
|
||||
}
|
||||
public String getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
public void setProtocol(String protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
}
|
||||
71
src/main/java/com/nis/domain/log/MmAvUrlLog.java
Normal file
71
src/main/java/com/nis/domain/log/MmAvUrlLog.java
Normal file
@@ -0,0 +1,71 @@
|
||||
package com.nis.domain.log;
|
||||
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @ClassName:MmAvUrlLog
|
||||
* @Description:TODO(这里用一句话描述这个类的作用)
|
||||
* @author (zdx)
|
||||
* @date 2018年7月16日 下午3:11:42
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MmAvUrlLog extends BaseLogEntity<MmAvUrlLog> {
|
||||
|
||||
private static final long serialVersionUID = 1446933545638550170L;
|
||||
@ApiModelProperty(value="节目ID", required=true)
|
||||
protected String pid;
|
||||
@ApiModelProperty(value="节目访问地址", required=true)
|
||||
protected String url;
|
||||
@ApiModelProperty(value="封堵现场片段路径", required=true)
|
||||
protected String logUri;
|
||||
@ApiModelProperty(value="入口页面", required=true)
|
||||
protected String refer;
|
||||
@ApiModelProperty(value="有害级别", required=true)
|
||||
protected Integer level;
|
||||
@ApiModelProperty(value="封堵类型", required=true)
|
||||
protected Integer fdType;
|
||||
@ApiModelProperty(value="协议", required=true)
|
||||
protected String protocol;
|
||||
public String getPid() {
|
||||
return pid;
|
||||
}
|
||||
public void setPid(String pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
public String getLogUri() {
|
||||
return logUri;
|
||||
}
|
||||
public void setLogUri(String logUri) {
|
||||
this.logUri = logUri;
|
||||
}
|
||||
public String getRefer() {
|
||||
return refer;
|
||||
}
|
||||
public void setRefer(String refer) {
|
||||
this.refer = refer;
|
||||
}
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
}
|
||||
public void setLevel(Integer level) {
|
||||
this.level = level;
|
||||
}
|
||||
public Integer getFdType() {
|
||||
return fdType;
|
||||
}
|
||||
public void setFdType(Integer fdType) {
|
||||
this.fdType = fdType;
|
||||
}
|
||||
public String getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
public void setProtocol(String protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
}
|
||||
139
src/main/java/com/nis/domain/log/MmVoipLog.java
Normal file
139
src/main/java/com/nis/domain/log/MmVoipLog.java
Normal file
@@ -0,0 +1,139 @@
|
||||
package com.nis.domain.log;
|
||||
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @ClassName:MmVoipIpLog
|
||||
* @Description:TODO(这里用一句话描述这个类的作用)
|
||||
* @author (zdx)
|
||||
* @date 2018年7月16日 下午2:57:12
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MmVoipLog extends BaseLogEntity<MmVoipLog> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -9218072642855154505L;
|
||||
@ApiModelProperty(value="VOIP接收时间", required=true)
|
||||
private String recvTime;
|
||||
@ApiModelProperty(value="VOIP通话时长(秒)", required=true)
|
||||
private String duation;
|
||||
@ApiModelProperty(value="VOIP协议", required=true)
|
||||
private String protocol;
|
||||
@ApiModelProperty(value="主叫VOIP账号", required=false)
|
||||
private String callingAccount;
|
||||
@ApiModelProperty(value="被叫VOIP账号", required=false)
|
||||
private String calledAccount;
|
||||
@ApiModelProperty(value="VOIP主叫电信号码", required=false)
|
||||
private String callingNumber;
|
||||
@ApiModelProperty(value="VOIP被叫电信号码", required=false)
|
||||
private String calledNumber;
|
||||
@ApiModelProperty(value="主叫VOIP语音文件存放服务器IP", required=true)
|
||||
private String fromToStoreIp;
|
||||
@ApiModelProperty(value="主叫VOIP语音文件存放服务器URL", required=true)
|
||||
private String fromToStoreUrl;
|
||||
@ApiModelProperty(value="被叫VOIP语音文件存放服务器IP", required=true)
|
||||
private String toFromStoreIp;
|
||||
@ApiModelProperty(value="被叫VOIP语音文件存放服务器URL", required=true)
|
||||
private String toFromStoreUrl;
|
||||
@ApiModelProperty(value="节目ID", required=true)
|
||||
private String pid;
|
||||
@ApiModelProperty(value="封堵现场片段路径", required=false)
|
||||
private String logUri;
|
||||
@ApiModelProperty(value="有害级别", required=false)
|
||||
private Integer level;
|
||||
@ApiModelProperty(value="封堵类型", required=false)
|
||||
private Integer fdType;
|
||||
|
||||
public String getRecvTime() {
|
||||
return recvTime;
|
||||
}
|
||||
public void setRecvTime(String recvTime) {
|
||||
this.recvTime = recvTime;
|
||||
}
|
||||
public String getPid() {
|
||||
return pid;
|
||||
}
|
||||
public void setPid(String pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
}
|
||||
public void setLevel(Integer level) {
|
||||
this.level = level;
|
||||
}
|
||||
public String getLogUri() {
|
||||
return logUri;
|
||||
}
|
||||
public void setLogUri(String logUri) {
|
||||
this.logUri = logUri;
|
||||
}
|
||||
public Integer getFdType() {
|
||||
return fdType;
|
||||
}
|
||||
public void setFdType(Integer fdType) {
|
||||
this.fdType = fdType;
|
||||
}
|
||||
public String getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
public void setProtocol(String protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
public String getDuation() {
|
||||
return duation;
|
||||
}
|
||||
public void setDuation(String duation) {
|
||||
this.duation = duation;
|
||||
}
|
||||
public String getCallingAccount() {
|
||||
return callingAccount;
|
||||
}
|
||||
public void setCallingAccount(String callingAccount) {
|
||||
this.callingAccount = callingAccount;
|
||||
}
|
||||
public String getCalledAccount() {
|
||||
return calledAccount;
|
||||
}
|
||||
public void setCalledAccount(String calledAccount) {
|
||||
this.calledAccount = calledAccount;
|
||||
}
|
||||
public String getCallingNumber() {
|
||||
return callingNumber;
|
||||
}
|
||||
public void setCallingNumber(String callingNumber) {
|
||||
this.callingNumber = callingNumber;
|
||||
}
|
||||
public String getCalledNumber() {
|
||||
return calledNumber;
|
||||
}
|
||||
public void setCalledNumber(String calledNumber) {
|
||||
this.calledNumber = calledNumber;
|
||||
}
|
||||
public String getFromToStoreIp() {
|
||||
return fromToStoreIp;
|
||||
}
|
||||
public void setFromToStoreIp(String fromToStoreIp) {
|
||||
this.fromToStoreIp = fromToStoreIp;
|
||||
}
|
||||
public String getFromToStoreUrl() {
|
||||
return fromToStoreUrl;
|
||||
}
|
||||
public void setFromToStoreUrl(String fromToStoreUrl) {
|
||||
this.fromToStoreUrl = fromToStoreUrl;
|
||||
}
|
||||
public String getToFromStoreIp() {
|
||||
return toFromStoreIp;
|
||||
}
|
||||
public void setToFromStoreIp(String toFromStoreIp) {
|
||||
this.toFromStoreIp = toFromStoreIp;
|
||||
}
|
||||
public String getToFromStoreUrl() {
|
||||
return toFromStoreUrl;
|
||||
}
|
||||
public void setToFromStoreUrl(String toFromStoreUrl) {
|
||||
this.toFromStoreUrl = toFromStoreUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.nis.web.controller.log.manipulation;
|
||||
|
||||
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.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.DkBehaviorLog;
|
||||
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/manipulation/dkbehaviorLogs")
|
||||
public class DkBehaviorLogController extends BaseController{
|
||||
|
||||
/**
|
||||
* @param model
|
||||
* @param entry
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
* @throws ClientProtocolException
|
||||
* @throws IOException
|
||||
*/
|
||||
@RequestMapping(value={"list",""})
|
||||
public String list(Model model,@ModelAttribute("log")DkBehaviorLog entry,HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException {
|
||||
|
||||
try {
|
||||
|
||||
PageLog<DkBehaviorLog> page = new PageLog<DkBehaviorLog>(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_DKBEHAVIOR_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
|
||||
Gson gson = new GsonBuilder().create();
|
||||
//gson泛型支持
|
||||
LogRecvData<DkBehaviorLog> fromJson = gson.fromJson(jsonString, new TypeToken<LogRecvData<DkBehaviorLog>>(){}.getType());
|
||||
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
Page<DkBehaviorLog> data = fromJson.getData();
|
||||
page.setList(data.getList());
|
||||
List<DkBehaviorLog> list = page.getList();
|
||||
for (DkBehaviorLog 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/manipulation/dkBehaviorList";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
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.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/mmAvIpLogs")
|
||||
public class MmAvIpLogController extends BaseController{
|
||||
|
||||
/**
|
||||
* 音视频url日志
|
||||
* @param model
|
||||
* @param entry
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
* @throws ClientProtocolException
|
||||
* @throws IOException
|
||||
*/
|
||||
@RequestMapping(value={"list",""})
|
||||
public String list(Model model,@ModelAttribute("log")MmAvIpLog entry,HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException {
|
||||
|
||||
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_MMAVIP_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("查询音视频IP日志成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("查询音视频IP日志失败", e);
|
||||
addMessage(model, e.getMessage());
|
||||
}
|
||||
return "/log/ntc/mmAvIpList";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
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.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.MmAvUrlLog;
|
||||
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/mmAvUrlLogs")
|
||||
public class MmAvUrlLogController extends BaseController{
|
||||
|
||||
/**
|
||||
* 音视频url日志
|
||||
* @param model
|
||||
* @param entry
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
* @throws ClientProtocolException
|
||||
* @throws IOException
|
||||
*/
|
||||
@RequestMapping(value={"list",""})
|
||||
public String list(Model model,@ModelAttribute("log")MmAvUrlLog entry,HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException {
|
||||
|
||||
try {
|
||||
|
||||
PageLog<MmAvUrlLog> page = new PageLog<MmAvUrlLog>(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_MMAVURL_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
|
||||
Gson gson = new GsonBuilder().create();
|
||||
//gson泛型支持
|
||||
LogRecvData<MmAvUrlLog> fromJson = gson.fromJson(jsonString, new TypeToken<LogRecvData<MmAvUrlLog>>(){}.getType());
|
||||
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
Page<MmAvUrlLog> data = fromJson.getData();
|
||||
page.setList(data.getList());
|
||||
List<MmAvUrlLog> list = page.getList();
|
||||
for (MmAvUrlLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询音视频url日志成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("查询音视频url日志失败", e);
|
||||
addMessage(model, e.getMessage());
|
||||
}
|
||||
return "/log/ntc/mmAvUrlList";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
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.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/mmVoipLogs")
|
||||
public class MmVoipLogController extends BaseController{
|
||||
|
||||
/**
|
||||
* @param model
|
||||
* @param entry
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
* @throws ClientProtocolException
|
||||
* @throws IOException
|
||||
*/
|
||||
@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 = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_MMVOIP_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
|
||||
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/mmVoipList";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user