捕捉异常后增加记录异常日志的操作
This commit is contained in:
@@ -45,6 +45,7 @@ import com.nis.util.CodeDicUtils;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.LogUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.excel.ExportExcel;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
@@ -80,7 +81,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="portActive")
|
||||
@ResponseBody
|
||||
public List portActive(){
|
||||
public List portActive(HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
try {
|
||||
@@ -94,6 +95,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("活跃端口数据错误"+e);
|
||||
list.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@@ -103,7 +105,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="portActiveChart")
|
||||
@ResponseBody
|
||||
public List portActiveChart(String beginDate,String endDate){
|
||||
public List portActiveChart(String beginDate,String endDate,HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
try {
|
||||
@@ -120,6 +122,7 @@ public class DashboardController extends BaseController{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
logger.error("活跃端口详情界面数据获取错误"+e);
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@@ -145,7 +148,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="ipActive")
|
||||
@ResponseBody
|
||||
public List ipActive(String beginDate,String endDate){
|
||||
public List ipActive(String beginDate,String endDate,HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
try {
|
||||
@@ -161,6 +164,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("活跃IP错误"+e);
|
||||
list.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@@ -169,7 +173,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="ipActiveMinuteList")
|
||||
@ResponseBody
|
||||
public List ipActiveMinuteList(String beginDate,String endDate,Integer entranceId){
|
||||
public List ipActiveMinuteList(String beginDate,String endDate,Integer entranceId,HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
try {
|
||||
@@ -188,6 +192,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("活跃IP数据获取错误"+e);
|
||||
list.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@@ -238,6 +243,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("活跃IP统计错误"+e);
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
|
||||
return "/dashboard/trafficIpActiveList";
|
||||
@@ -247,7 +253,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="ajaxIpActiveList")
|
||||
@ResponseBody
|
||||
public List ajaxIpActiveList(String beginDate,String endDate,Integer entranceId){
|
||||
public List ajaxIpActiveList(String beginDate,String endDate,Integer entranceId,HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List<TrafficIpActiveStatistic> list = new ArrayList<TrafficIpActiveStatistic>();
|
||||
try {
|
||||
@@ -294,6 +300,7 @@ public class DashboardController extends BaseController{
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("活跃IP数据获取错误"+e);
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
//list.add(Maps.newHashMap("error","request_service_failed"));
|
||||
}
|
||||
return list;
|
||||
@@ -341,6 +348,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("IPActive export failed",e);
|
||||
addMessage(redirectAttributes,"error","export_failed");
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
// return "/dashboard/trafficIpActiveList";
|
||||
}
|
||||
@@ -349,7 +357,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="protocol")
|
||||
@ResponseBody
|
||||
public List protocolChart(){
|
||||
public List protocolChart(HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List<Map> list = new ArrayList<Map>();
|
||||
List<Map> resultList = new ArrayList<Map>();
|
||||
@@ -389,6 +397,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("协议统计错误"+e);
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
@@ -397,7 +406,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="app")
|
||||
@ResponseBody
|
||||
public List appChart(){
|
||||
public List appChart(HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List<Map> list = new ArrayList<Map>();
|
||||
List<Map> resultList = new ArrayList<Map>();
|
||||
@@ -428,6 +437,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("app流量分析错误"+e);
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
@@ -436,7 +446,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="osList")
|
||||
@ResponseBody
|
||||
public List osList(){
|
||||
public List osList(HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List<Map> list = new ArrayList<Map>();
|
||||
List<Map> resultList = new ArrayList<Map>();
|
||||
@@ -467,6 +477,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("终端用户-获取操作系统列表错误"+e);
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
@@ -475,7 +486,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="browserChart")
|
||||
@ResponseBody
|
||||
public List browserChart(@RequestParam("osType") String osType){
|
||||
public List browserChart(@RequestParam("osType") String osType,HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List<Map> list = new ArrayList<Map>();
|
||||
List<Map> resultList = new ArrayList<Map>();
|
||||
@@ -524,6 +535,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("终端用户-获取操作系统下浏览器类型错误"+e);
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
@@ -532,7 +544,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="bsList")
|
||||
@ResponseBody
|
||||
public List bsList(){
|
||||
public List bsList(HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List<Map> list = new ArrayList<Map>();
|
||||
List<Map> resultList = new ArrayList<Map>();
|
||||
@@ -563,6 +575,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("终端用户-获取浏览器列表错误"+e);
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
@@ -571,7 +584,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="systemChart")
|
||||
@ResponseBody
|
||||
public List systemChart(@RequestParam("bsType") String bsType){
|
||||
public List systemChart(@RequestParam("bsType") String bsType,HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List<Map> list = new ArrayList<Map>();
|
||||
List<Map> resultList = new ArrayList<Map>();
|
||||
@@ -620,6 +633,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("终端用户-获取浏览器下操作系统类型错误"+e);
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
@@ -628,7 +642,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="websiteList")
|
||||
@ResponseBody
|
||||
public List websiteList(){
|
||||
public List websiteList(HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List<Map> list = new ArrayList<Map>();
|
||||
List<Map> resultList = new ArrayList<Map>();
|
||||
@@ -665,6 +679,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("http网站流量分析数据错误:"+e);
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
@@ -673,7 +688,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="webTypeChart")
|
||||
@ResponseBody
|
||||
public List webTypeChart(@RequestParam("websiteServiceId") String websiteServiceId){
|
||||
public List webTypeChart(@RequestParam("websiteServiceId") String websiteServiceId,HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List<Map> list = new ArrayList<Map>();
|
||||
List<Map> resultList = new ArrayList<Map>();
|
||||
@@ -715,6 +730,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("http某个网站子域名流量统计错误"+e);
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
@@ -724,7 +740,7 @@ public class DashboardController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value="topicAndDomainList")
|
||||
@ResponseBody
|
||||
public List topicAndDomainList(){
|
||||
public List topicAndDomainList(HttpServletRequest request){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List<Map> list = new ArrayList<Map>();
|
||||
List<Map> resultList = new ArrayList<Map>();
|
||||
@@ -782,6 +798,7 @@ public class DashboardController extends BaseController{
|
||||
e.printStackTrace();
|
||||
logger.error("http网站主题流量分析数据错误:"+e);
|
||||
resultList.add(Maps.newHashMap("error","request_service_failed"));
|
||||
LogUtils.saveLog(request, null, e, null);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user