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
a8d2485a
Commit
a8d2485a
authored
Mar 09, 2023
by
陈健智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
事件详情页面高频渠道发声、词云、上榜热搜,新增词云外部接口
parent
1167b57a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
6 deletions
+50
-6
pom.xml
+1
-1
src/main/java/com/zhiwei/brandkbs2/controller/InterfaceController.java
+12
-0
src/main/java/com/zhiwei/brandkbs2/controller/app/AppEventController.java
+8
-1
src/main/java/com/zhiwei/brandkbs2/dao/EventMiddlewareDao.java
+8
-4
src/main/java/com/zhiwei/brandkbs2/dao/impl/EventMiddlewareDaoImpl.java
+6
-0
src/main/java/com/zhiwei/brandkbs2/service/EventService.java
+8
-0
src/main/java/com/zhiwei/brandkbs2/service/impl/EventServiceImpl.java
+7
-0
No files found.
pom.xml
View file @
a8d2485a
...
...
@@ -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.
7
-SNAPSHOT
</event-client.version>
<event-client.version>
1.0.
8
-SNAPSHOT
</event-client.version>
</properties>
<dependencies>
...
...
src/main/java/com/zhiwei/brandkbs2/controller/InterfaceController.java
View file @
a8d2485a
...
...
@@ -9,8 +9,10 @@ import com.zhiwei.brandkbs2.pojo.external.BrandkbsYuQingConfig;
import
com.zhiwei.brandkbs2.pojo.vo.CrisisCaseWarnVO
;
import
com.zhiwei.brandkbs2.service.ProjectService
;
import
com.zhiwei.brandkbs2.service.ProjectWarnService
;
import
com.zhiwei.brandkbs2.util.TextUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
...
...
@@ -33,6 +35,9 @@ public class InterfaceController {
@Resource
(
name
=
"projectWarnServiceImpl"
)
private
ProjectWarnService
projectWarnService
;
@Autowired
TextUtil
textUtil
;
@ApiOperation
(
"获取项目预警详细信息"
)
@GetMapping
(
"/getProjectWarnCriteria"
)
public
ResponseResult
getProjectWarnCriteria
(
String
projectId
,
String
type
)
{
...
...
@@ -101,4 +106,11 @@ public class InterfaceController {
public
ResponseResult
getHitTagsByLinkedGroupId
(
String
linkedGroupId
)
{
return
projectService
.
getHitTagsByLinkedGroupId
(
linkedGroupId
);
}
@ApiOperation
(
"获取事件详情页面词云(事件中间件项目调用)"
)
@PostMapping
(
"/highWord"
)
public
ResponseResult
getEventDataHighWord
(
@RequestBody
String
texts
){
List
<
String
>
list
=
JSONObject
.
parseObject
(
texts
).
getJSONArray
(
"texts"
).
toJavaList
(
String
.
class
);
return
ResponseResult
.
success
(
textUtil
.
getHighWordsJson
(
list
,
30
));
}
}
src/main/java/com/zhiwei/brandkbs2/controller/app/AppEventController.java
View file @
a8d2485a
...
...
@@ -238,7 +238,7 @@ public class AppEventController extends BaseController {
public
ResponseResult
eventChannelVoices
(
@RequestParam
(
value
=
"eventId"
)
String
eventId
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"重要渠道"
)
String
type
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"
5
0"
)
int
pageSize
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"
1
0"
)
int
pageSize
,
@RequestParam
(
value
=
"sorter"
,
required
=
false
)
String
sorter
){
return
ResponseResult
.
success
(
eventService
.
eventChannelVoices
(
eventId
,
type
,
page
,
pageSize
,
sorter
));
}
...
...
@@ -253,6 +253,13 @@ public class AppEventController extends BaseController {
return
ResponseResult
.
success
(
eventService
.
eventTopArticlesAnalysis
(
eventId
,
type
,
emotion
,
aggTitle
));
}
@ApiOperation
(
"前台事件库-事件详情-热门渠道发声、上榜热搜、词云"
)
@GetMapping
(
"/detail/additional-info"
)
@Auth
(
role
=
RoleEnum
.
NO_AUTHORISE
)
public
ResponseResult
eventDetailAdditionalInfo
(
@RequestParam
(
value
=
"eventId"
)
String
eventId
){
return
ResponseResult
.
success
(
eventService
.
eventDetailAdditionalInfo
(
eventId
));
}
@ApiOperation
(
"前台事件库-事件详情-持续事件"
)
@GetMapping
(
"/detail/continue-event"
)
public
ResponseResult
continueEvent
(
@RequestParam
(
value
=
"eventId"
)
String
eventId
){
...
...
src/main/java/com/zhiwei/brandkbs2/dao/EventMiddlewareDao.java
View file @
a8d2485a
...
...
@@ -7,10 +7,7 @@ import com.zhiwei.middleware.event.pojo.dto.BrandkbsEventSearchDTO;
import
com.zhiwei.middleware.event.pojo.dto.EventBaseInfoDTO
;
import
com.zhiwei.middleware.event.pojo.dto.EventDTO
;
import
com.zhiwei.middleware.event.pojo.dto.EventTagRelatedDTO
;
import
com.zhiwei.middleware.event.pojo.entity.BrandkbsBasicInfo
;
import
com.zhiwei.middleware.event.pojo.entity.Event
;
import
com.zhiwei.middleware.event.pojo.entity.EventData
;
import
com.zhiwei.middleware.event.pojo.entity.EventDisseminationTrend
;
import
com.zhiwei.middleware.event.pojo.entity.*
;
import
com.zhiwei.middleware.event.pojo.vo.EventListInfoVO
;
import
com.zhiwei.middleware.event.pojo.vo.EventVO
;
...
...
@@ -299,4 +296,11 @@ public interface EventMiddlewareDao {
* @return
*/
ReturnData
getEventTagGroupInfoBrandkbsWithoutEmotion
(
String
projectId
);
/**
* 事件详情页面高频渠道发声、词云、上榜热搜
* @param eventId 事件id
* @return EventDetailAdditionalInfo
*/
EventDetailAdditionalInfo
eventDetailAdditionalInfo
(
String
eventId
);
}
src/main/java/com/zhiwei/brandkbs2/dao/impl/EventMiddlewareDaoImpl.java
View file @
a8d2485a
...
...
@@ -13,6 +13,7 @@ import com.zhiwei.middleware.event.pojo.dto.EventDTO;
import
com.zhiwei.middleware.event.pojo.dto.EventTagRelatedDTO
;
import
com.zhiwei.middleware.event.pojo.entity.BrandkbsBasicInfo
;
import
com.zhiwei.middleware.event.pojo.entity.Event
;
import
com.zhiwei.middleware.event.pojo.entity.EventDetailAdditionalInfo
;
import
com.zhiwei.middleware.event.pojo.entity.EventDisseminationTrend
;
import
com.zhiwei.middleware.event.pojo.vo.EventListInfoVO
;
import
com.zhiwei.middleware.event.pojo.vo.EventVO
;
...
...
@@ -204,4 +205,9 @@ public class EventMiddlewareDaoImpl implements EventMiddlewareDao {
public
ReturnData
getEventTagGroupInfoBrandkbsWithoutEmotion
(
String
projectId
)
{
return
eventTagClient
.
getEventTagGroupInfoBrandkbsWithoutEmotion
(
projectId
);
}
@Override
public
EventDetailAdditionalInfo
eventDetailAdditionalInfo
(
String
eventId
)
{
return
eventClient
.
eventDetailAdditionalInfo
(
eventId
);
}
}
src/main/java/com/zhiwei/brandkbs2/service/EventService.java
View file @
a8d2485a
...
...
@@ -18,6 +18,7 @@ import com.zhiwei.middleware.event.pojo.ReturnData;
import
com.zhiwei.middleware.event.pojo.dto.BrandkbsEventSearchDTO
;
import
com.zhiwei.middleware.event.pojo.dto.EventBaseInfoDTO
;
import
com.zhiwei.middleware.event.pojo.dto.EventDTO
;
import
com.zhiwei.middleware.event.pojo.entity.EventDetailAdditionalInfo
;
import
com.zhiwei.middleware.event.pojo.vo.EventTagBrandkbsVO
;
import
org.apache.commons.lang3.tuple.Pair
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -410,6 +411,13 @@ public interface EventService {
JSONObject
eventTopArticlesAnalysis
(
String
eventId
,
String
type
,
String
emotion
,
String
aggTitle
);
/**
* 事件详情页面高频渠道发声、词云、上榜热搜
* @param eventId 事件id
* @return EventDetailAdditionalInfo
*/
EventDetailAdditionalInfo
eventDetailAdditionalInfo
(
String
eventId
);
/**
* 持续事件
* @param eventId 事件id
*/
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/EventServiceImpl.java
View file @
a8d2485a
...
...
@@ -42,6 +42,7 @@ import com.zhiwei.middleware.event.pojo.dto.BrandkbsEventSearchDTO;
import
com.zhiwei.middleware.event.pojo.dto.EventBaseInfoDTO
;
import
com.zhiwei.middleware.event.pojo.dto.EventDTO
;
import
com.zhiwei.middleware.event.pojo.entity.BrandkbsBasicInfo
;
import
com.zhiwei.middleware.event.pojo.entity.EventDetailAdditionalInfo
;
import
com.zhiwei.middleware.event.pojo.vo.EventTagBrandkbsVO
;
import
lombok.Data
;
import
org.apache.commons.collections4.CollectionUtils
;
...
...
@@ -763,6 +764,7 @@ public class EventServiceImpl implements EventService {
@Override
public
PageData
<
com
.
zhiwei
.
middleware
.
event
.
pojo
.
vo
.
EventListInfoVO
>
getEventListMiddleware
(
BrandkbsEventSearchDTO
dto
)
{
dto
.
setProjectId
(
UserThreadLocal
.
getProjectId
());
if
(
Constant
.
PRIMARY_CONTEND_ID
.
equals
(
dto
.
getBrandId
())){
dto
.
setBrandId
(
UserThreadLocal
.
getProjectId
());
}
...
...
@@ -863,6 +865,11 @@ public class EventServiceImpl implements EventService {
}
@Override
public
EventDetailAdditionalInfo
eventDetailAdditionalInfo
(
String
eventId
)
{
return
eventMiddlewareDao
.
eventDetailAdditionalInfo
(
eventId
);
}
@Override
public
void
continueEvent
(
String
eventId
)
{
ServletRequestAttributes
requestAttributes
=
(
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
();
HttpServletRequest
request
=
Objects
.
requireNonNull
(
requestAttributes
).
getRequest
();
...
...
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