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
5ade5814
Commit
5ade5814
authored
Aug 10, 2022
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature' into feature
parents
4f1a595f
b6907a3c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
0 deletions
+81
-0
src/main/java/com/zhiwei/brandkbs2/controller/app/AppEventController.java
+68
-0
src/main/java/com/zhiwei/brandkbs2/pojo/dto/MarkSearchDTO.java
+6
-0
src/main/resources/application-local.properties
+7
-0
No files found.
src/main/java/com/zhiwei/brandkbs2/controller/app/AppEventController.java
View file @
5ade5814
package
com
.
zhiwei
.
brandkbs2
.
controller
.
app
;
package
com
.
zhiwei
.
brandkbs2
.
controller
.
app
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zhiwei.brandkbs2.auth.Auth
;
import
com.zhiwei.brandkbs2.auth.Auth
;
import
com.zhiwei.brandkbs2.controller.BaseController
;
import
com.zhiwei.brandkbs2.controller.BaseController
;
import
com.zhiwei.brandkbs2.enmus.RoleEnum
;
import
com.zhiwei.brandkbs2.enmus.RoleEnum
;
...
@@ -7,7 +9,11 @@ import com.zhiwei.brandkbs2.model.ResponseResult;
...
@@ -7,7 +9,11 @@ import com.zhiwei.brandkbs2.model.ResponseResult;
import
com.zhiwei.brandkbs2.service.EventService
;
import
com.zhiwei.brandkbs2.service.EventService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
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
;
/**
/**
* @Description: 前台事件库
* @Description: 前台事件库
...
@@ -19,6 +25,23 @@ import org.springframework.web.bind.annotation.*;
...
@@ -19,6 +25,23 @@ import org.springframework.web.bind.annotation.*;
@Api
(
tags
=
"前台事件库"
,
description
=
"提供前台事件相关信息展示"
)
@Api
(
tags
=
"前台事件库"
,
description
=
"提供前台事件相关信息展示"
)
@Auth
(
role
=
RoleEnum
.
CUSTOMER
)
@Auth
(
role
=
RoleEnum
.
CUSTOMER
)
public
class
AppEventController
extends
BaseController
{
public
class
AppEventController
extends
BaseController
{
@Autowired
private
RestTemplate
restTemplate
;
@Value
(
"${ef.search.url}"
)
private
String
getEfSearchUrl
;
@Value
(
"${ef.searchCriteria.url}"
)
private
String
getEfSearchCriteriaUrl
;
@Value
(
"${ef.filterNew.url}"
)
private
String
getFilterNewUrl
;
@Value
(
"${ef.captcha.url}"
)
private
String
efCaptchaUrl
;
@Value
(
"${ef.checkCaptcha.url}"
)
private
String
efCheckCaptchaUrl
;
private
final
EventService
eventService
;
private
final
EventService
eventService
;
...
@@ -75,4 +98,49 @@ public class AppEventController extends BaseController {
...
@@ -75,4 +98,49 @@ public class AppEventController extends BaseController {
return
ResponseResult
.
success
(
eventService
.
getEventTopArticlesAnalysis
(
id
,
type
,
emotion
,
aggTitle
));
return
ResponseResult
.
success
(
eventService
.
getEventTopArticlesAnalysis
(
id
,
type
,
emotion
,
aggTitle
));
}
}
@ApiOperation
(
"前台事件库-全网事件库-搜索"
)
@GetMapping
(
"/getWholeNetworkEvents"
)
public
ResponseResult
getWholeNetworkEvents
(
@RequestParam
(
"keyword"
)
String
keyword
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
){
String
name
=
keyword
.
trim
();
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
getForEntity
(
getEfSearchUrl
,
String
.
class
,
name
,
page
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
responseEntity
.
getBody
());
return
ResponseResult
.
success
(
jsonObject
);
}
@ApiOperation
(
"前台事件库-全网事件库-搜索条件"
)
@GetMapping
(
"/getWholeNetworkSearchCriteria"
)
public
ResponseResult
getWholeNetworkSearchCriteria
(){
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
getForEntity
(
getEfSearchCriteriaUrl
,
String
.
class
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
responseEntity
.
getBody
());
return
ResponseResult
.
success
(
jsonObject
);
}
@ApiOperation
(
"前台事件库-全网事件库-列表"
)
@GetMapping
(
"/getWholeNetworkEventsList"
)
public
ResponseResult
getWholeNetworkEventsList
(
@RequestParam
(
value
=
"firstType"
,
required
=
false
,
defaultValue
=
""
)
String
firstType
,
@RequestParam
(
value
=
"start"
,
required
=
false
,
defaultValue
=
"0"
)
long
start
,
@RequestParam
(
value
=
"end"
,
required
=
false
,
defaultValue
=
"0"
)
long
end
,
@RequestParam
(
value
=
"page"
,
required
=
false
,
defaultValue
=
"1"
)
int
page
){
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
getForEntity
(
getFilterNewUrl
,
String
.
class
,
firstType
,
start
,
end
,
page
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
responseEntity
.
getBody
());
return
ResponseResult
.
success
(
jsonObject
);
}
@ApiOperation
(
"前台事件库-全网事件库-得到验证码"
)
@GetMapping
(
"/getWholeNetworkCaptcha"
)
public
ResponseResult
getWholeNetworkCaptcha
(){
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
getForEntity
(
efCaptchaUrl
,
String
.
class
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
responseEntity
.
getBody
());
return
ResponseResult
.
success
(
jsonObject
);
}
@ApiOperation
(
"前台事件库-全网事件库-校验验证码"
)
@GetMapping
(
"/checkWholeNetworkCaptcha"
)
public
ResponseResult
checkWholeNetworkCaptcha
(
@RequestParam
(
value
=
"id"
,
required
=
false
,
defaultValue
=
""
)
String
id
,
@RequestParam
(
value
=
"captcha"
,
required
=
false
,
defaultValue
=
""
)
String
captcha
){
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
getForEntity
(
efCheckCaptchaUrl
,
String
.
class
,
id
,
captcha
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
responseEntity
.
getBody
());
return
ResponseResult
.
success
(
jsonObject
);
}
}
}
src/main/java/com/zhiwei/brandkbs2/pojo/dto/MarkSearchDTO.java
View file @
5ade5814
...
@@ -40,6 +40,12 @@ public class MarkSearchDTO {
...
@@ -40,6 +40,12 @@ public class MarkSearchDTO {
private
String
linkedGroupId
;
private
String
linkedGroupId
;
/**
/**
* 竞品id,主品牌默认0
*/
@ApiModelProperty
(
value
=
"竞品id"
)
private
String
contendId
=
"0"
;
/**
* 时间类型
* 时间类型
*/
*/
@ApiModelProperty
(
"时间类型"
)
@ApiModelProperty
(
"时间类型"
)
...
...
src/main/resources/application-local.properties
View file @
5ade5814
...
@@ -70,3 +70,9 @@ crisis.share.url=https://crisis.zhiweidata.com/app/brandkbs/share/{1}
...
@@ -70,3 +70,9 @@ crisis.share.url=https://crisis.zhiweidata.com/app/brandkbs/share/{1}
trends.longTimeInListSearchByInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={2}
trends.longTimeInListSearchByInner.url
=
https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={2}
trends.findHotSearchESDataInTimeByInner.url
=
https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
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.longTimeInListSearch.url
=
https://trends.zhiweidata.com/hotSearchTrend/search/longTimeInListSearch?type={1}&sortType=realTime
#\u4E8B\u4EF6\u5E93\u5916\u90E8\u63A5\u53E3
ef.search.url
=
https://ef.zhiweidata.com/external/search.do?name={1}&page={2}
ef.searchCriteria.url
=
https://ef.zhiweidata.com/index/getSearchKey.do
ef.filterNew.url
=
https://ef.zhiweidata.com/filterNew.do?firstType={1}&start={2}&end={3}&page={4}
ef.captcha.url
=
https://ef.zhiweidata.com/captchaApi/getNewCaptcha.do.do?type=test
ef.checkCaptcha.url
=
https://ef.zhiweidata.com/captchaApi/checkeCaptcha.do.do?id={1}&captcha={2}&type=test
\ No newline at end of file
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