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
3c32fd63
Commit
3c32fd63
authored
Jan 04, 2023
by
陈健智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增事件详情-持续事件,新事件详情页不鉴权拦截
parent
496fa742
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
2 deletions
+25
-2
src/main/java/com/zhiwei/brandkbs2/controller/app/AppEventController.java
+7
-0
src/main/java/com/zhiwei/brandkbs2/interceptor/InterceptorConfig.java
+1
-1
src/main/java/com/zhiwei/brandkbs2/service/EventService.java
+6
-0
src/main/java/com/zhiwei/brandkbs2/service/impl/EventServiceImpl.java
+10
-0
src/main/resources/application-local.properties
+1
-1
No files found.
src/main/java/com/zhiwei/brandkbs2/controller/app/AppEventController.java
View file @
3c32fd63
...
@@ -249,4 +249,11 @@ public class AppEventController extends BaseController {
...
@@ -249,4 +249,11 @@ public class AppEventController extends BaseController {
@RequestParam
(
value
=
"aggTitle"
,
required
=
false
)
String
aggTitle
){
@RequestParam
(
value
=
"aggTitle"
,
required
=
false
)
String
aggTitle
){
return
ResponseResult
.
success
(
eventService
.
eventTopArticlesAnalysis
(
eventId
,
type
,
emotion
,
aggTitle
));
return
ResponseResult
.
success
(
eventService
.
eventTopArticlesAnalysis
(
eventId
,
type
,
emotion
,
aggTitle
));
}
}
@ApiOperation
(
"前台事件库-事件详情-持续事件"
)
@GetMapping
(
"/detail/continue-event"
)
public
ResponseResult
continueEvent
(
@RequestParam
(
value
=
"eventId"
)
String
eventId
){
eventService
.
continueEvent
(
eventId
);
return
ResponseResult
.
success
();
}
}
}
src/main/java/com/zhiwei/brandkbs2/interceptor/InterceptorConfig.java
View file @
3c32fd63
...
@@ -22,6 +22,6 @@ public class InterceptorConfig implements WebMvcConfigurer {
...
@@ -22,6 +22,6 @@ public class InterceptorConfig implements WebMvcConfigurer {
@Override
@Override
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
// 自定义拦截器,添加拦截路径和排除拦截路径
// 自定义拦截器,添加拦截路径和排除拦截路径
registry
.
addInterceptor
(
mainAuthInterceptor
).
addPathPatterns
(
"/app/**"
,
"/admin/**"
).
excludePathPatterns
();
registry
.
addInterceptor
(
mainAuthInterceptor
).
addPathPatterns
(
"/app/**"
,
"/admin/**"
).
excludePathPatterns
(
"/app/event/detail/**"
);
}
}
}
}
src/main/java/com/zhiwei/brandkbs2/service/EventService.java
View file @
3c32fd63
...
@@ -394,4 +394,10 @@ public interface EventService {
...
@@ -394,4 +394,10 @@ public interface EventService {
* @return
* @return
*/
*/
JSONObject
eventTopArticlesAnalysis
(
String
eventId
,
String
type
,
String
emotion
,
String
aggTitle
);
JSONObject
eventTopArticlesAnalysis
(
String
eventId
,
String
type
,
String
emotion
,
String
aggTitle
);
/**
* 持续事件
* @param eventId 事件id
*/
void
continueEvent
(
String
eventId
);
}
}
src/main/java/com/zhiwei/brandkbs2/service/impl/EventServiceImpl.java
View file @
3c32fd63
...
@@ -863,6 +863,16 @@ public class EventServiceImpl implements EventService {
...
@@ -863,6 +863,16 @@ public class EventServiceImpl implements EventService {
return
eventClient
.
eventTopArticlesAnalysis
(
eventId
,
type
,
emotion
,
aggTitle
);
return
eventClient
.
eventTopArticlesAnalysis
(
eventId
,
type
,
emotion
,
aggTitle
);
}
}
@Override
public
void
continueEvent
(
String
eventId
)
{
ServletRequestAttributes
requestAttributes
=
(
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
();
HttpServletRequest
request
=
Objects
.
requireNonNull
(
requestAttributes
).
getRequest
();
String
submitterId
=
JwtUtil
.
unsign
(
request
.
getHeader
(
jwtKey
),
Map
.
class
).
get
(
GenericAttribute
.
USER_ID
).
toString
();
String
submitter
=
userService
.
queryUserInfo
(
submitterId
,
UserThreadLocal
.
getProjectId
()).
getNickname
();
eventClient
.
continueEvent
(
eventId
,
submitter
,
submitterId
);
}
@Data
@Data
public
static
class
MongoQueryUtil
{
public
static
class
MongoQueryUtil
{
...
...
src/main/resources/application-local.properties
View file @
3c32fd63
...
@@ -52,7 +52,7 @@ mark.registry.address=zookeeper://192.168.0.11:2181?backup=192.168.0.30:2181,192
...
@@ -52,7 +52,7 @@ mark.registry.address=zookeeper://192.168.0.11:2181?backup=192.168.0.30:2181,192
mark.provider.group
=
zhiwei-mark-test_liuyu
mark.provider.group
=
zhiwei-mark-test_liuyu
#\u4E8B\u4EF6\u4E2D\u95F4\u4EF6
#\u4E8B\u4EF6\u4E2D\u95F4\u4EF6
event.registry.address
=
zookeeper://192.168.0.11:2181?backup=192.168.0.30:2181,192.168.0.35:2181
event.registry.address
=
zookeeper://192.168.0.11:2181?backup=192.168.0.30:2181,192.168.0.35:2181
event.provider.group
=
zhiwei-event
event.provider.group
=
zhiwei-event
-ygd
#\u7528\u6237\u4E2D\u5FC3
#\u7528\u6237\u4E2D\u5FC3
auth.center.client.consumer.group
=
zhiwei-auth-dev-liuyu
auth.center.client.consumer.group
=
zhiwei-auth-dev-liuyu
auth.center.client.registry.address
=
zookeeper://192.168.0.11:2181?backup=192.168.0.30:2181,192.168.0.35:2181
auth.center.client.registry.address
=
zookeeper://192.168.0.11:2181?backup=192.168.0.30:2181,192.168.0.35:2181
...
...
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