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
f6d3b707
Commit
f6d3b707
authored
Aug 04, 2023
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release' into 'master'
Release See merge request
!374
parents
302ca547
11b5fe7e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
6 deletions
+13
-6
src/main/java/com/zhiwei/brandkbs2/controller/app/AppHotController.java
+10
-3
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/controller/app/AppHotController.java
View file @
f6d3b707
...
...
@@ -33,6 +33,8 @@ import org.springframework.web.client.RestTemplate;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.net.URI
;
import
java.net.URISyntaxException
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -347,8 +349,13 @@ public class AppHotController extends BaseController {
@ApiOperation
(
"热点库-品牌热点-热搜趋势"
)
@GetMapping
(
"/trend"
)
public
ResponseResult
hotSearchTrend
(
@RequestParam
String
name
,
@RequestParam
Long
startTime
,
@RequestParam
String
type
)
{
ResponseEntity
<
JSONObject
>
jsonObjectResponseEntity
=
restTemplate
.
getForEntity
(
hotSearchTrendUrl
,
JSONObject
.
class
,
name
,
startTime
,
HotPlatformEnum
.
convertFromName2Eng
(
type
));
public
ResponseResult
hotSearchTrend
(
@RequestParam
String
name
,
@RequestParam
Long
startTime
,
@RequestParam
String
type
)
throws
URISyntaxException
{
// 热搜名可能含有特殊字符,故使用特殊请求方式
if
(
name
.
contains
(
"+"
)){
name
=
name
.
replace
(
"+"
,
"%2B"
);
}
String
url
=
hotSearchTrendUrl
+
"?name="
+
name
+
"&startTime="
+
startTime
+
"&type="
+
HotPlatformEnum
.
convertFromName2Eng
(
type
);
ResponseEntity
<
JSONObject
>
jsonObjectResponseEntity
=
restTemplate
.
getForEntity
(
new
URI
(
url
),
JSONObject
.
class
);
if
(
Objects
.
isNull
(
jsonObjectResponseEntity
.
getBody
()))
{
return
ResponseResult
.
failure
(
"查询热搜趋势失败"
);
}
...
...
@@ -358,7 +365,7 @@ public class AppHotController extends BaseController {
@ApiOperation
(
"热点库-品牌热点-上榜/峰值截图"
)
@GetMapping
(
"/snapshot"
)
public
ResponseResult
hotSnapshot
(
@RequestParam
String
type
,
@RequestParam
Long
time
,
@RequestParam
Integer
rank
)
{
ResponseEntity
<
JSONObject
>
jsonObjectResponseEntity
=
restTemplate
.
getForEntity
(
hotSearchSnapshotUrl
,
JSONObject
.
class
,
HotPlatformEnum
.
convertFromName2Eng
(
type
)
,
time
,
rank
);
ResponseEntity
<
JSONObject
>
jsonObjectResponseEntity
=
restTemplate
.
getForEntity
(
hotSearchSnapshotUrl
,
JSONObject
.
class
,
type
,
time
,
rank
);
if
(
Objects
.
isNull
(
jsonObjectResponseEntity
.
getBody
()))
{
return
ResponseResult
.
failure
(
"上榜/峰值截图失败"
);
}
...
...
src/main/resources/application-dev.properties
View file @
f6d3b707
...
...
@@ -85,7 +85,7 @@ trends.longTimeInListSearchByInner.url=https://trends.zhiweidata.com/hotSearchTr
trends.findHotSearchESDataInTimeByInner.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
trends.longTimeInListSearch.url
=
https://trends.zhiweidata.com/hotSearchTrend/search/longTimeInListSearch?type={1}&sortType=realTime
trends.getHotSearchFromEsInTimeAndTypeOrWord.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/getHotSearchFromEsInTimeAndTypeOrWord?limit={1}&page={2}&type={3}&word={4}&sort={5}&accurateWord={6}&maskWord={7}
trends.queryHotSearchTrendInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/queryHotSearchTrendInner
?name={1}&startTime={2}&type={3}
trends.queryHotSearchTrendInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/queryHotSearchTrendInner
trends.getHotSearchSnapshot.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/getHotSearchSnapshot?type={1}&time={2}&rank={3}
#\u4E8B\u4EF6\u5E93\u5916\u90E8\u63A5\u53E3
ef.search.url
=
https://ef.zhiweidata.com/external/search.do?name={1}&page={2}
...
...
src/main/resources/application-local.properties
View file @
f6d3b707
...
...
@@ -88,7 +88,7 @@ trends.longTimeInListSearchByInner.url=https://trends.zhiweidata.com/hotSearchTr
trends.findHotSearchESDataInTimeByInner.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
trends.longTimeInListSearch.url
=
https://trends.zhiweidata.com/hotSearchTrend/search/longTimeInListSearch?type={1}&sortType=realTime
trends.getHotSearchFromEsInTimeAndTypeOrWord.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/getHotSearchFromEsInTimeAndTypeOrWord?limit={1}&page={2}&type={3}&word={4}&sort={5}&accurateWord={6}&maskWord={7}
trends.queryHotSearchTrendInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/queryHotSearchTrendInner
?name={1}&startTime={2}&type={3}
trends.queryHotSearchTrendInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/queryHotSearchTrendInner
trends.getHotSearchSnapshot.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/getHotSearchSnapshot?type={1}&time={2}&rank={3}
#\u4E8B\u4EF6\u5E93\u5916\u90E8\u63A5\u53E3
...
...
src/main/resources/application-prod.properties
View file @
f6d3b707
...
...
@@ -85,7 +85,7 @@ trends.longTimeInListSearchByInner.url=https://trends.zhiweidata.com/hotSearchTr
trends.findHotSearchESDataInTimeByInner.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
trends.longTimeInListSearch.url
=
https://trends.zhiweidata.com/hotSearchTrend/search/longTimeInListSearch?type={1}&sortType=realTime
trends.getHotSearchFromEsInTimeAndTypeOrWord.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/getHotSearchFromEsInTimeAndTypeOrWord?limit={1}&page={2}&type={3}&word={4}&sort={5}&accurateWord={6}&maskWord={7}
trends.queryHotSearchTrendInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/queryHotSearchTrendInner
?name={1}&startTime={2}&type={3}
trends.queryHotSearchTrendInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/queryHotSearchTrendInner
trends.getHotSearchSnapshot.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/getHotSearchSnapshot?type={1}&time={2}&rank={3}
#\u4E8B\u4EF6\u5E93\u5916\u90E8\u63A5\u53E3
ef.search.url
=
https://ef.zhiweidata.com/external/search.do?name={1}&page={2}
...
...
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