Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DuibaTestToolV2.1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵然
DuibaTestToolV2.1
Commits
70fb5cef
Commit
70fb5cef
authored
Jun 22, 2020
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
dca02c34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
LogModule.java
src/main/com/atguigu/springmvc/handlers/LogModule.java
+13
-7
No files found.
src/main/com/atguigu/springmvc/handlers/LogModule.java
View file @
70fb5cef
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
Lis
t
risklog
(
HttpServletRequest
request
)
throws
Exception
{
public
JSONObjec
t
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
Lis
t
burylog
(
HttpServletRequest
request
)
throws
Exception
{
public
JSONObjec
t
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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment