Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
brandkbs2
Overview
Overview
Details
Activity
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
shenjunjie
brandkbs2
Commits
574c80df
Commit
574c80df
authored
Feb 17, 2023
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
Feature See merge request
!219
parents
5231cd72
4f64fde4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
pom.xml
+1
-1
src/main/java/com/zhiwei/brandkbs2/aop/AopLogRecord.java
+10
-6
src/main/java/com/zhiwei/brandkbs2/pojo/Project.java
+1
-1
src/main/java/com/zhiwei/brandkbs2/pojo/vo/ProjectVO.java
+1
-2
No files found.
pom.xml
View file @
574c80df
...
...
@@ -35,7 +35,7 @@
<dubbo.version>
2.7.4.1
</dubbo.version>
<curator.version>
2.12.0
</curator.version>
<push.log.version>
2.17.0-SNAPSHOT
</push.log.version>
<event-client.version>
1.0.
5
-SNAPSHOT
</event-client.version>
<event-client.version>
1.0.
7
-SNAPSHOT
</event-client.version>
</properties>
<dependencies>
...
...
src/main/java/com/zhiwei/brandkbs2/aop/AopLogRecord.java
View file @
574c80df
...
...
@@ -14,7 +14,6 @@ import org.aspectj.lang.annotation.Before;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.context.request.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.servlet.HandlerMapping
;
...
...
@@ -22,12 +21,9 @@ import org.springframework.web.servlet.HandlerMapping;
import
javax.annotation.Resource
;
import
javax.servlet.ServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.lang.annotation.Annotation
;
import
java.lang.reflect.Method
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
java
.
util
.
Objects
.
nonNull
;
...
...
@@ -74,8 +70,16 @@ public class AopLogRecord {
// 前后台,false:前台,true:后台
boolean
backstage
=
uri
.
contains
(
"admin"
);
if
(!(
Tools
.
isNullOrUndefined
(
request
.
getHeader
(
jwtKey
))
||
Tools
.
isNullOrUndefined
(
request
.
getHeader
(
"pid"
))))
{
// 用户信息
String
userId
=
JwtUtil
.
unsign
(
request
.
getHeader
(
jwtKey
),
Map
.
class
).
get
(
GenericAttribute
.
USER_ID
).
toString
();
Map
<
String
,
Object
>
map
=
JwtUtil
.
unsign
(
request
.
getHeader
(
jwtKey
),
Map
.
class
);
if
(
null
==
map
)
{
return
;
}
Object
userIdObj
=
map
.
get
(
GenericAttribute
.
USER_ID
);
// 无用户信息不做记录
if
(
null
==
userIdObj
)
{
return
;
}
String
userId
=
userIdObj
.
toString
();
String
projectId
=
request
.
getHeader
(
"pid"
);
String
nickName
=
userService
.
queryUserInfo
(
userId
,
projectId
).
getNickname
();
// 请求地址和服务器地址
...
...
src/main/java/com/zhiwei/brandkbs2/pojo/Project.java
View file @
574c80df
...
...
@@ -115,7 +115,7 @@ public class Project extends AbstractProject {
projectVO
.
setNegativeChannelParams
(
this
.
getNegativeChannelParams
());
projectVO
.
setPositiveChannelParams
(
this
.
getPositiveChannelParams
());
projectVO
.
setBlackChannelGroup
(
this
.
getBlackChannelGroup
());
projectVO
.
setMergeSensitive
(
true
);
return
projectVO
;
}
...
...
src/main/java/com/zhiwei/brandkbs2/pojo/vo/ProjectVO.java
View file @
574c80df
...
...
@@ -73,8 +73,7 @@ public class ProjectVO {
* 是否包含敏感
*/
@ApiModelProperty
(
"是否包含敏感"
)
private
boolean
isMergeSensitive
;
;
private
boolean
isMergeSensitive
=
true
;
/**
* 命中标签
*/
...
...
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