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