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
8e85a6d9
Commit
8e85a6d9
authored
Feb 15, 2023
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'release'
调整简报竞品格式2 See merge request
!205
parents
d6ea0dc4
b60202fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
src/main/java/com/zhiwei/brandkbs2/controller/app/AppContendController.java
+5
-3
src/main/java/com/zhiwei/brandkbs2/service/impl/ReportServiceImpl.java
+2
-2
src/main/java/com/zhiwei/brandkbs2/service/impl/TaskServiceImpl.java
+0
-2
No files found.
src/main/java/com/zhiwei/brandkbs2/controller/app/AppContendController.java
View file @
8e85a6d9
package
com
.
zhiwei
.
brandkbs2
.
controller
.
app
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zhiwei.brandkbs2.auth.Auth
;
import
com.zhiwei.brandkbs2.auth.UserThreadLocal
;
import
com.zhiwei.brandkbs2.controller.BaseController
;
...
...
@@ -53,9 +54,10 @@ public class AppContendController extends BaseController {
@ApiOperation
(
"竞品库-竞品对比-传播分析页面"
)
@PostMapping
(
"/spread/analyze"
)
public
ResponseResult
getSpreadAnalyze
(
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
Long
startTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
Long
endTime
,
@RequestParam
(
value
=
"contendId"
)
String
contendId
)
throws
IOException
{
public
ResponseResult
getSpreadAnalyze
(
@RequestBody
JSONObject
json
)
throws
IOException
{
Long
startTime
=
json
.
getLong
(
"startTime"
);
Long
endTime
=
json
.
getLong
(
"endTime"
);
String
contendId
=
json
.
getString
(
"contendId"
);
return
ResponseResult
.
success
(
markDataService
.
getContendSpreadAnalyze
(
startTime
,
endTime
,
UserThreadLocal
.
getProjectId
(),
contendId
,
5
,
true
));
}
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/ReportServiceImpl.java
View file @
8e85a6d9
...
...
@@ -213,7 +213,6 @@ public class ReportServiceImpl implements ReportService {
@Override
public
JSONObject
getPcReportAnalyze
(
String
id
,
boolean
cache
)
{
switchReportStatus
(
id
,
false
);
return
getPcReportAnalyze
(
reportDao
.
findOneById
(
id
),
cache
);
}
...
...
@@ -295,7 +294,6 @@ public class ReportServiceImpl implements ReportService {
reportDao
.
insertOneWithoutId
(
report
);
ApplicationProjectListener
.
getThreadPool
().
execute
(()
->
{
getPcReportAnalyze
(
report
.
getId
(),
false
);
switchReportStatus
(
report
.
getId
(),
true
);
});
}
...
...
@@ -336,6 +334,7 @@ public class ReportServiceImpl implements ReportService {
* @return 月报结果
*/
private
JSONObject
getPcReportResult
(
Report
report
)
throws
IOException
{
switchReportStatus
(
report
.
getId
(),
false
);
log
.
info
(
"getPcReportResult-生成报告开始,id:{}"
,
report
.
getId
());
Long
startTime
=
report
.
getStartTime
();
Long
endTime
=
report
.
getEndTime
();
...
...
@@ -367,6 +366,7 @@ public class ReportServiceImpl implements ReportService {
}).
collect
(
Collectors
.
toList
());
result
.
put
(
"contendCompare"
,
contendCompare
);
log
.
info
(
"getPcReportResult-生成报告结束,id:{}"
,
report
.
getId
());
switchReportStatus
(
report
.
getId
(),
true
);
return
result
;
}
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/TaskServiceImpl.java
View file @
8e85a6d9
...
...
@@ -306,7 +306,6 @@ public class TaskServiceImpl implements TaskService {
Report
report
=
booleanReportPair
.
getRight
();
// 用作生成缓存
reportService
.
getPcReportAnalyze
(
report
.
getId
(),
false
);
reportService
.
switchReportStatus
(
report
.
getId
(),
true
);
}
flag
=
true
;
}
...
...
@@ -315,7 +314,6 @@ public class TaskServiceImpl implements TaskService {
for
(
Report
report
:
reportService
.
getCustomReportByStatus
(
project
.
getId
(),
false
))
{
// 用作生成缓存
reportService
.
getPcReportAnalyze
(
report
.
getId
(),
false
);
reportService
.
switchReportStatus
(
report
.
getId
(),
true
);
}
return
flag
;
}
...
...
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