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
ceb23b0a
Commit
ceb23b0a
authored
Jan 02, 2025
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'release'
舆情分析趋势图调整 See merge request
!613
parents
8ba340f2
be2e97f8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
57 deletions
+5
-57
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkDataServiceImpl.java
+0
-27
src/main/java/com/zhiwei/brandkbs2/service/impl/SearchWholeServiceImpl.java
+1
-26
src/main/java/com/zhiwei/brandkbs2/util/Tools.java
+1
-1
src/main/resources/application-dev.properties
+1
-1
src/main/resources/application-local.properties
+1
-1
src/main/resources/application-prod.properties
+1
-1
No files found.
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkDataServiceImpl.java
View file @
ceb23b0a
...
@@ -2861,9 +2861,6 @@ public class MarkDataServiceImpl implements MarkDataService {
...
@@ -2861,9 +2861,6 @@ public class MarkDataServiceImpl implements MarkDataService {
public
JSONObject
getSpreadTendency
(
MarkSearchDTO
dto
)
{
public
JSONObject
getSpreadTendency
(
MarkSearchDTO
dto
)
{
JSONObject
res
=
new
JSONObject
();
JSONObject
res
=
new
JSONObject
();
try
{
try
{
Long
[]
times
=
Tools
.
formatSpreadTendencyTime
(
dto
.
getStartTime
(),
dto
.
getEndTime
());
dto
.
setStartTime
(
times
[
0
]);
dto
.
setEndTime
(
times
[
1
]);
String
projectId
=
UserThreadLocal
.
getProjectId
();
String
projectId
=
UserThreadLocal
.
getProjectId
();
Long
endTime
=
dto
.
getEndTime
();
Long
endTime
=
dto
.
getEndTime
();
String
planId
=
dto
.
getPlanId
();
String
planId
=
dto
.
getPlanId
();
...
@@ -3251,9 +3248,6 @@ public class MarkDataServiceImpl implements MarkDataService {
...
@@ -3251,9 +3248,6 @@ public class MarkDataServiceImpl implements MarkDataService {
JSONObject
res
=
new
JSONObject
();
JSONObject
res
=
new
JSONObject
();
try
{
try
{
defaultXhsCustomSearchDTO
(
dto
);
defaultXhsCustomSearchDTO
(
dto
);
Long
[]
times
=
Tools
.
formatSpreadTendencyTime
(
dto
.
getStartTime
(),
dto
.
getEndTime
());
dto
.
setStartTime
(
times
[
0
]);
dto
.
setEndTime
(
times
[
1
]);
// 总趋势图
// 总趋势图
Pair
<
String
,
List
<
LineVO
>>
spreadTendency
=
getEmotionSpreadTendency
(
dto
,
null
);
Pair
<
String
,
List
<
LineVO
>>
spreadTendency
=
getEmotionSpreadTendency
(
dto
,
null
);
// 负面趋势图
// 负面趋势图
...
@@ -4477,19 +4471,6 @@ public class MarkDataServiceImpl implements MarkDataService {
...
@@ -4477,19 +4471,6 @@ public class MarkDataServiceImpl implements MarkDataService {
line
.
add
(
new
LineVO
(
count
,
time
));
line
.
add
(
new
LineVO
(
count
,
time
));
}
}
List
<
LineVO
>
resLine
=
Tools
.
completeLine
(
line
,
dto
.
getStartTime
(),
dto
.
getEndTime
());
List
<
LineVO
>
resLine
=
Tools
.
completeLine
(
line
,
dto
.
getStartTime
(),
dto
.
getEndTime
());
// 由于结束点为开区间,将结束点数据补完
if
(
CollectionUtils
.
isNotEmpty
(
resLine
)){
MarkSearchDTO
searchDTO
=
Tools
.
convertMap
(
dto
,
MarkSearchDTO
.
class
);
searchDTO
.
setPlatforms
(
Collections
.
singletonList
(
platformId
));
searchDTO
.
setStartTime
(
dto
.
getEndTime
());
searchDTO
.
setEndTime
(
dto
.
getEndTime
()
+
1
);
Long
count
=
0L
;
try
{
count
=
esClientDao
.
count
(
indexes
,
yuqingAnalyzeQuery
(
searchDTO
),
null
);
}
catch
(
IOException
ignore
)
{
}
resLine
.
add
(
new
LineVO
(
count
,
dto
.
getEndTime
()));
}
res
.
put
(
GlobalPojo
.
getPlatformNameById
(
platformId
),
resLine
);
res
.
put
(
GlobalPojo
.
getPlatformNameById
(
platformId
),
resLine
);
});
});
return
res
;
return
res
;
...
@@ -4534,14 +4515,6 @@ public class MarkDataServiceImpl implements MarkDataService {
...
@@ -4534,14 +4515,6 @@ public class MarkDataServiceImpl implements MarkDataService {
res
.
add
(
new
LineVO
(
count
,
time
));
res
.
add
(
new
LineVO
(
count
,
time
));
});
});
List
<
LineVO
>
resLine
=
Tools
.
completeLine
(
res
,
dto
.
getStartTime
(),
dto
.
getEndTime
());
List
<
LineVO
>
resLine
=
Tools
.
completeLine
(
res
,
dto
.
getStartTime
(),
dto
.
getEndTime
());
// 由于结束点为开区间,将结束点数据补完
if
(
CollectionUtils
.
isNotEmpty
(
resLine
)
&&
!
Objects
.
equals
(
resLine
.
get
(
resLine
.
size
()
-
1
).
getDate
(),
dto
.
getEndTime
())){
MarkSearchDTO
secondDTO
=
Tools
.
convertMap
(
dto
,
MarkSearchDTO
.
class
);
secondDTO
.
setStartTime
(
dto
.
getEndTime
());
secondDTO
.
setEndTime
(
dto
.
getEndTime
()
+
1
);
Long
count
=
esClientDao
.
count
(
indexes
,
yuqingAnalyzeQuery
(
secondDTO
,
emotion
,
null
),
null
);
resLine
.
add
(
new
LineVO
(
count
,
dto
.
getEndTime
()));
}
// 走势图最高点的聚合标题
// 走势图最高点的聚合标题
String
maxAggTitle
=
null
;
String
maxAggTitle
=
null
;
Optional
<?
extends
Histogram
.
Bucket
>
maxBucket
=
buckets
.
stream
().
max
(
Comparator
.
comparingLong
(
MultiBucketsAggregation
.
Bucket
::
getDocCount
));
Optional
<?
extends
Histogram
.
Bucket
>
maxBucket
=
buckets
.
stream
().
max
(
Comparator
.
comparingLong
(
MultiBucketsAggregation
.
Bucket
::
getDocCount
));
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/SearchWholeServiceImpl.java
View file @
ceb23b0a
...
@@ -611,9 +611,6 @@ public class SearchWholeServiceImpl implements SearchWholeService {
...
@@ -611,9 +611,6 @@ public class SearchWholeServiceImpl implements SearchWholeService {
public
JSONObject
getSearchWholeSpreadTendency
(
SearchFilterDTO
dto
)
{
public
JSONObject
getSearchWholeSpreadTendency
(
SearchFilterDTO
dto
)
{
JSONObject
res
=
new
JSONObject
();
JSONObject
res
=
new
JSONObject
();
try
{
try
{
Long
[]
times
=
Tools
.
formatSpreadTendencyTime
(
dto
.
getStartTime
(),
dto
.
getEndTime
());
dto
.
setStartTime
(
times
[
0
]);
dto
.
setEndTime
(
times
[
1
]);
List
<
LineVO
>
totalSpreadTendency
=
getTotalSpreadTendency
(
dto
);
List
<
LineVO
>
totalSpreadTendency
=
getTotalSpreadTendency
(
dto
);
Map
<
String
,
List
<
LineVO
>>
platformSpreadTendency
=
getPlatformSpreadTendency
(
dto
);
Map
<
String
,
List
<
LineVO
>>
platformSpreadTendency
=
getPlatformSpreadTendency
(
dto
);
BaseMap
firstArticle
=
getFirstArticle
(
dto
,
totalSpreadTendency
);
BaseMap
firstArticle
=
getFirstArticle
(
dto
,
totalSpreadTendency
);
...
@@ -891,16 +888,7 @@ public class SearchWholeServiceImpl implements SearchWholeService {
...
@@ -891,16 +888,7 @@ public class SearchWholeServiceImpl implements SearchWholeService {
long
count
=
bucket
.
getDocCount
();
long
count
=
bucket
.
getDocCount
();
res
.
add
(
new
LineVO
(
count
,
time
));
res
.
add
(
new
LineVO
(
count
,
time
));
});
});
List
<
LineVO
>
resLine
=
Tools
.
completeLine
(
res
,
dto
.
getStartTime
(),
dto
.
getEndTime
());
return
Tools
.
completeLine
(
res
,
dto
.
getStartTime
(),
dto
.
getEndTime
());
// 由于结束点为开区间,将结束点数据补完
if
(
CollectionUtils
.
isNotEmpty
(
resLine
)
&&
!
Objects
.
equals
(
resLine
.
get
(
resLine
.
size
()
-
1
).
getDate
(),
dto
.
getEndTime
())){
SearchFilterDTO
searchFilterDTO
=
Tools
.
convertMap
(
dto
,
SearchFilterDTO
.
class
);
searchFilterDTO
.
setStartTime
(
dto
.
getEndTime
());
searchFilterDTO
.
setEndTime
(
dto
.
getEndTime
()
+
1
);
Long
count
=
esClientDao
.
count
(
indexes
,
searchWholeAnalyzeQuery
(
searchFilterDTO
),
null
);
resLine
.
add
(
new
LineVO
(
count
,
dto
.
getEndTime
()));
}
return
resLine
;
}
}
/**
/**
...
@@ -970,19 +958,6 @@ public class SearchWholeServiceImpl implements SearchWholeService {
...
@@ -970,19 +958,6 @@ public class SearchWholeServiceImpl implements SearchWholeService {
v1
=
v1
.
entrySet
().
stream
().
sorted
(
Comparator
.
comparing
((
Map
.
Entry
<
String
,
Long
>
entry
)
->
Long
.
valueOf
(
entry
.
getKey
()))).
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
,
(
e1
,
e2
)
->
e2
,
LinkedHashMap:
:
new
));
v1
=
v1
.
entrySet
().
stream
().
sorted
(
Comparator
.
comparing
((
Map
.
Entry
<
String
,
Long
>
entry
)
->
Long
.
valueOf
(
entry
.
getKey
()))).
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
,
(
e1
,
e2
)
->
e2
,
LinkedHashMap:
:
new
));
v1
.
forEach
((
k2
,
v2
)
->
line
.
add
(
new
LineVO
(
v2
,
Long
.
valueOf
(
k2
))));
v1
.
forEach
((
k2
,
v2
)
->
line
.
add
(
new
LineVO
(
v2
,
Long
.
valueOf
(
k2
))));
List
<
LineVO
>
resLine
=
Tools
.
completeLine
(
line
,
dto
.
getStartTime
(),
dto
.
getEndTime
());
List
<
LineVO
>
resLine
=
Tools
.
completeLine
(
line
,
dto
.
getStartTime
(),
dto
.
getEndTime
());
// 结束点数据补充完全
if
(
CollectionUtils
.
isNotEmpty
(
resLine
)
&&
!
Objects
.
equals
(
resLine
.
get
(
resLine
.
size
()
-
1
).
getDate
(),
dto
.
getEndTime
())){
SearchFilterDTO
searchFilterDTO
=
Tools
.
convertMap
(
dto
,
SearchFilterDTO
.
class
);
searchFilterDTO
.
setPlatforms
(
Collections
.
singletonList
(
GlobalPojo
.
getPlatformIdByName
(
k1
)));
searchFilterDTO
.
setStartTime
(
dto
.
getEndTime
());
searchFilterDTO
.
setEndTime
(
dto
.
getEndTime
()
+
1
);
Long
count
=
0L
;
try
{
count
=
esClientDao
.
count
(
indexes
,
searchWholeAnalyzeQuery
(
searchFilterDTO
),
null
);
}
catch
(
IOException
ignore
)
{
}
resLine
.
add
(
new
LineVO
(
count
,
dto
.
getEndTime
()));
}
res
.
put
(
k1
,
resLine
);
res
.
put
(
k1
,
resLine
);
});
});
return
res
;
return
res
;
...
...
src/main/java/com/zhiwei/brandkbs2/util/Tools.java
View file @
ceb23b0a
...
@@ -1479,7 +1479,7 @@ public class Tools {
...
@@ -1479,7 +1479,7 @@ public class Tools {
endLineTime
=
1
==
timeType
?
DateUtils
.
addHours
(
new
Date
(
endLineTime
),
1
).
getTime
()
:
2
==
timeType
?
DateUtils
.
addDays
(
new
Date
(
endLineTime
),
1
).
getTime
()
:
DateUtils
.
addMonths
(
new
Date
(
endLineTime
),
1
).
getTime
();
endLineTime
=
1
==
timeType
?
DateUtils
.
addHours
(
new
Date
(
endLineTime
),
1
).
getTime
()
:
2
==
timeType
?
DateUtils
.
addDays
(
new
Date
(
endLineTime
),
1
).
getTime
()
:
DateUtils
.
addMonths
(
new
Date
(
endLineTime
),
1
).
getTime
();
if
(
endLineTime
>=
endTime
||
lines
.
size
()
>=
size
){
if
(
endLineTime
>=
endTime
||
lines
.
size
()
>=
size
){
if
(
endLineTime
.
equals
(
endTime
))
{
if
(
endLineTime
.
equals
(
endTime
))
{
lines
.
add
(
new
LineVO
(
0L
,
endLineTime
));
//
lines.add(new LineVO(0L, endLineTime));
}
}
break
;
break
;
}
}
...
...
src/main/resources/application-dev.properties
View file @
ceb23b0a
...
@@ -108,7 +108,7 @@ ef.checkCaptcha.url=https://ef.zhiweidata.com/captchaApi/checkeCaptcha.do.do?id=
...
@@ -108,7 +108,7 @@ ef.checkCaptcha.url=https://ef.zhiweidata.com/captchaApi/checkeCaptcha.do.do?id=
#\u5168\u7F51\u641C\u5916\u90E8\u63A5\u53E3
#\u5168\u7F51\u641C\u5916\u90E8\u63A5\u53E3
istarshine.addIStarShineKSData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/addIStarShineKSData
istarshine.addIStarShineKSData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/addIStarShineKSData
istarshine.getIStarShineKSInfoData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/getIStarShineKSInfoData?taskId={1}&appId=6183571e0d710000f6003a12
istarshine.getIStarShineKSInfoData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/getIStarShineKSInfoData?taskId={1}&appId=6183571e0d710000f6003a12
whole.search.url
=
https://yuqing.
test.
zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/yuqing
whole.search.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/yuqing
whole.searchCriteria.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/pt
whole.searchCriteria.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/pt
whole.extraParam.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/extra/param
whole.extraParam.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/extra/param
brief.report.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/brief-report-web
brief.report.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/brief-report-web
...
...
src/main/resources/application-local.properties
View file @
ceb23b0a
...
@@ -117,7 +117,7 @@ ef.checkCaptcha.url=https://ef.zhiweidata.com/captchaApi/checkeCaptcha.do.do?id=
...
@@ -117,7 +117,7 @@ ef.checkCaptcha.url=https://ef.zhiweidata.com/captchaApi/checkeCaptcha.do.do?id=
#\u5168\u7F51\u641C\u5916\u90E8\u63A5\u53E3
#\u5168\u7F51\u641C\u5916\u90E8\u63A5\u53E3
istarshine.addIStarShineKSData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/addIStarShineKSData
istarshine.addIStarShineKSData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/addIStarShineKSData
istarshine.getIStarShineKSInfoData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/getIStarShineKSInfoData?taskId={1}&appId=6183571e0d710000f6003a12
istarshine.getIStarShineKSInfoData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/getIStarShineKSInfoData?taskId={1}&appId=6183571e0d710000f6003a12
whole.search.url
=
https://yuqing.
test.
zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/yuqing
whole.search.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/yuqing
whole.searchCriteria.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/pt
whole.searchCriteria.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/pt
whole.extraParam.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/extra/param
whole.extraParam.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/extra/param
brief.report.url
=
http://192.168.0.79:11000/qbjcbackPhoenix/interface/middleware/brief-report-web
brief.report.url
=
http://192.168.0.79:11000/qbjcbackPhoenix/interface/middleware/brief-report-web
...
...
src/main/resources/application-prod.properties
View file @
ceb23b0a
...
@@ -108,7 +108,7 @@ ef.checkCaptcha.url=https://ef.zhiweidata.com/captchaApi/checkeCaptcha.do.do?id=
...
@@ -108,7 +108,7 @@ ef.checkCaptcha.url=https://ef.zhiweidata.com/captchaApi/checkeCaptcha.do.do?id=
#\u5168\u7F51\u641C\u5916\u90E8\u63A5\u53E3
#\u5168\u7F51\u641C\u5916\u90E8\u63A5\u53E3
istarshine.addIStarShineKSData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/addIStarShineKSData
istarshine.addIStarShineKSData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/addIStarShineKSData
istarshine.getIStarShineKSInfoData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/getIStarShineKSInfoData?taskId={1}&appId=6183571e0d710000f6003a12
istarshine.getIStarShineKSInfoData.url
=
https://istarshine-service.zhiweidata.com/istarshine/ks/getIStarShineKSInfoData?taskId={1}&appId=6183571e0d710000f6003a12
whole.search.url
=
https://yuqing.
test.
zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/yuqing
whole.search.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/yuqing
whole.searchCriteria.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/pt
whole.searchCriteria.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/pt
whole.extraParam.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/extra/param
whole.extraParam.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/search/extra/param
brief.report.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/brief-report-web
brief.report.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/middleware/brief-report-web
...
...
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