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
fa2a2247
Commit
fa2a2247
authored
Apr 19, 2024
by
shenjunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
舆情动态舆情-配置新增屏蔽关键词及屏蔽渠道3
parent
df543534
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/main/java/com/zhiwei/brandkbs2/controller/InterfaceController.java
+2
-2
src/main/java/com/zhiwei/brandkbs2/service/impl/ProjectWarnServiceImpl.java
+2
-2
No files found.
src/main/java/com/zhiwei/brandkbs2/controller/InterfaceController.java
View file @
fa2a2247
...
...
@@ -54,8 +54,8 @@ public class InterfaceController {
}
@ApiOperation
(
"获取舆情动态-预警结果"
)
@PostMapping
(
"/warn/yuqing
New
"
)
public
ResponseResult
getYuqingWaring
New
(
@RequestBody
JSONObject
json
)
{
@PostMapping
(
"/warn/yuqing"
)
public
ResponseResult
getYuqingWaring
(
@RequestBody
JSONObject
json
)
{
String
projectId
=
json
.
getString
(
"projectId"
);
BrandkbsYuQingConfigNew
config
=
json
.
getObject
(
"config"
,
BrandkbsYuQingConfigNew
.
class
);
return
projectWarnService
.
getYuqingWaringNew
(
projectId
,
config
);
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/ProjectWarnServiceImpl.java
View file @
fa2a2247
...
...
@@ -657,11 +657,11 @@ public class ProjectWarnServiceImpl implements ProjectWarnService {
Map
<
String
,
Object
>
sourceMap
=
hit
.
getSourceAsMap
();
BaseMap
baseMap
=
Tools
.
getBaseFromEsMap
(
sourceMap
);
// 关键词命中
if
(!
Tools
.
isContains
(
config
.
getKeyword
(),
baseMap
.
getTitle
()
+
baseMap
.
getContent
()))
{
if
(!
Tools
.
is
Empty
(
config
.
getKeyword
())
&&
!
Tools
.
is
Contains
(
config
.
getKeyword
(),
baseMap
.
getTitle
()
+
baseMap
.
getContent
()))
{
return
null
;
}
// 屏蔽关键词命中
if
(
Tools
.
isContains
(
config
.
getNoiseKeyword
(),
baseMap
.
getTitle
()
+
baseMap
.
getContent
()))
{
if
(
!
Tools
.
isEmpty
(
config
.
getNoiseKeyword
())
&&
Tools
.
isContains
(
config
.
getNoiseKeyword
(),
baseMap
.
getTitle
()
+
baseMap
.
getContent
()))
{
return
null
;
}
baseMap
.
setTitle
(
baseMap
.
getTitleNullOptionalContent
());
...
...
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