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
38564d67
Commit
38564d67
authored
Nov 14, 2022
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
2022/11/14 18:12 See merge request
!81
parents
ae71fabd
33a5d9dc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
48 additions
and
4 deletions
+48
-4
src/main/java/com/zhiwei/brandkbs2/common/RedisKeyPrefix.java
+2
-1
src/main/java/com/zhiwei/brandkbs2/pojo/external/BrandkbsNewCaseWarn.java
+22
-0
src/main/java/com/zhiwei/brandkbs2/pojo/vo/CrisisCaseWarnVO.java
+7
-1
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkFlowServiceImpl.java
+1
-0
src/main/java/com/zhiwei/brandkbs2/service/impl/ProjectWarnServiceImpl.java
+0
-0
src/main/java/com/zhiwei/brandkbs2/util/RedisUtil.java
+10
-2
src/main/java/com/zhiwei/brandkbs2/util/Tools.java
+3
-0
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.
src/main/java/com/zhiwei/brandkbs2/common/RedisKeyPrefix.java
View file @
38564d67
...
@@ -88,7 +88,8 @@ public class RedisKeyPrefix {
...
@@ -88,7 +88,8 @@ public class RedisKeyPrefix {
*/
*/
public
static
final
String
PROJECT_WARN_HOT_TOP
=
"BRANDKBS:HOT_TOP:"
;
public
static
final
String
PROJECT_WARN_HOT_TOP
=
"BRANDKBS:HOT_TOP:"
;
public
static
final
String
PROJECT_WARN_NEW_CASE
=
"BRANDKBS:NEW_CASE:"
;
public
static
final
String
PROJECT_WARN_NEW_CASE_LIST
=
"BRANDKBS:NEW_CASE:LIST_"
;
public
static
final
String
PROJECT_WARN_NEW_CASE_CURSOR
=
"BRANDKBS:NEW_CASE:CURSOR:"
;
public
static
String
projectWarnHotTopKeyAll
(
String
projectId
,
String
type
)
{
public
static
String
projectWarnHotTopKeyAll
(
String
projectId
,
String
type
)
{
return
RedisKeyPrefix
.
generateRedisKey
(
RedisKeyPrefix
.
PROJECT_WARN_HOT_TOP
,
projectId
,
Tools
.
concat
(
type
,
"*"
));
return
RedisKeyPrefix
.
generateRedisKey
(
RedisKeyPrefix
.
PROJECT_WARN_HOT_TOP
,
projectId
,
Tools
.
concat
(
type
,
"*"
));
...
...
src/main/java/com/zhiwei/brandkbs2/pojo/external/BrandkbsNewCaseWarn.java
View file @
38564d67
package
com
.
zhiwei
.
brandkbs2
.
pojo
.
external
;
package
com
.
zhiwei
.
brandkbs2
.
pojo
.
external
;
import
com.zhiwei.brandkbs2.pojo.vo.CrisisCaseWarnVO
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -39,6 +41,26 @@ public class BrandkbsNewCaseWarn {
...
@@ -39,6 +41,26 @@ public class BrandkbsNewCaseWarn {
* 案例类别
* 案例类别
*/
*/
private
String
caseType
;
private
String
caseType
;
/**
* 分享链接
*/
private
String
url
;
public
static
NewCase
createFromCrisisCaseWarnVO
(
CrisisCaseWarnVO
vo
,
String
url
)
{
NewCase
newCase
=
new
NewCase
();
newCase
.
setTitle
(
vo
.
getEventName
());
List
<
String
>
tagList
=
new
ArrayList
<>();
tagList
.
add
(
vo
.
getPriBrand
());
tagList
.
addAll
(
vo
.
getPriCrisisTags
());
newCase
.
setTagList
(
tagList
);
newCase
.
setContent
(
vo
.
getIntroduction
());
newCase
.
setSpreadIndex
(
vo
.
getInterveneScore
());
newCase
.
setCaseType
(
vo
.
getCategory
());
newCase
.
setUrl
(
url
);
return
newCase
;
}
}
}
}
}
src/main/java/com/zhiwei/brandkbs2/pojo/vo/CrisisCaseWarnVO.java
View file @
38564d67
...
@@ -14,7 +14,7 @@ public class CrisisCaseWarnVO {
...
@@ -14,7 +14,7 @@ public class CrisisCaseWarnVO {
/**
/**
* id
* id
*/
*/
private
String
id
;
private
int
id
;
/**
/**
* 事件名
* 事件名
...
@@ -42,4 +42,10 @@ public class CrisisCaseWarnVO {
...
@@ -42,4 +42,10 @@ public class CrisisCaseWarnVO {
* 公关传播效果指数
* 公关传播效果指数
*/
*/
private
Double
interveneScore
;
private
Double
interveneScore
;
/**
* 案例类别
*/
private
String
category
;
}
}
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkFlowServiceImpl.java
View file @
38564d67
...
@@ -142,6 +142,7 @@ public class MarkFlowServiceImpl implements MarkFlowService {
...
@@ -142,6 +142,7 @@ public class MarkFlowServiceImpl implements MarkFlowService {
}
}
double
channelValue
=
tJson
.
getDoubleValue
(
GenericAttribute
.
ES_CHANNEL_INFLUENCE
);
double
channelValue
=
tJson
.
getDoubleValue
(
GenericAttribute
.
ES_CHANNEL_INFLUENCE
);
if
(
channelValue
>
0
)
{
if
(
channelValue
>
0
)
{
// 保留两位小数
sourceDetails
.
put
(
"channelInfluence"
,
new
BigDecimal
(
channelValue
).
setScale
(
2
,
RoundingMode
.
UP
));
sourceDetails
.
put
(
"channelInfluence"
,
new
BigDecimal
(
channelValue
).
setScale
(
2
,
RoundingMode
.
UP
));
}
}
return
sourceDetails
;
return
sourceDetails
;
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/ProjectWarnServiceImpl.java
View file @
38564d67
This diff is collapsed.
Click to expand it.
src/main/java/com/zhiwei/brandkbs2/util/RedisUtil.java
View file @
38564d67
...
@@ -57,8 +57,16 @@ public class RedisUtil {
...
@@ -57,8 +57,16 @@ public class RedisUtil {
return
RedisKeyPrefix
.
CHANNEL_RECORD_LIST
+
Tools
.
concat
(
projectId
,
startTime
,
endTime
);
return
RedisKeyPrefix
.
CHANNEL_RECORD_LIST
+
Tools
.
concat
(
projectId
,
startTime
,
endTime
);
}
}
public
static
String
getNewCrisisCaseListKey
()
{
public
static
String
getNewCrisisCaseListAllKey
()
{
return
RedisKeyPrefix
.
PROJECT_WARN_NEW_CASE
+
"LIST"
;
return
RedisKeyPrefix
.
PROJECT_WARN_NEW_CASE_LIST
+
"*"
;
}
public
static
String
getNewCrisisCaseListKey
(
String
id
)
{
return
RedisKeyPrefix
.
PROJECT_WARN_NEW_CASE_LIST
+
id
;
}
public
static
String
getNewCrisisCaseCursor
(
String
projectId
)
{
return
RedisKeyPrefix
.
PROJECT_WARN_NEW_CASE_CURSOR
+
projectId
;
}
}
public
void
setExpire
(
String
key
,
String
value
,
long
timeout
,
TimeUnit
unit
)
{
public
void
setExpire
(
String
key
,
String
value
,
long
timeout
,
TimeUnit
unit
)
{
...
...
src/main/java/com/zhiwei/brandkbs2/util/Tools.java
View file @
38564d67
...
@@ -885,6 +885,9 @@ public class Tools {
...
@@ -885,6 +885,9 @@ public class Tools {
}
}
public
static
boolean
isExclusive
(
String
keyword
,
String
content
)
{
public
static
boolean
isExclusive
(
String
keyword
,
String
content
)
{
if
(
null
==
keyword
)
{
return
true
;
}
return
isExclusive
(
Arrays
.
asList
(
keyword
.
split
(
"\\|"
)),
content
);
return
isExclusive
(
Arrays
.
asList
(
keyword
.
split
(
"\\|"
)),
content
);
}
}
...
...
src/main/resources/application-dev.properties
View file @
38564d67
...
@@ -64,6 +64,7 @@ crisis.top3.url=https://crisis.zhiweidata.com/app/brandkbs/event/online-top3
...
@@ -64,6 +64,7 @@ crisis.top3.url=https://crisis.zhiweidata.com/app/brandkbs/event/online-top3
crisis.searchCriteria.url
=
https://crisis.zhiweidata.com/app/brandkbs/condition
crisis.searchCriteria.url
=
https://crisis.zhiweidata.com/app/brandkbs/condition
crisis.list.url
=
https://crisis.zhiweidata.com/app/brandkbs/crisisList?page={1}&size={2}&startTime={3}&endTime={4}&category={5}
crisis.list.url
=
https://crisis.zhiweidata.com/app/brandkbs/crisisList?page={1}&size={2}&startTime={3}&endTime={4}&category={5}
crisis.share.url
=
https://crisis.zhiweidata.com/app/brandkbs/share/{1}
crisis.share.url
=
https://crisis.zhiweidata.com/app/brandkbs/share/{1}
crisis.event.url
=
https://crisis.zhiweidata.com/event/{1}/general?share={2}
#\u70ED\u70B9\u5E93\u5916\u90E8\u63A5\u53E3
#\u70ED\u70B9\u5E93\u5916\u90E8\u63A5\u53E3
trends.longTimeInListSearchByInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={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.findHotSearchESDataInTimeByInner.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
...
...
src/main/resources/application-local.properties
View file @
38564d67
...
@@ -66,6 +66,7 @@ crisis.top3.url=https://crisis.zhiweidata.com/app/brandkbs/event/online-top3
...
@@ -66,6 +66,7 @@ crisis.top3.url=https://crisis.zhiweidata.com/app/brandkbs/event/online-top3
crisis.searchCriteria.url
=
https://crisis.zhiweidata.com/app/brandkbs/condition
crisis.searchCriteria.url
=
https://crisis.zhiweidata.com/app/brandkbs/condition
crisis.list.url
=
https://crisis.zhiweidata.com/app/brandkbs/crisisList?page={1}&size={2}&startTime={3}&endTime={4}&category={5}
crisis.list.url
=
https://crisis.zhiweidata.com/app/brandkbs/crisisList?page={1}&size={2}&startTime={3}&endTime={4}&category={5}
crisis.share.url
=
https://crisis.zhiweidata.com/app/brandkbs/share/{1}
crisis.share.url
=
https://crisis.zhiweidata.com/app/brandkbs/share/{1}
crisis.event.url
=
https://crisis.zhiweidata.com/event/{1}/general?share={2}
#\u70ED\u70B9\u5E93\u5916\u90E8\u63A5\u53E3
#\u70ED\u70B9\u5E93\u5916\u90E8\u63A5\u53E3
trends.longTimeInListSearchByInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={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.findHotSearchESDataInTimeByInner.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
...
...
src/main/resources/application-prod.properties
View file @
38564d67
...
@@ -64,6 +64,7 @@ crisis.top3.url=https://crisis.zhiweidata.com/app/brandkbs/event/online-top3
...
@@ -64,6 +64,7 @@ crisis.top3.url=https://crisis.zhiweidata.com/app/brandkbs/event/online-top3
crisis.searchCriteria.url
=
https://crisis.zhiweidata.com/app/brandkbs/condition
crisis.searchCriteria.url
=
https://crisis.zhiweidata.com/app/brandkbs/condition
crisis.list.url
=
https://crisis.zhiweidata.com/app/brandkbs/crisisList?page={1}&size={2}&startTime={3}&endTime={4}&category={5}
crisis.list.url
=
https://crisis.zhiweidata.com/app/brandkbs/crisisList?page={1}&size={2}&startTime={3}&endTime={4}&category={5}
crisis.share.url
=
https://crisis.zhiweidata.com/app/brandkbs/share/{1}
crisis.share.url
=
https://crisis.zhiweidata.com/app/brandkbs/share/{1}
crisis.event.url
=
https://crisis.zhiweidata.com/event/{1}/general?share={2}
#\u70ED\u70B9\u5E93\u5916\u90E8\u63A5\u53E3
#\u70ED\u70B9\u5E93\u5916\u90E8\u63A5\u53E3
trends.longTimeInListSearchByInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={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.findHotSearchESDataInTimeByInner.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
...
...
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