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
ec09a886
Commit
ec09a886
authored
Jan 04, 2023
by
陈健智
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature' into feature
parents
3c32fd63
172d28b8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
7 deletions
+63
-7
src/main/java/com/zhiwei/brandkbs2/common/GenericAttribute.java
+1
-1
src/main/java/com/zhiwei/brandkbs2/controller/LoginController.java
+49
-4
src/main/java/com/zhiwei/brandkbs2/controller/app/AppArticleController.java
+7
-0
src/main/resources/application-dev.properties
+3
-1
src/main/resources/application-prod.properties
+3
-1
No files found.
src/main/java/com/zhiwei/brandkbs2/common/GenericAttribute.java
View file @
ec09a886
...
@@ -14,7 +14,7 @@ public class GenericAttribute {
...
@@ -14,7 +14,7 @@ public class GenericAttribute {
/**
/**
* es index
* es index
*/
*/
public
static
final
String
ES_INDEX_PRE
=
"brandkbs2"
;
public
static
final
String
ES_INDEX_PRE
=
"brandkbs2
_
"
;
// public static final String ES_INDEX_TEST = "brandkbs2_test";
// public static final String ES_INDEX_TEST = "brandkbs2_test";
public
static
final
String
ES_INDEX_TEST
=
"brandkbs2_2022"
;
public
static
final
String
ES_INDEX_TEST
=
"brandkbs2_2022"
;
public
static
final
String
ES_CHANNEL_INDEX_TEST
=
"brandkbs2_channel_record_test"
;
public
static
final
String
ES_CHANNEL_INDEX_TEST
=
"brandkbs2_channel_record_test"
;
...
...
src/main/java/com/zhiwei/brandkbs2/controller/LoginController.java
View file @
ec09a886
...
@@ -10,11 +10,13 @@ import io.swagger.annotations.Api;
...
@@ -10,11 +10,13 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
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.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -34,6 +36,15 @@ public class LoginController extends BaseController {
...
@@ -34,6 +36,15 @@ public class LoginController extends BaseController {
@Value
(
"${jwt.hour}"
)
@Value
(
"${jwt.hour}"
)
private
int
jwtHour
;
private
int
jwtHour
;
@Value
(
"${qbjc.userCenter.url}"
)
private
String
yuqingInterface
;
@Value
(
"${qbjc.userCenter.token}"
)
private
String
token
;
@Autowired
private
RestTemplate
restTemplate
;
@Resource
(
name
=
"userServiceImpl"
)
@Resource
(
name
=
"userServiceImpl"
)
private
UserService
UserService
;
private
UserService
UserService
;
...
@@ -91,6 +102,40 @@ public class LoginController extends BaseController {
...
@@ -91,6 +102,40 @@ public class LoginController extends BaseController {
return
ResponseResult
.
success
(
ProjectService
.
getLoginUserAllProjects
());
return
ResponseResult
.
success
(
ProjectService
.
getLoginUserAllProjects
());
}
}
@ApiOperation
(
"第三方接入-验证External-Token"
)
@GetMapping
(
"/user/login/verify/token"
)
public
ResponseResult
verifyToken
()
{
HttpHeaders
httpHeaders
=
new
HttpHeaders
();
httpHeaders
.
set
(
"External-Origin"
,
"BRANDKBS"
);
httpHeaders
.
set
(
"External-Service"
,
"BRANDKBS"
);
httpHeaders
.
set
(
"External-Token"
,
token
);
HttpEntity
<
String
>
requestEntity
=
new
HttpEntity
<>(
httpHeaders
);
HttpEntity
<
JSONObject
>
entity
=
restTemplate
.
exchange
(
yuqingInterface
+
"/thirdPart/external/verify/token"
,
HttpMethod
.
GET
,
requestEntity
,
JSONObject
.
class
);
if
(
null
!=
entity
.
getBody
()
||
!
entity
.
getBody
().
getBoolean
(
"status"
))
{
String
ticket
=
entity
.
getBody
().
getJSONObject
(
"data"
).
getString
(
"ticket"
);
return
ResponseResult
.
success
(
ticket
);
}
return
ResponseResult
.
failure
(
"ticket获取失败"
);
}
@ApiOperation
(
"第三方接入-验证External-Ticket"
)
@GetMapping
(
"/user/login/verify/ticket"
)
public
ResponseResult
verifyTicket
(
@RequestParam
String
ticket
)
{
HttpHeaders
httpHeaders
=
new
HttpHeaders
();
httpHeaders
.
set
(
"External-Origin"
,
"BRANDKBS"
);
httpHeaders
.
set
(
"External-Token"
,
token
);
httpHeaders
.
set
(
"External-Ticket"
,
ticket
);
HttpEntity
<
String
>
requestEntity
=
new
HttpEntity
<>(
httpHeaders
);
HttpEntity
<
JSONObject
>
entity
=
restTemplate
.
exchange
(
yuqingInterface
+
"/thirdPart/external/verify/ticket"
,
HttpMethod
.
GET
,
requestEntity
,
JSONObject
.
class
);
if
(
null
!=
entity
.
getBody
())
{
JSONObject
userInfo
=
entity
.
getBody
().
getJSONObject
(
"data"
);
return
ResponseResult
.
success
(
userInfo
);
}
return
ResponseResult
.
failure
(
"用户信息获取失败"
);
}
@ApiOperation
(
"测试接口"
)
@ApiOperation
(
"测试接口"
)
@GetMapping
(
"/test"
)
@GetMapping
(
"/test"
)
public
ResponseResult
test
()
{
public
ResponseResult
test
()
{
...
...
src/main/java/com/zhiwei/brandkbs2/controller/app/AppArticleController.java
View file @
ec09a886
...
@@ -182,5 +182,12 @@ public class AppArticleController extends BaseController {
...
@@ -182,5 +182,12 @@ public class AppArticleController extends BaseController {
return
ResponseResult
.
success
(
reportService
.
getPcReportAnalyze
(
id
,
true
));
return
ResponseResult
.
success
(
reportService
.
getPcReportAnalyze
(
id
,
true
));
}
}
@ApiOperation
(
"舆情简报-更新报告结果"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"报告ID"
,
required
=
true
,
paramType
=
"path"
,
dataType
=
"String"
)
@PutMapping
(
"/update/{id}"
)
public
ResponseResult
updateReportAnalyze
(
@PathVariable
String
id
)
{
reportService
.
getPcReportAnalyze
(
id
,
false
);
return
ResponseResult
.
success
();
}
}
}
src/main/resources/application-dev.properties
View file @
ec09a886
...
@@ -36,7 +36,7 @@ es.httpClusterNodes=192.168.0.130:9200:qbjc-back:yuqing.zhiweidata.com,192.168.0
...
@@ -36,7 +36,7 @@ es.httpClusterNodes=192.168.0.130:9200:qbjc-back:yuqing.zhiweidata.com,192.168.0
#es.password=3vh65l$i6qQA
#es.password=3vh65l$i6qQA
es.username
=
joker
es.username
=
joker
es.password
=
jokerdevops
es.password
=
jokerdevops
es.index.test
=
tru
e
es.index.test
=
fals
e
#channel-index
#channel-index
channel.index.registry
=
zookeeper://192.168.0.104:2182?backup=192.168.0.105:2182,192.168.0.203:2182
channel.index.registry
=
zookeeper://192.168.0.104:2182?backup=192.168.0.105:2182,192.168.0.203:2182
...
@@ -62,6 +62,8 @@ qbjc.project.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/project
...
@@ -62,6 +62,8 @@ qbjc.project.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/project
qbjc.event.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/aplan/event
qbjc.event.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/aplan/event
qbjc.event.tag.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/tag/event?project={1}
qbjc.event.tag.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/tag/event?project={1}
qbjc.platform.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/platform/resource
qbjc.platform.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/platform/resource
qbjc.userCenter.url
=
https://login.zhiweidata.com/plogin/center
qbjc.userCenter.token
=
AoJ0ooy3HV1EElWnvQw9YTS9b5Y+fmtkbM6DdpPgDO6D/OhNqH4qrJKarzMr
#\u5371\u673A\u5E93\u5916\u90E8\u63A5\u53E3
#\u5371\u673A\u5E93\u5916\u90E8\u63A5\u53E3
crisis.search.url
=
https://crisis.zhiweidata.com/app/brandkbs/crisisSearch?page={1}&size={2}&keyword={3}
crisis.search.url
=
https://crisis.zhiweidata.com/app/brandkbs/crisisSearch?page={1}&size={2}&keyword={3}
crisis.searchTags.url
=
https://crisis.zhiweidata.com/app/brandkbs/searchCrisisByTags?page={1}&size={2}&brand={3}&category={4}
crisis.searchTags.url
=
https://crisis.zhiweidata.com/app/brandkbs/searchCrisisByTags?page={1}&size={2}&brand={3}&category={4}
...
...
src/main/resources/application-prod.properties
View file @
ec09a886
...
@@ -36,7 +36,7 @@ es.httpClusterNodes=192.168.0.130:9200:qbjc-back:yuqing.zhiweidata.com,192.168.0
...
@@ -36,7 +36,7 @@ es.httpClusterNodes=192.168.0.130:9200:qbjc-back:yuqing.zhiweidata.com,192.168.0
#es.password=3vh65l$i6qQA
#es.password=3vh65l$i6qQA
es.username
=
joker
es.username
=
joker
es.password
=
jokerdevops
es.password
=
jokerdevops
es.index.test
=
tru
e
es.index.test
=
fals
e
#channel-index
#channel-index
channel.index.registry
=
zookeeper://192.168.0.104:2182?backup=192.168.0.105:2182,192.168.0.203:2182
channel.index.registry
=
zookeeper://192.168.0.104:2182?backup=192.168.0.105:2182,192.168.0.203:2182
...
@@ -62,6 +62,8 @@ qbjc.project.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/project
...
@@ -62,6 +62,8 @@ qbjc.project.url=https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/project
qbjc.event.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/aplan/event
qbjc.event.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/aplan/event
qbjc.event.tag.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/tag/event?project={1}
qbjc.event.tag.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/tag/event?project={1}
qbjc.platform.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/platform/resource
qbjc.platform.url
=
https://yuqing.zhiweidata.com/qbjcbackPhoenix/interface/platform/resource
qbjc.userCenter.url
=
https://login.zhiweidata.com/plogin/center
qbjc.userCenter.token
=
AoJ0ooy3HV1EElWnvQw9YTS9b5Y+fmtkbM6DdpPgDO6D/OhNqH4qrJKarzMr
#\u5371\u673A\u5E93\u5916\u90E8\u63A5\u53E3
#\u5371\u673A\u5E93\u5916\u90E8\u63A5\u53E3
crisis.search.url
=
https://crisis.zhiweidata.com/app/brandkbs/crisisSearch?page={1}&size={2}&keyword={3}
crisis.search.url
=
https://crisis.zhiweidata.com/app/brandkbs/crisisSearch?page={1}&size={2}&keyword={3}
crisis.searchTags.url
=
https://crisis.zhiweidata.com/app/brandkbs/searchCrisisByTags?page={1}&size={2}&brand={3}&category={4}
crisis.searchTags.url
=
https://crisis.zhiweidata.com/app/brandkbs/searchCrisisByTags?page={1}&size={2}&brand={3}&category={4}
...
...
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