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
874161bb
Commit
874161bb
authored
May 16, 2023
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
Feature See merge request
!323
parents
595bee8e
7c784a89
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
230 additions
and
122 deletions
+230
-122
pom.xml
+1
-1
src/main/java/com/zhiwei/brandkbs2/aop/AopLogRecord.java
+7
-2
src/main/java/com/zhiwei/brandkbs2/common/ChannelType.java
+1
-1
src/main/java/com/zhiwei/brandkbs2/common/RedisKeyPrefix.java
+5
-0
src/main/java/com/zhiwei/brandkbs2/controller/app/AppArticleController.java
+2
-0
src/main/java/com/zhiwei/brandkbs2/controller/app/AppHotController.java
+57
-9
src/main/java/com/zhiwei/brandkbs2/controller/app/AppSearchController.java
+1
-0
src/main/java/com/zhiwei/brandkbs2/controller/mobile/MobileEventController.java
+54
-18
src/main/java/com/zhiwei/brandkbs2/controller/mobile/MobileSearchController.java
+8
-32
src/main/java/com/zhiwei/brandkbs2/dao/EventMiddlewareDao.java
+11
-0
src/main/java/com/zhiwei/brandkbs2/dao/impl/EventMiddlewareDaoImpl.java
+5
-0
src/main/java/com/zhiwei/brandkbs2/es/EsQueryTools.java
+15
-10
src/main/java/com/zhiwei/brandkbs2/pojo/dto/ExportSearchWholeDTO.java
+5
-1
src/main/java/com/zhiwei/brandkbs2/service/impl/BehaviorServiceImpl.java
+4
-3
src/main/java/com/zhiwei/brandkbs2/service/impl/EventServiceImpl.java
+1
-1
src/main/java/com/zhiwei/brandkbs2/service/impl/ProjectWarnServiceImpl.java
+15
-7
src/main/java/com/zhiwei/brandkbs2/service/impl/ReportServiceImpl.java
+35
-37
src/main/resources/application-dev.properties
+1
-0
src/main/resources/application-local.properties
+1
-0
src/main/resources/application-prod.properties
+1
-0
No files found.
pom.xml
View file @
874161bb
...
...
@@ -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.9.
3
-SNAPSHOT
</event-client.version>
<event-client.version>
1.0.9.
4
-SNAPSHOT
</event-client.version>
<cleaner-unified-filter.version>
1.1.5-SNAPSHOT
</cleaner-unified-filter.version>
</properties>
...
...
src/main/java/com/zhiwei/brandkbs2/aop/AopLogRecord.java
View file @
874161bb
...
...
@@ -62,6 +62,7 @@ public class AopLogRecord {
@AfterReturning
(
value
=
"execution(public * com..controller..admin..*Controller.*(..)) || execution(* com..controller..app..*Controller.*(..)) || execution(* com..controller..LoginController.checkBind())"
,
returning
=
"ResponseResult"
)
private
void
beforeLog
(
JoinPoint
joinPoint
,
ResponseResult
ResponseResult
){
String
pid
=
null
;
try
{
long
now
=
System
.
currentTimeMillis
();
// RequestContextHolder 顾名思义 持有 request 上下文的容器
...
...
@@ -85,8 +86,12 @@ public class AopLogRecord {
String
method
=
methodSignature
.
getMethod
().
getAnnotation
(
ApiOperation
.
class
).
value
();
// 前后台,false:前台,true:后台
boolean
backstage
=
uri
.
contains
(
"admin"
);
if
(!(
Tools
.
isNullOrUndefined
(
request
.
getHeader
(
jwtKey
))
||
Tools
.
isNullOrUndefined
(
request
.
getHeader
(
"pid"
))))
{
String
token
=
request
.
getHeader
(
jwtKey
);
pid
=
request
.
getHeader
(
"pid"
);
// 任意有一个不为空
if
(!(
Tools
.
isNullOrUndefined
(
token
)
||
Tools
.
isNullOrUndefined
(
pid
)))
{
Map
<
String
,
Object
>
map
=
JwtUtil
.
unsign
(
request
.
getHeader
(
jwtKey
),
Map
.
class
);
// 排除token过期或其他组合的可能性
if
(
null
==
map
)
{
return
;
}
...
...
@@ -116,7 +121,7 @@ public class AopLogRecord {
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"beforeLog
"
,
e
);
log
.
error
(
"beforeLog
,pid:{}"
,
pid
,
e
);
}
}
...
...
src/main/java/com/zhiwei/brandkbs2/common/ChannelType.java
View file @
874161bb
...
...
@@ -15,7 +15,7 @@ import java.util.List;
public
class
ChannelType
{
private
static
final
List
<
String
>
MAIN_BODY_TYPES
=
Arrays
.
asList
(
"媒体"
,
"团体"
,
"普通用户"
,
"企业"
,
"名人"
,
"政务机构"
);
p
rivate
static
final
List
<
String
>
POLITICS_LEVELS
=
Arrays
.
asList
(
"央级"
,
"省级"
,
"地级"
);
p
ublic
static
final
List
<
String
>
POLITICS_LEVELS
=
Arrays
.
asList
(
"央级"
,
"省级"
,
"地级"
);
private
static
final
List
<
String
>
FIELDS
=
Arrays
.
asList
(
"情感"
,
"综合"
,
"财经"
,
"家居"
,
"社会"
,
"时尚"
,
"文化"
,
"历史"
,
"母婴育儿"
,
"体育"
,
"娱乐"
,
"动漫"
,
"汽车"
,
"美食"
,
"健康养生"
,
"国际"
,
"音乐"
,
"游戏"
,
"科技"
,
"旅游"
,
"军事"
,
"时事"
,
"教育"
);
private
static
final
JSONArray
REGION
=
GlobalPojo
.
CHINA_AREA_TAGS
;
public
static
JSONObject
channelOption
=
new
JSONObject
();
...
...
src/main/java/com/zhiwei/brandkbs2/common/RedisKeyPrefix.java
View file @
874161bb
...
...
@@ -62,6 +62,7 @@ public class RedisKeyPrefix {
*/
public
static
final
String
HOT_RANK_LIST
=
"BRANDKBS:HOT:RANK_LIST:"
;
public
static
final
String
HOT_LIST
=
"BRANDKBS:HOT:LIST:"
;
public
static
final
String
HOT_KEYWORD
=
"BRANDKBS:HOT:KEYWORD:"
;
/**
* 项目简报报相关缓存KEY
...
...
@@ -120,6 +121,10 @@ public class RedisKeyPrefix {
return
RedisKeyPrefix
.
generateRedisKey
(
RedisKeyPrefix
.
EVENT_DATA_UPLOAD_PROGRESS
,
UserThreadLocal
.
getProjectId
(),
ticket
);
}
public
static
String
hotKeywordKey
(
String
projectId
)
{
return
RedisKeyPrefix
.
generateRedisKey
(
RedisKeyPrefix
.
HOT_KEYWORD
,
projectId
);
}
private
static
String
generateRedisKey
(
String
...
keys
)
{
Objects
.
requireNonNull
(
keys
);
boolean
contains
=
keys
[
0
].
endsWith
(
":"
);
...
...
src/main/java/com/zhiwei/brandkbs2/controller/app/AppArticleController.java
View file @
874161bb
...
...
@@ -76,6 +76,7 @@ public class AppArticleController extends BaseController {
@ApiOperation
(
"原始数据导出"
)
@PostMapping
(
value
=
"/origin/list/export"
)
@LogRecord
(
description
=
"舆情库-原始数据导出"
,
values
=
{
"startTime"
,
"endTime"
,
"keyword"
,
"platforms"
,
"searchField"
},
entity
=
true
,
arguments
=
true
)
public
ResponseResult
exportOriginList
(
@RequestBody
MarkSearchDTO
markSearchDTO
)
{
Pair
<
String
,
List
<
ExportAppYuqingDTO
>>
stringListPair
=
markDataService
.
downloadYuqingMarkList
(
markSearchDTO
);
EasyExcelUtil
.
download
(
stringListPair
.
getLeft
()
+
"_原始数据列表数据"
,
"sheet1"
,
ExportAppYuqingDTO
.
class
,
stringListPair
.
getRight
(),
response
);
...
...
@@ -155,6 +156,7 @@ public class AppArticleController extends BaseController {
@ApiOperation
(
"舆情导出"
)
@PostMapping
(
value
=
"/mark/list/export"
)
@LogRecord
(
description
=
"舆情库-有效舆情导出"
,
values
=
{
"startTime"
,
"endTime"
,
"customTags"
,
"field"
,
"keyword"
,
"politicsLevel"
,
"mainBodyType"
,
"platforms"
,
"region"
,
"tags"
},
entity
=
true
,
arguments
=
true
)
public
ResponseResult
exportYuqingMarkList
(
@RequestBody
MarkSearchDTO
markSearchDTO
)
{
Pair
<
String
,
List
<
ExportAppYuqingDTO
>>
stringListPair
=
markDataService
.
downloadYuqingMarkList
(
markSearchDTO
);
EasyExcelUtil
.
download
(
stringListPair
.
getLeft
()
+
"_舆情列表数据"
,
"sheet1"
,
ExportAppYuqingDTO
.
class
,
stringListPair
.
getRight
(),
response
);
...
...
src/main/java/com/zhiwei/brandkbs2/controller/app/AppHotController.java
View file @
874161bb
package
com
.
zhiwei
.
brandkbs2
.
controller
.
app
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zhiwei.brandkbs2.aop.LogRecord
;
import
com.zhiwei.brandkbs2.auth.Auth
;
...
...
@@ -12,24 +13,24 @@ import com.zhiwei.brandkbs2.enmus.RoleEnum;
import
com.zhiwei.brandkbs2.model.ResponseResult
;
import
com.zhiwei.brandkbs2.pojo.BaseMap
;
import
com.zhiwei.brandkbs2.service.MarkDataService
;
import
com.zhiwei.brandkbs2.service.ProjectService
;
import
com.zhiwei.brandkbs2.util.RedisUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
...
...
@@ -60,14 +61,61 @@ public class AppHotController extends BaseController {
private
RedisUtil
redisUtil
;
@Autowired
private
ProjectService
projectService
;
@Autowired
private
MarkDataService
markDataService
;
@Resource
(
name
=
"esSearchExecutor"
)
ThreadPoolTaskExecutor
executor
;
@Value
(
"${trends.getHotSearchFromEsInTimeAndTypeOrWord.url}"
)
private
String
hotSearchUrl
;
/**
* weibo 热搜
* weibo-topic 话题
* weibo-rise 预热
* zhihu 知乎
* toutiao 头条
* douyin 抖音
* bilibili-ranking B站
*/
@ApiOperation
(
"热点库-品牌热点-搜索"
)
@GetMapping
(
"/keyword/search"
)
public
ResponseResult
search
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"weibo"
)
String
type
,
@RequestParam
(
value
=
"sort"
,
defaultValue
=
"endTime"
)
String
sort
)
{
String
keywordStr
=
redisUtil
.
get
(
RedisKeyPrefix
.
hotKeywordKey
(
UserThreadLocal
.
getProjectId
()));
if
(
null
==
keywordStr
)
{
return
ResponseResult
.
success
();
}
String
keyword
=
StringUtils
.
join
(
JSONArray
.
parseArray
(
keywordStr
,
String
.
class
),
"|"
);
ResponseEntity
<
JSONObject
>
jsonObjectResponseEntity
=
restTemplate
.
getForEntity
(
hotSearchUrl
,
JSONObject
.
class
,
pageSize
,
page
,
type
,
keyword
,
sort
);
JSONObject
result
=
jsonObjectResponseEntity
.
getBody
();
if
(
Objects
.
nonNull
(
result
))
{
return
ResponseResult
.
success
(
result
);
}
else
{
return
ResponseResult
.
failure
(
"响应超时"
);
}
}
@ApiOperation
(
"热点库-品牌热点-关键词获取"
)
@GetMapping
(
"/keyword"
)
public
ResponseResult
getKeyword
()
{
String
keywordStr
=
redisUtil
.
get
(
RedisKeyPrefix
.
hotKeywordKey
(
UserThreadLocal
.
getProjectId
()));
if
(
null
==
keywordStr
)
{
return
ResponseResult
.
success
();
}
return
ResponseResult
.
success
(
JSONArray
.
parseArray
(
keywordStr
));
}
@ApiOperation
(
"热点库-品牌热点-关键词调整"
)
@PutMapping
(
"/keyword/update"
)
public
ResponseResult
updateKeyword
(
@RequestBody
JSONObject
json
)
{
JSONArray
list
=
json
.
getJSONArray
(
"list"
);
redisUtil
.
set
(
RedisKeyPrefix
.
hotKeywordKey
(
UserThreadLocal
.
getProjectId
()),
list
.
toJSONString
());
return
ResponseResult
.
success
();
}
/**
* weibo 热搜
* weibo-topic 话题
...
...
src/main/java/com/zhiwei/brandkbs2/controller/app/AppSearchController.java
View file @
874161bb
...
...
@@ -156,6 +156,7 @@ public class AppSearchController extends BaseController {
@ApiOperation
(
"搜索-全网搜-舆情导出"
)
@PostMapping
(
"/exportSearchWhole"
)
@LogRecord
(
description
=
"全网搜-舆情导出"
,
values
=
{
"startTime"
,
"endTime"
,
"fans"
,
"filterType"
,
"filterWords"
,
"search"
,
"keyword"
,
"platforms"
,
"sensitiveChannels"
,
"sourceKeyword"
},
entity
=
true
,
arguments
=
true
)
public
ResponseResult
exportSearchWhole
(
@RequestBody
SearchFilterDTO
dto
)
{
// 针对商业数据库做限制
if
(
2
==
projectService
.
getProjectById
(
UserThreadLocal
.
getProjectId
()).
getWholeSearchDataSource
())
{
...
...
src/main/java/com/zhiwei/brandkbs2/controller/mobile/MobileEventController.java
View file @
874161bb
package
com
.
zhiwei
.
brandkbs2
.
controller
.
mobile
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zhiwei.brandkbs2.auth.Auth
;
import
com.zhiwei.brandkbs2.auth.UserThreadLocal
;
import
com.zhiwei.brandkbs2.config.Constant
;
import
com.zhiwei.brandkbs2.controller.BaseController
;
import
com.zhiwei.brandkbs2.enmus.EmotionEnum
;
import
com.zhiwei.brandkbs2.enmus.EventTagEnum
;
import
com.zhiwei.brandkbs2.enmus.RoleEnum
;
import
com.zhiwei.brandkbs2.model.ResponseResult
;
import
com.zhiwei.brandkbs2.service.CommonService
;
import
com.zhiwei.brandkbs2.service.EventService
;
import
com.zhiwei.brandkbs2.service.ProjectService
;
import
com.zhiwei.middleware.event.pojo.dto.BrandkbsEventSearchDTO
;
import
com.zhiwei.middleware.
mark.vo.MarkerTag
;
import
com.zhiwei.middleware.
event.pojo.vo.EventTagBrandkbsVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
...
...
@@ -24,6 +22,8 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.annotation.Resource
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -41,12 +41,6 @@ public class MobileEventController extends BaseController {
@Resource
(
name
=
"eventServiceImpl"
)
private
EventService
eventService
;
@Resource
(
name
=
"commonServiceImpl"
)
private
CommonService
commonService
;
@Resource
(
name
=
"projectServiceImpl"
)
private
ProjectService
projectService
;
@ApiOperation
(
"移动端事件榜单"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"startTime"
,
value
=
"开始时间"
,
required
=
true
,
paramType
=
"query"
,
dataType
=
"long"
),
...
...
@@ -63,17 +57,59 @@ public class MobileEventController extends BaseController {
dto
.
setStartTime
(
startTime
);
dto
.
setEndTime
(
endTime
);
dto
.
setBrandId
(
brandId
);
// 按影响力降序
dto
.
setSorter
(
JSONObject
.
parseObject
(
"{\"influence\":\"descend\"}"
));
if
(
0
!=
emotion
)
{
List
<
EventTagBrandkbsVO
>
eventTags
=
eventService
.
getEventTagsCriteria
().
stream
()
.
filter
(
eventTag
->
Objects
.
equals
(
EventTagEnum
.
EVENT_ATTRIBUTE
.
getName
(),
eventTag
.
getGroupName
())).
collect
(
Collectors
.
toList
());
String
emotionName
=
EmotionEnum
.
state2Name
(
emotion
);
String
linkedGroupId
=
projectService
.
getProjectByContendId
(
UserThreadLocal
.
getProjectId
(),
Constant
.
PRIMARY_CONTEND_ID
).
getBrandLinkedGroupId
();
List
<
MarkerTag
>
tags
=
commonService
.
getEmotionTagsWithSort
(
UserThreadLocal
.
getProjectId
(),
linkedGroupId
);
tags
.
forEach
(
tag
->
{
if
(
tag
.
getName
().
equals
(
emotionName
))
{
dto
.
setEmotions
(
Collections
.
singletonList
(
tag
.
getUniqueId
()));
}
}
);
if
(
1
==
eventTags
.
size
())
{
eventTags
.
get
(
0
).
getTagMapList
().
forEach
(
tag
->
{
if
(
tag
.
get
(
"name"
).
equals
(
emotionName
))
{
dto
.
setEmotions
(
Collections
.
singletonList
(
String
.
valueOf
(
tag
.
get
(
"uniqueId"
))));
}
}
);
}
}
return
ResponseResult
.
success
(
eventService
.
getEventListMiddleware
(
dto
));
}
@ApiOperation
(
"移动端事件详情-事件基础信息"
)
@GetMapping
(
"/detail/baseInfo"
)
public
ResponseResult
eventBaseInfo
(
@RequestParam
(
value
=
"eventId"
)
String
eventId
){
return
ResponseResult
.
success
(
eventService
.
eventBaseInfo
(
eventId
));
}
@ApiOperation
(
"移动端事件详情-传播趋势图"
)
@GetMapping
(
"/detail/dissemination-trends"
)
public
ResponseResult
eventDisseminationTrends
(
@RequestParam
(
value
=
"eventId"
)
String
eventId
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"小时"
)
String
type
){
return
ResponseResult
.
success
(
eventService
.
eventDisseminationTrends
(
eventId
,
type
));
}
@ApiOperation
(
"移动端事件详情-渠道发声"
)
@GetMapping
(
"/detail/channel-voices"
)
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
=
"10"
)
int
pageSize
,
@RequestParam
(
value
=
"sorter"
,
required
=
false
)
String
sorter
,
@RequestParam
(
value
=
"aggregation"
,
required
=
false
)
Boolean
aggregation
){
return
ResponseResult
.
success
(
eventService
.
eventChannelVoices
(
eventId
,
type
,
page
,
pageSize
,
sorter
,
aggregation
));
}
@ApiOperation
(
"移动端事件详情-热门文章分析"
)
@GetMapping
(
"/detail/top-articles-analysis"
)
public
ResponseResult
eventTopArticlesAnalysis
(
@RequestParam
(
value
=
"eventId"
)
String
eventId
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"按时间"
)
String
type
,
@RequestParam
(
value
=
"emotion"
,
defaultValue
=
"全部"
)
String
emotion
,
@RequestParam
(
value
=
"aggTitle"
,
required
=
false
)
String
aggTitle
){
return
ResponseResult
.
success
(
eventService
.
eventTopArticlesAnalysis
(
eventId
,
type
,
emotion
,
aggTitle
));
}
@ApiOperation
(
"移动端事件详情-热门渠道发声、上榜热搜、词云"
)
@GetMapping
(
"/detail/additional-info"
)
public
ResponseResult
eventDetailAdditionalInfo
(
@RequestParam
(
value
=
"eventId"
)
String
eventId
){
return
ResponseResult
.
success
(
eventService
.
eventDetailAdditionalInfo
(
eventId
));
}
}
src/main/java/com/zhiwei/brandkbs2/controller/mobile/MobileSearchController.java
View file @
874161bb
...
...
@@ -2,15 +2,11 @@ package com.zhiwei.brandkbs2.controller.mobile;
import
com.alibaba.fastjson.JSONObject
;
import
com.zhiwei.brandkbs2.auth.Auth
;
import
com.zhiwei.brandkbs2.auth.UserThreadLocal
;
import
com.zhiwei.brandkbs2.config.Constant
;
import
com.zhiwei.brandkbs2.enmus.EmotionEnum
;
import
com.zhiwei.brandkbs2.enmus.RoleEnum
;
import
com.zhiwei.brandkbs2.model.ResponseResult
;
import
com.zhiwei.brandkbs2.pojo.dto.MarkSearchDTO
;
import
com.zhiwei.brandkbs2.service.*
;
import
com.zhiwei.middleware.event.pojo.dto.BrandkbsEventSearchDTO
;
import
com.zhiwei.middleware.mark.vo.MarkerTag
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
...
...
@@ -19,7 +15,6 @@ import org.springframework.web.bind.annotation.*;
import
javax.annotation.Resource
;
import
java.util.Collections
;
import
java.util.List
;
/**
* @author sjj
...
...
@@ -74,33 +69,15 @@ public class MobileSearchController {
return
ResponseResult
.
success
(
channelService
.
getChannelSearchCriteria
());
}
@ApiOperation
(
"移动端关键字搜索事件列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"page"
,
value
=
"页码"
,
required
=
false
,
defaultValue
=
"1"
,
paramType
=
"query"
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"size"
,
value
=
"每页记录数"
,
required
=
false
,
defaultValue
=
"10"
,
paramType
=
"query"
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"emotion"
,
value
=
"情感倾向"
,
required
=
false
,
defaultValue
=
"0"
,
paramType
=
"query"
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"keyword"
,
value
=
"关键字"
,
required
=
false
,
defaultValue
=
""
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/event"
)
public
ResponseResult
searchEventList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
page
,
@RequestParam
(
value
=
"size"
,
defaultValue
=
"10"
)
int
size
,
@RequestParam
(
value
=
"emotion"
,
defaultValue
=
"0"
)
int
emotion
,
@RequestParam
(
value
=
"keyword"
,
defaultValue
=
""
)
String
keyword
)
{
@ApiOperation
(
"搜索-前台事件库-搜索条件-新"
)
@GetMapping
(
"/event/criteria/{brandId}"
)
public
ResponseResult
getEventSearchCriteriaMiddleware
(
@PathVariable
String
brandId
){
return
ResponseResult
.
success
(
eventService
.
getEventListCriteria
(
brandId
));
}
BrandkbsEventSearchDTO
dto
=
new
BrandkbsEventSearchDTO
();
dto
.
setPage
(
page
);
dto
.
setPageSize
(
size
);
if
(
0
!=
emotion
)
{
String
emotionName
=
EmotionEnum
.
state2Name
(
emotion
);
String
linkedGroupId
=
projectService
.
getProjectByContendId
(
UserThreadLocal
.
getProjectId
(),
Constant
.
PRIMARY_CONTEND_ID
).
getBrandLinkedGroupId
();
List
<
MarkerTag
>
tags
=
commonService
.
getEmotionTagsWithSort
(
UserThreadLocal
.
getProjectId
(),
linkedGroupId
);
tags
.
forEach
(
tag
->
{
if
(
tag
.
getName
().
equals
(
emotionName
))
{
dto
.
setEmotions
(
Collections
.
singletonList
(
tag
.
getUniqueId
()));
}
});
}
dto
.
setKeyword
(
keyword
);
@ApiOperation
(
"移动端关键字搜索事件列表"
)
@PostMapping
(
"/event"
)
public
ResponseResult
searchEventList
(
@RequestBody
BrandkbsEventSearchDTO
dto
)
{
return
ResponseResult
.
success
(
eventService
.
getEventListMiddleware
(
dto
));
}
...
...
@@ -115,5 +92,4 @@ public class MobileSearchController {
public
ResponseResult
getArticleCriteria
()
{
return
ResponseResult
.
success
(
markDataService
.
getMobileYuqingMarkCriteria
());
}
}
src/main/java/com/zhiwei/brandkbs2/dao/EventMiddlewareDao.java
View file @
874161bb
...
...
@@ -313,4 +313,15 @@ public interface EventMiddlewareDao {
* @return EventDetailAdditionalInfo
*/
EventDetailAdditionalInfo
eventDetailAdditionalInfo
(
String
eventId
);
/**
* 获取参与某情感事件最多的平台
* @param startTime 开始时间
* @param endTime 结束时间
* @param emotion 情感倾向
* @param projectId 品见项目id
* @param contendId 品见品牌id
* @return
*/
Map
<
String
,
Integer
>
getTopPlatformAnyEmotion
(
Long
startTime
,
Long
endTime
,
String
emotion
,
String
projectId
,
String
contendId
);
}
src/main/java/com/zhiwei/brandkbs2/dao/impl/EventMiddlewareDaoImpl.java
View file @
874161bb
...
...
@@ -216,4 +216,9 @@ public class EventMiddlewareDaoImpl implements EventMiddlewareDao {
public
EventDetailAdditionalInfo
eventDetailAdditionalInfo
(
String
eventId
)
{
return
eventClient
.
eventDetailAdditionalInfo
(
eventId
);
}
@Override
public
Map
<
String
,
Integer
>
getTopPlatformAnyEmotion
(
Long
startTime
,
Long
endTime
,
String
emotion
,
String
projectId
,
String
contendId
)
{
return
eventClient
.
getTopPlatformAnyEmotion
(
startTime
,
endTime
,
emotion
,
projectId
,
contendId
);
}
}
src/main/java/com/zhiwei/brandkbs2/es/EsQueryTools.java
View file @
874161bb
package
com
.
zhiwei
.
brandkbs2
.
es
;
import
com.zhiwei.brandkbs2.common.ChannelType
;
import
com.zhiwei.brandkbs2.common.GenericAttribute
;
import
com.zhiwei.brandkbs2.common.GlobalPojo
;
import
com.zhiwei.brandkbs2.config.Constant
;
...
...
@@ -328,18 +329,22 @@ public class EsQueryTools {
}
public
static
void
addSensitiveChannel
(
BrandkbsYuQingConfig
config
,
BoolQueryBuilder
boolQueryBuilder
)
{
if
(!
Tools
.
isEmpty
(
config
.
getPoliticsLevels
())
&&
!
config
.
getPoliticsLevels
().
contains
(
"全部"
))
{
BoolQueryBuilder
politicsLevelBool
=
QueryBuilders
.
boolQuery
();
config
.
getPoliticsLevels
().
forEach
(
politicsLevel
->
politicsLevelBool
.
should
(
QueryBuilders
.
termQuery
(
GenericAttribute
.
ES_SENSITIVE_CHANNEL
+
"."
+
GenericAttribute
.
ES_POLITICS_LEVEL
+
".keyword"
,
politicsLevel
)));
boolQueryBuilder
.
must
(
politicsLevelBool
);
BoolQueryBuilder
hitBoolQuery
=
QueryBuilders
.
boolQuery
();
if
(!
Tools
.
isEmpty
(
config
.
getPoliticsLevels
()))
{
List
<
String
>
hitList
=
config
.
getPoliticsLevels
();
if
(
config
.
getPoliticsLevels
().
contains
(
"全部"
))
{
hitList
=
ChannelType
.
POLITICS_LEVELS
;
}
hitList
.
forEach
(
politicsLevel
->
hitBoolQuery
.
should
(
QueryBuilders
.
termQuery
(
GenericAttribute
.
ES_SENSITIVE_CHANNEL
+
"."
+
GenericAttribute
.
ES_POLITICS_LEVEL
+
".keyword"
,
politicsLevel
)));
}
if
(!
Tools
.
isEmpty
(
config
.
getFields
())
&&
!
config
.
getFields
().
contains
(
"全部"
)
)
{
BoolQueryBuilder
fieldBool
=
QueryBuilders
.
boolQuery
();
config
.
getFields
().
forEach
(
field
->
{
fieldBool
.
should
(
QueryBuilders
.
termQuery
(
GenericAttribute
.
ES_SENSITIVE_CHANNEL
+
"."
+
GenericAttribute
.
ES_FIELD
+
".keyword"
,
field
))
;
}
);
boolQueryBuilder
.
must
(
fieldBool
);
if
(!
Tools
.
isEmpty
(
config
.
getFields
()))
{
List
<
String
>
hitList
=
config
.
getFields
();
if
(
config
.
getFields
().
contains
(
"全部"
))
{
hitList
=
ChannelType
.
COMMON_FIELDS
;
}
hitList
.
forEach
(
field
->
hitBoolQuery
.
should
(
QueryBuilders
.
termQuery
(
GenericAttribute
.
ES_SENSITIVE_CHANNEL
+
"."
+
GenericAttribute
.
ES_FIELD
+
".keyword"
,
field
))
);
}
boolQueryBuilder
.
must
(
hitBoolQuery
);
}
public
static
void
addSensitiveChannel
(
String
politicsLevel
,
String
field
,
String
region
,
String
mainBodyType
,
BoolQueryBuilder
boolQueryBuilder
)
{
...
...
src/main/java/com/zhiwei/brandkbs2/pojo/dto/ExportSearchWholeDTO.java
View file @
874161bb
...
...
@@ -38,11 +38,15 @@ public class ExportSearchWholeDTO {
@ExcelProperty
(
"地址"
)
private
String
url
;
public
static
ExportSearchWholeDTO
creatExportSearchWholeDTO
(
JSONObject
jsonObject
){
public
static
ExportSearchWholeDTO
creatExportSearchWholeDTO
(
JSONObject
jsonObject
)
{
ExportSearchWholeDTO
dto
=
new
ExportSearchWholeDTO
();
dto
.
setTime
(
new
Date
((
Long
)
jsonObject
.
get
(
"time"
)));
dto
.
setPlatform
(
jsonObject
.
getString
(
"platform"
));
dto
.
setChannel
(
jsonObject
.
getString
(
"channel"
));
// 截取为excel单元格允许的最大长度
dto
.
setTitle
(
jsonObject
.
getString
(
"title"
));
dto
.
setContent
(
jsonObject
.
getString
(
"content"
));
dto
.
setUrl
(
jsonObject
.
getString
(
"url"
));
return
dto
;
}
}
src/main/java/com/zhiwei/brandkbs2/service/impl/BehaviorServiceImpl.java
View file @
874161bb
...
...
@@ -221,9 +221,10 @@ public class BehaviorServiceImpl implements BehaviorService {
query
.
addCriteria
(
Criteria
.
where
(
"cTime"
).
gte
(
startTime
).
lt
(
endTime
));
query
.
addCriteria
(
Criteria
.
where
(
"projectId"
).
is
(
projectId
));
userLogRecordDao
.
addSort
(
query
,
"{\"cTime\":\"descend\"}"
);
List
<
UserLogRecord
>
logRecordList
=
userLogRecordDao
.
findList
(
query
);
List
<
ExportUserLogRecordDTO
>
resList
=
new
ArrayList
<>(
logRecordList
.
size
());
logRecordList
.
forEach
(
record
->
{
String
[]
collectionNames
=
userLogRecordDao
.
generateCollectionNames
(
new
Date
(
startTime
),
new
Date
(
endTime
));
List
<
UserLogRecord
>
userLogRecordList
=
userLogRecordDao
.
findList
(
query
,
collectionNames
);
List
<
ExportUserLogRecordDTO
>
resList
=
new
ArrayList
<>(
userLogRecordList
.
size
());
userLogRecordList
.
forEach
(
record
->
{
ExportUserLogRecordDTO
dto
=
new
ExportUserLogRecordDTO
();
dto
.
setNickname
(
record
.
getNickname
());
dto
.
setDescription
(
record
.
getDescription
());
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/EventServiceImpl.java
View file @
874161bb
...
...
@@ -945,7 +945,7 @@ public class EventServiceImpl implements EventService {
json
.
put
(
"name"
,
name
);
switch
(
name
)
{
case
"全部"
:
json
.
put
(
"totalDisseminationVolumes"
,
n
ull
);
json
.
put
(
"totalDisseminationVolumes"
,
n
ew
long
[]{}
);
break
;
case
"≥5000"
:
json
.
put
(
"totalDisseminationVolumes"
,
new
Long
[]{
5000L
,
-
1L
});
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/ProjectWarnServiceImpl.java
View file @
874161bb
...
...
@@ -226,22 +226,30 @@ public class ProjectWarnServiceImpl implements ProjectWarnService {
StringBuilder
mediaChannel
=
new
StringBuilder
();
List
<
String
>
politicsLevels
=
config
.
getPoliticsLevels
();
List
<
String
>
fields
=
config
.
getFields
();
if
((!
Tools
.
isEmpty
(
politicsLevels
)
&&
!
politicsLevels
.
contains
(
"全部"
)))
{
politicsLevels
.
forEach
(
politicsLevel
->
mediaChannel
.
append
(
politicsLevel
).
append
(
"、"
));
}
else
{
if
(
Tools
.
isEmpty
(
politicsLevels
)){
key2Header
+=
"【全部级别】"
;
}
else
if
(
politicsLevels
.
contains
(
"全部"
)){
key2Header
+=
"【重点级别】"
;
}
else
{
politicsLevels
.
forEach
(
politicsLevel
->
mediaChannel
.
append
(
politicsLevel
).
append
(
"、"
));
}
if
((!
Tools
.
isEmpty
(
fields
)
&&
!
fields
.
contains
(
"全部"
)))
{
fields
.
forEach
(
field
->
mediaChannel
.
append
(
field
).
append
(
"、"
));
}
else
{
if
(
Tools
.
isEmpty
(
fields
))
{
if
(
0
!=
key2Header
.
length
())
{
key2Header
+=
"、"
;
key2Header
+=
"【全部领域】,"
;
}
else
{
key2Header
+=
"【全部领域】"
;
}
}
else
if
(
fields
.
contains
(
"全部"
))
{
if
(
0
!=
key2Header
.
length
())
{
key2Header
+=
"、"
;
key2Header
+=
"【重点领域】,"
;
}
else
{
key2Header
+=
"【重点领域】"
;
}
}
else
{
fields
.
forEach
(
field
->
mediaChannel
.
append
(
field
).
append
(
"、"
));
}
// config.getChannelTypes().forEach(channelType -> mediaChannel.append(channelType).append("、"));
if
(
0
!=
mediaChannel
.
length
())
{
if
(
0
!=
key2Header
.
length
())
{
key2Header
+=
"、"
;
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/ReportServiceImpl.java
View file @
874161bb
...
...
@@ -31,6 +31,7 @@ import com.zhiwei.brandkbs2.util.RedisUtil;
import
com.zhiwei.brandkbs2.util.Tools
;
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
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
...
...
@@ -549,8 +550,7 @@ public class ReportServiceImpl implements ReportService {
//统计时间段负面稿件个数
long
negNormalCount
=
markDataService
.
getYuqingMarkCount
(
startTime
,
endTime
,
EmotionEnum
.
NEGATIVE
.
getName
(),
projectId
,
Constant
.
PRIMARY_CONTEND_ID
);
//统计时间段总事件数
long
eventCount
=
eventMiddlewareDao
.
getEventCountByProjectIdAndContendId
(
startTime
,
endTime
,
EmotionEnum
.
ALL
.
getName
(),
projectId
,
Constant
.
PRIMARY_CONTEND_ID
);
long
eventCount
=
eventMiddlewareDao
.
getEventCountByProjectIdAndContendId
(
startTime
,
endTime
,
EmotionEnum
.
ALL
.
getName
(),
projectId
,
projectId
);
JSONObject
line
=
new
JSONObject
();
line
.
put
(
"normalCount"
,
normalCount
);
line
.
put
(
"posNormalCount"
,
posNormalCount
);
...
...
@@ -567,8 +567,8 @@ public class ReportServiceImpl implements ReportService {
result
.
put
(
"posNormalMaxTime"
,
lineList
.
stream
().
max
(
Comparator
.
comparing
(
o
->
o
.
getInteger
(
"posNormalCount"
))).
get
().
getDate
(
"time"
));
result
.
put
(
"neuNormalMaxTime"
,
lineList
.
stream
().
max
(
Comparator
.
comparing
(
o
->
o
.
getInteger
(
"neuNormalCount"
))).
get
().
getDate
(
"time"
));
result
.
put
(
"negNormalMaxTime"
,
lineList
.
stream
().
max
(
Comparator
.
comparing
(
o
->
o
.
getInteger
(
"negNormalCount"
))).
get
().
getDate
(
"time"
));
long
eventTotal
=
eventMiddlewareDao
.
getEventCountByProjectIdAndContendId
(
start
,
end
,
EmotionEnum
.
ALL
.
getName
(),
projectId
,
Constant
.
PRIMARY_CONTEND_ID
);
long
posEventTotal
=
eventMiddlewareDao
.
getEventCountByProjectIdAndContendId
(
start
,
end
,
EmotionEnum
.
POSITIVE
.
getName
(),
projectId
,
Constant
.
PRIMARY_CONTEND_ID
);
long
eventTotal
=
eventMiddlewareDao
.
getEventCountByProjectIdAndContendId
(
start
,
end
,
EmotionEnum
.
ALL
.
getName
(),
projectId
,
projectId
);
long
posEventTotal
=
eventMiddlewareDao
.
getEventCountByProjectIdAndContendId
(
start
,
end
,
EmotionEnum
.
POSITIVE
.
getName
(),
projectId
,
projectId
);
result
.
put
(
"eventTotal"
,
eventTotal
);
result
.
put
(
"posEventPro"
,
eventTotal
==
0
?
0
:
posEventTotal
*
1.0
/
eventTotal
);
//获取最热稿件相关信息
...
...
@@ -580,30 +580,37 @@ public class ReportServiceImpl implements ReportService {
result
.
put
(
"similarArticleCount"
,
resMap
.
getValue
());
}
//获取最热事件相关信息
List
<
Event
>
eventList
=
eventMiddlewareDao
.
getEventsByProjectIdAndContendId
(
start
,
end
,
EmotionEnum
.
ALL
.
getName
(),
projectId
,
Constant
.
PRIMARY_CONTEND_ID
,
1
);
List
<
Event
>
eventList
=
eventMiddlewareDao
.
getEventsByProjectIdAndContendId
(
start
,
end
,
EmotionEnum
.
ALL
.
getName
(),
projectId
,
projectId
,
1
);
if
(
CollectionUtils
.
isNotEmpty
(
eventList
))
{
Event
event
=
eventList
.
get
(
0
);
result
.
put
(
"title"
,
event
.
getName
());
result
.
put
(
"influence"
,
event
.
getInfluence
());
}
// TODO eventMiddlewareDao 需要添加获取首发稿件接口
// List<Event> posTopArticleList = eventMiddlewareDao.getEventsByProjectIdAndContendId(start, end, EmotionEnum.POSITIVE.getName(), projectId,
// Constant.PRIMARY_CONTEND_ID, 1);
// if (!Tools.isEmpty(posTopArticleList)) {
// result.put("posTopArtTitle", null);
// }
// List<Event> neuTopArticleTitleList = eventMiddlewareDao.getEventsByProjectIdAndContendId(start, end, EmotionEnum.NEUTRAL.getName(), projectId,
// Constant.PRIMARY_CONTEND_ID, 1);
// if (!Tools.isEmpty(neuTopArticleTitleList)) {
// result.put("neuTopArtTitle", neuTopArtTitle.length() <= 30 ? neuTopArtTitle : neuTopArtTitle.substring(0, 30) + "...");
// }
// List<Event> negTopArticleTitleList = eventMiddlewareDao.getEventsByProjectIdAndContendId(start, end, EmotionEnum.NEUTRAL.getName(), projectId,
// Constant.PRIMARY_CONTEND_ID, 1);
// if (!Tools.isEmpty(negTopArticleTitleList)) {
// result.put("negTopArtTitle", neuTopArtTitle.length() <= 30 ? neuTopArtTitle : neuTopArtTitle.substring(0, 30) + "...");
// }
// 三种情感倾向事件首发信息
List
<
Event
>
posTopArticleList
=
eventMiddlewareDao
.
getEventsByProjectIdAndContendId
(
start
,
end
,
EmotionEnum
.
POSITIVE
.
getName
(),
projectId
,
projectId
,
1
);
if
(!
Tools
.
isEmpty
(
posTopArticleList
))
{
EventData
eventData
=
posTopArticleList
.
get
(
0
).
getOriginArticle
();
if
(
Objects
.
nonNull
(
eventData
))
{
String
posTopArtTitle
=
eventData
.
getTitle
();
result
.
put
(
"posTopArtTitle"
,
posTopArtTitle
.
length
()
<=
30
?
posTopArtTitle
:
posTopArtTitle
.
substring
(
0
,
30
)
+
"..."
);
}
}
List
<
Event
>
neuTopArticleTitleList
=
eventMiddlewareDao
.
getEventsByProjectIdAndContendId
(
start
,
end
,
EmotionEnum
.
NEUTRAL
.
getName
(),
projectId
,
projectId
,
1
);
if
(!
Tools
.
isEmpty
(
neuTopArticleTitleList
))
{
EventData
eventData
=
neuTopArticleTitleList
.
get
(
0
).
getOriginArticle
();
if
(
Objects
.
nonNull
(
eventData
))
{
String
neuTopArtTitle
=
eventData
.
getTitle
();
result
.
put
(
"neuTopArtTitle"
,
neuTopArtTitle
.
length
()
<=
30
?
neuTopArtTitle
:
neuTopArtTitle
.
substring
(
0
,
30
)
+
"..."
);
}
}
List
<
Event
>
negTopArticleTitleList
=
eventMiddlewareDao
.
getEventsByProjectIdAndContendId
(
start
,
end
,
EmotionEnum
.
NEGATIVE
.
getName
(),
projectId
,
projectId
,
1
);
if
(!
Tools
.
isEmpty
(
negTopArticleTitleList
))
{
EventData
eventData
=
negTopArticleTitleList
.
get
(
0
).
getOriginArticle
();
if
(
Objects
.
nonNull
(
eventData
))
{
String
negTopArtTitle
=
eventData
.
getTitle
();
result
.
put
(
"negTopArtTitle"
,
negTopArtTitle
.
length
()
<=
30
?
negTopArtTitle
:
negTopArtTitle
.
substring
(
0
,
30
)
+
"..."
);
}
}
return
result
;
}
...
...
@@ -617,19 +624,11 @@ public class ReportServiceImpl implements ReportService {
*/
private
JSONObject
getMobileBrandEvent
(
Long
startTime
,
Long
endTime
,
String
projectId
)
{
JSONObject
result
=
new
JSONObject
();
// TODO eventMiddlewareDao需要提供 获取参与某情感事件最多的平台列表
// List<Map<String, Object>> topPlatforms = iEventService.selectTopPlatformByTimeAndEmotionAndProjectIdAndContendId
// (startTimeStr, endTimeStr, EmotionEnum.NEGATIVE.getState(), pid, Constant.PRIMARY_CONTENDID);
// //负面事件舆情平台top
// result.put("topPlatforms", topPlatforms.stream()
// .sorted((o1, o2) -> Integer.valueOf(o2.get("num").toString()).compareTo(Integer.valueOf(o1.get("num").toString())))
// .limit(3)
// .map(map -> map.get("platform"))
// .collect(Collectors.toList()));
// 获取参与某情感事件最多的平台列表
Map
<
String
,
Integer
>
topPlatformAnyEmotion
=
eventMiddlewareDao
.
getTopPlatformAnyEmotion
(
startTime
,
endTime
,
EmotionEnum
.
NEGATIVE
.
getName
(),
projectId
,
projectId
);
result
.
put
(
"topPlatforms"
,
topPlatformAnyEmotion
.
keySet
().
stream
().
limit
(
3
).
collect
(
Collectors
.
toList
()));
//负面事件传播周期
List
<
Event
>
negEvents
=
eventMiddlewareDao
.
getEventsByProjectIdAndContendId
(
startTime
,
endTime
,
EmotionEnum
.
NEGATIVE
.
getName
(),
projectId
,
Constant
.
PRIMARY_CONTEND_ID
,
50
);
List
<
Event
>
negEvents
=
eventMiddlewareDao
.
getEventsByProjectIdAndContendId
(
startTime
,
endTime
,
EmotionEnum
.
NEGATIVE
.
getName
(),
projectId
,
projectId
,
50
);
List
<
Integer
>
spreadDayList
=
negEvents
.
stream
().
map
(
event
->
{
Long
start
=
event
.
getStartTime
();
Long
end
=
Boolean
.
TRUE
.
equals
(
event
.
getEndStatus
())
&&
event
.
getEndTime
()
<
endTime
?
event
.
getEndTime
()
:
endTime
;
...
...
@@ -657,8 +656,7 @@ public class ReportServiceImpl implements ReportService {
return
jsonObject
;
}).
collect
(
Collectors
.
toList
()));
//正面事件传播量top
List
<
Event
>
topPosEvents
=
eventMiddlewareDao
.
getEventsByTotalChannelVolumeTop
(
startTime
,
endTime
,
EmotionEnum
.
POSITIVE
.
getName
(),
projectId
,
Constant
.
PRIMARY_CONTEND_ID
,
5
);
List
<
Event
>
topPosEvents
=
eventMiddlewareDao
.
getEventsByTotalChannelVolumeTop
(
startTime
,
endTime
,
EmotionEnum
.
POSITIVE
.
getName
(),
projectId
,
projectId
,
5
);
result
.
put
(
"topPosEvents"
,
topPosEvents
.
stream
()
.
map
(
event
->
{
JSONObject
jsonObject
=
new
JSONObject
();
...
...
src/main/resources/application-dev.properties
View file @
874161bb
...
...
@@ -84,6 +84,7 @@ crisis.event.url =https://crisis.zhiweidata.com/event/{1}/general?share={2}
trends.longTimeInListSearchByInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={2}
trends.findHotSearchESDataInTimeByInner.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
trends.longTimeInListSearch.url
=
https://trends.zhiweidata.com/hotSearchTrend/search/longTimeInListSearch?type={1}&sortType=realTime
trends.getHotSearchFromEsInTimeAndTypeOrWord.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/getHotSearchFromEsInTimeAndTypeOrWord?limit={1}&page={2}&type={3}&word={4}&sort={5}
#\u4E8B\u4EF6\u5E93\u5916\u90E8\u63A5\u53E3
ef.search.url
=
https://ef.zhiweidata.com/external/search.do?name={1}&page={2}
ef.searchCriteria.url
=
https://ef.zhiweidata.com/index/getSearchKey.do
...
...
src/main/resources/application-local.properties
View file @
874161bb
...
...
@@ -87,6 +87,7 @@ crisis.event.url =https://crisis.zhiweidata.com/event/{1}/general?share={2}
trends.longTimeInListSearchByInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={2}
trends.findHotSearchESDataInTimeByInner.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
trends.longTimeInListSearch.url
=
https://trends.zhiweidata.com/hotSearchTrend/search/longTimeInListSearch?type={1}&sortType=realTime
trends.getHotSearchFromEsInTimeAndTypeOrWord.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/getHotSearchFromEsInTimeAndTypeOrWord?limit={1}&page={2}&type={3}&word={4}&sort={5}
#\u4E8B\u4EF6\u5E93\u5916\u90E8\u63A5\u53E3
ef.search.url
=
https://ef.zhiweidata.com/external/search.do?name={1}&page={2}&size={3}
ef.searchCriteria.url
=
https://ef.zhiweidata.com/index/getSearchKey.do
...
...
src/main/resources/application-prod.properties
View file @
874161bb
...
...
@@ -84,6 +84,7 @@ crisis.event.url =https://crisis.zhiweidata.com/event/{1}/general?share={2}
trends.longTimeInListSearchByInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={2}
trends.findHotSearchESDataInTimeByInner.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
trends.longTimeInListSearch.url
=
https://trends.zhiweidata.com/hotSearchTrend/search/longTimeInListSearch?type={1}&sortType=realTime
trends.getHotSearchFromEsInTimeAndTypeOrWord.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/getHotSearchFromEsInTimeAndTypeOrWord?limit={1}&page={2}&type={3}&word={4}&sort={5}
#\u4E8B\u4EF6\u5E93\u5916\u90E8\u63A5\u53E3
ef.search.url
=
https://ef.zhiweidata.com/external/search.do?name={1}&page={2}
ef.searchCriteria.url
=
https://ef.zhiweidata.com/index/getSearchKey.do
...
...
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