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
5692bfb4
Commit
5692bfb4
authored
Aug 11, 2023
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
Feature See merge request
!377
parents
0b836a50
9ee4925d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
6 deletions
+11
-6
src/main/java/com/zhiwei/brandkbs2/controller/app/AppHotController.java
+8
-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 @
5692bfb4
...
...
@@ -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.URLEncoder
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -347,8 +349,11 @@ 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
Exception
{
// 参数中可能的特殊字符故做此处理
name
=
URLEncoder
.
encode
(
name
,
"UTF-8"
);
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 +363,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 @
5692bfb4
...
...
@@ -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 @
5692bfb4
...
...
@@ -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 @
5692bfb4
...
...
@@ -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