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
2f862a94
Commit
2f862a94
authored
Jul 07, 2023
by
shenjunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
舆情库-定制简报
parent
69acfe91
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
3 deletions
+59
-3
pom.xml
+23
-0
src/main/java/com/zhiwei/brandkbs2/controller/app/AppArticleController.java
+30
-0
src/main/java/com/zhiwei/brandkbs2/controller/app/AppHotController.java
+1
-1
src/main/java/com/zhiwei/brandkbs2/service/impl/ReportServiceImpl.java
+2
-2
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.
pom.xml
View file @
2f862a94
...
@@ -148,7 +148,30 @@
...
@@ -148,7 +148,30 @@
<groupId>
io.springfox
</groupId>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
${springfox.version}
</version>
<version>
${springfox.version}
</version>
<exclusions>
<exclusion>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
</exclusion>
<exclusion>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-models
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
<version>
1.5.21
</version>
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-models
</artifactId>
<version>
1.5.21
</version>
</dependency>
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<artifactId>
springfox-swagger-ui
</artifactId>
...
...
src/main/java/com/zhiwei/brandkbs2/controller/app/AppArticleController.java
View file @
2f862a94
...
@@ -23,7 +23,11 @@ import io.swagger.annotations.ApiImplicitParam;
...
@@ -23,7 +23,11 @@ import io.swagger.annotations.ApiImplicitParam;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.tuple.Pair
;
import
org.apache.commons.lang3.tuple.Pair
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.List
;
...
@@ -53,6 +57,12 @@ public class AppArticleController extends BaseController {
...
@@ -53,6 +57,12 @@ public class AppArticleController extends BaseController {
@Resource
(
name
=
"projectServiceImpl"
)
@Resource
(
name
=
"projectServiceImpl"
)
ProjectService
projectService
;
ProjectService
projectService
;
@Autowired
private
RestTemplate
restTemplate
;
@Value
(
"${brief.report.url}"
)
private
String
briefReportUrl
;
@ApiOperation
(
"原始数据列表"
)
@ApiOperation
(
"原始数据列表"
)
@PostMapping
(
"/origin/list"
)
@PostMapping
(
"/origin/list"
)
@LogRecord
(
description
=
"舆情库-原始数据列表"
)
@LogRecord
(
description
=
"舆情库-原始数据列表"
)
...
@@ -228,6 +238,26 @@ public class AppArticleController extends BaseController {
...
@@ -228,6 +238,26 @@ public class AppArticleController extends BaseController {
return
ResponseResult
.
success
(
commonService
.
getTimeRangeMonth
());
return
ResponseResult
.
success
(
commonService
.
getTimeRangeMonth
());
}
}
@ApiOperation
(
"舆情简报-定制简报-获取"
)
@GetMapping
(
"/report/brief"
)
public
ResponseResult
getBriefReport
(
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
Long
startTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
Long
endTime
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
)
{
String
linkedGroupId
=
projectService
.
getProjectById
(
UserThreadLocal
.
getProjectId
()).
getBrandLinkedGroupId
();
ResponseEntity
<
JSONObject
>
responseEntity
=
restTemplate
.
getForEntity
(
briefReportUrl
+
"?startTime={1}&endTime={2}&page={3}&pageSize={4}&projectId={5"
+
"}&keyword={6}"
,
JSONObject
.
class
,
startTime
,
endTime
,
page
,
pageSize
,
linkedGroupId
,
keyword
);
return
ResponseResult
.
success
(
responseEntity
.
getBody
());
}
@ApiOperation
(
"舆情简报-定制简报-删除"
)
@DeleteMapping
(
"/report/brief/{id}"
)
public
ResponseResult
deleteBriefReport
(
@PathVariable
String
id
)
{
restTemplate
.
delete
(
briefReportUrl
+
"/"
+
id
);
return
ResponseResult
.
success
();
}
@ApiOperation
(
"舆情简报-分类统计"
)
@ApiOperation
(
"舆情简报-分类统计"
)
@GetMapping
(
"/report/aggCount"
)
@GetMapping
(
"/report/aggCount"
)
public
ResponseResult
getReportsAggCount
()
{
public
ResponseResult
getReportsAggCount
()
{
...
...
src/main/java/com/zhiwei/brandkbs2/controller/app/AppHotController.java
View file @
2f862a94
...
@@ -292,7 +292,7 @@ public class AppHotController extends BaseController {
...
@@ -292,7 +292,7 @@ public class AppHotController extends BaseController {
@ApiOperation
(
"热点库-品牌热点-热点总览"
)
@ApiOperation
(
"热点库-品牌热点-热点总览"
)
@GetMapping
(
"/overview"
)
@GetMapping
(
"/overview"
)
public
ResponseResult
hotOverview
()
{
public
ResponseResult
hotOverview
()
{
Long
[]
timeMonth
=
commonService
.
getTimeRange
Format
Month
();
Long
[]
timeMonth
=
commonService
.
getTimeRangeMonth
();
JSONObject
result
=
searchHotHandler
(
10000
,
1
,
allPlatform
,
"endTime"
,
timeMonth
[
0
],
timeMonth
[
1
]);
JSONObject
result
=
searchHotHandler
(
10000
,
1
,
allPlatform
,
"endTime"
,
timeMonth
[
0
],
timeMonth
[
1
]);
if
(
Objects
.
isNull
(
result
))
{
if
(
Objects
.
isNull
(
result
))
{
return
ResponseResult
.
success
();
return
ResponseResult
.
success
();
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/ReportServiceImpl.java
View file @
2f862a94
...
@@ -159,7 +159,7 @@ public class ReportServiceImpl implements ReportService {
...
@@ -159,7 +159,7 @@ public class ReportServiceImpl implements ReportService {
public
JSONObject
getReportsAggCount
()
{
public
JSONObject
getReportsAggCount
()
{
JSONObject
result
=
new
JSONObject
();
JSONObject
result
=
new
JSONObject
();
List
<
JSONObject
>
reportAggCount
=
reportDao
.
getReportAggCount
(
UserThreadLocal
.
getProjectId
());
List
<
JSONObject
>
reportAggCount
=
reportDao
.
getReportAggCount
(
UserThreadLocal
.
getProjectId
());
result
.
put
(
"times"
,
addYearTimeWithAggCount
(
filterAggCount
(
reportAggCount
,
"year"
,
"count"
)));
//
result.put("times", addYearTimeWithAggCount(filterAggCount(reportAggCount, "year", "count")));
result
.
put
(
"types"
,
filterAggCount
(
reportAggCount
,
"type"
,
"count"
));
result
.
put
(
"types"
,
filterAggCount
(
reportAggCount
,
"type"
,
"count"
));
return
result
;
return
result
;
}
}
...
@@ -192,7 +192,7 @@ public class ReportServiceImpl implements ReportService {
...
@@ -192,7 +192,7 @@ public class ReportServiceImpl implements ReportService {
});
});
}
}
JSONObject
all
=
new
JSONObject
();
JSONObject
all
=
new
JSONObject
();
all
.
put
(
"name"
,
"
不限
"
);
all
.
put
(
"name"
,
"
全部
"
);
all
.
put
(
"count"
,
collect
.
values
().
stream
().
mapToInt
(
v
->
v
).
sum
());
all
.
put
(
"count"
,
collect
.
values
().
stream
().
mapToInt
(
v
->
v
).
sum
());
result
.
add
(
0
,
all
);
result
.
add
(
0
,
all
);
return
result
;
return
result
;
...
...
src/main/resources/application-dev.properties
View file @
2f862a94
...
@@ -99,6 +99,7 @@ istarshine.getIStarShineKSInfoData.url=https://istarshine-service.zhiweidata.com
...
@@ -99,6 +99,7 @@ istarshine.getIStarShineKSInfoData.url=https://istarshine-service.zhiweidata.com
whole.search.url
=
https://yuqing.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
#\u60C5\u62A5\u9884\u8B66\u5916\u90E8\u63A5\u53E3
#\u60C5\u62A5\u9884\u8B66\u5916\u90E8\u63A5\u53E3
warn.pushTask.token
=
AoJ0ooy3H2BpHmuaviYObTKw/Xfw/oA5aKccNYhYnoJFJQ/BgeW/
warn.pushTask.token
=
AoJ0ooy3H2BpHmuaviYObTKw/Xfw/oA5aKccNYhYnoJFJQ/BgeW/
warn.project.url
=
https://auto-push.zhiweidata.com/qbjc/brandkbsPush/interface/brandkbs/project
warn.project.url
=
https://auto-push.zhiweidata.com/qbjc/brandkbsPush/interface/brandkbs/project
...
...
src/main/resources/application-local.properties
View file @
2f862a94
...
@@ -103,6 +103,7 @@ istarshine.getIStarShineKSInfoData.url=https://istarshine-service.zhiweidata.com
...
@@ -103,6 +103,7 @@ istarshine.getIStarShineKSInfoData.url=https://istarshine-service.zhiweidata.com
whole.search.url
=
https://yuqing.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
#\u60C5\u62A5\u9884\u8B66\u5916\u90E8\u63A5\u53E3
#\u60C5\u62A5\u9884\u8B66\u5916\u90E8\u63A5\u53E3
warn.pushTask.token
=
AoJ0ooy3H2BpHmuaviYObTKw/Xfw/oA5aKccNYhYnoJFJQ/BgeW/
warn.pushTask.token
=
AoJ0ooy3H2BpHmuaviYObTKw/Xfw/oA5aKccNYhYnoJFJQ/BgeW/
warn.project.url
=
http://192.168.0.225:11003/qbjc/brandkbsPush/interface/brandkbs/project
warn.project.url
=
http://192.168.0.225:11003/qbjc/brandkbsPush/interface/brandkbs/project
...
...
src/main/resources/application-prod.properties
View file @
2f862a94
...
@@ -99,6 +99,7 @@ istarshine.getIStarShineKSInfoData.url=https://istarshine-service.zhiweidata.com
...
@@ -99,6 +99,7 @@ istarshine.getIStarShineKSInfoData.url=https://istarshine-service.zhiweidata.com
whole.search.url
=
https://yuqing.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
#\u60C5\u62A5\u9884\u8B66\u5916\u90E8\u63A5\u53E3
#\u60C5\u62A5\u9884\u8B66\u5916\u90E8\u63A5\u53E3
warn.pushTask.token
=
AoJ0ooy3H2BpHmuaviYObTKw/Xfw/oA5aKccNYhYnoJFJQ/BgeW/
warn.pushTask.token
=
AoJ0ooy3H2BpHmuaviYObTKw/Xfw/oA5aKccNYhYnoJFJQ/BgeW/
warn.project.url
=
https://auto-push.zhiweidata.com/qbjc/brandkbsPush/interface/brandkbs/project
warn.project.url
=
https://auto-push.zhiweidata.com/qbjc/brandkbsPush/interface/brandkbs/project
...
...
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