1.日志检索增加音视频IP,url 2.日志页面修改service 为action
This commit is contained in:
@@ -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