Commit 70fb5cef authored by 赵然's avatar 赵然

zr

parent dca02c34
package main.com.atguigu.springmvc.handlers; package main.com.atguigu.springmvc.handlers;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import io.restassured.response.Response; import io.restassured.response.Response;
import main.com.atguigu.springmvc.common.MatcherString; import main.com.atguigu.springmvc.common.MatcherString;
import main.com.atguigu.springmvc.service.AccountService; import main.com.atguigu.springmvc.service.AccountService;
...@@ -34,8 +35,10 @@ public class LogModule { ...@@ -34,8 +35,10 @@ public class LogModule {
final Base64.Decoder decoder = Base64.getDecoder(); final Base64.Decoder decoder = Base64.getDecoder();
private String filepathRisk = "E:\\test_appendfile.txt" ; private String filepathRisk = "/mnt/test/tomcat-TestTool/data/filepathRisk.txt" ;
private String filepathBury = "E:\\test_appendfile2.txt" ; private String filepathBury = "/mnt/test/tomcat-TestTool/data/filepathBury.txt" ;
// private String filepathRisk = "E:\\filepathRisk.txt" ;
// private String filepathBury = "E:\\filepathBury.txt" ;
/** /**
* 功能:查询风控日志 * 功能:查询风控日志
...@@ -43,7 +46,7 @@ public class LogModule { ...@@ -43,7 +46,7 @@ public class LogModule {
*/ */
@RequestMapping(value = "/risklog", method= RequestMethod.POST) @RequestMapping(value = "/risklog", method= RequestMethod.POST)
@ResponseBody @ResponseBody
public List risklog(HttpServletRequest request) throws Exception { public JSONObject risklog(HttpServletRequest request) throws Exception {
String projectId = request.getParameter("projectId"); String projectId = request.getParameter("projectId");
//根据项目id找到project_id_num //根据项目id找到project_id_num
...@@ -89,7 +92,7 @@ public class LogModule { ...@@ -89,7 +92,7 @@ public class LogModule {
// System.out.println(lineNUmber+" "+str);//输出每一行的行数和内容 // System.out.println(lineNUmber+" "+str);//输出每一行的行数和内容
// } // }
// bfr.close(); // bfr.close();
JSONObject out = new JSONObject();
List list = new ArrayList(); List list = new ArrayList();
Pattern r= Pattern.compile(word1); Pattern r= Pattern.compile(word1);
...@@ -106,7 +109,8 @@ public class LogModule { ...@@ -106,7 +109,8 @@ public class LogModule {
break; break;
} }
} }
return list; out.put("riskdata",list);
return out;
} }
/** /**
...@@ -115,7 +119,7 @@ public class LogModule { ...@@ -115,7 +119,7 @@ public class LogModule {
*/ */
@RequestMapping(value = "/burylog", method= RequestMethod.POST) @RequestMapping(value = "/burylog", method= RequestMethod.POST)
@ResponseBody @ResponseBody
public List burylog(HttpServletRequest request) throws Exception { public JSONObject burylog(HttpServletRequest request) throws Exception {
String userId = request.getParameter("uid"); String userId = request.getParameter("uid");
String projectId = request.getParameter("projectId"); String projectId = request.getParameter("projectId");
String type = request.getParameter("type"); String type = request.getParameter("type");
...@@ -172,6 +176,7 @@ public class LogModule { ...@@ -172,6 +176,7 @@ public class LogModule {
// System.out.println(lineNUmber+" "+str);//输出每一行的行数和内容 // System.out.println(lineNUmber+" "+str);//输出每一行的行数和内容
// } // }
// bfr.close(); // bfr.close();
JSONObject out = new JSONObject();
List list = new ArrayList(); List list = new ArrayList();
Pattern r= Pattern.compile(word1+word2+word3); Pattern r= Pattern.compile(word1+word2+word3);
...@@ -189,7 +194,8 @@ public class LogModule { ...@@ -189,7 +194,8 @@ public class LogModule {
break; break;
} }
} }
return list; out.put("burydata",list);
return out;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment