Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jiwei-api
Project
Project
Details
Activity
Releases
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
马天浩
jiwei-api
Commits
c64f37d0
Commit
c64f37d0
authored
Dec 03, 2020
by
matianhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[资产资源接口] <update> 修改接口返回值类型
parent
3d77f7a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
ZczyController.java
...java/com/mth/requestsecret/controller/ZczyController.java
+2
-1
RestTemplateService.java
...va/com/mth/requestsecret/service/RestTemplateService.java
+5
-2
No files found.
src/main/java/com/mth/requestsecret/controller/ZczyController.java
View file @
c64f37d0
...
...
@@ -3,6 +3,7 @@ package com.mth.requestsecret.controller;
import
com.mth.requestsecret.service.RestTemplateService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -31,7 +32,7 @@ public class ZczyController {
* @return 解密后字符串
*/
@PostMapping
(
"/getProjectBaseInformation"
)
public
String
getProjectBaseInformation
(
String
startTime
,
String
endTime
)
throws
Exception
{
public
ResponseEntity
getProjectBaseInformation
(
String
startTime
,
String
endTime
)
throws
Exception
{
// api方法签名
String
apiMethod
=
"fGetProjectBaseInformation"
;
// api参数
...
...
src/main/java/com/mth/requestsecret/service/RestTemplateService.java
View file @
c64f37d0
...
...
@@ -250,7 +250,7 @@ public class RestTemplateService {
/**
* 资产资源接口 发送请求
*/
public
String
zczySendRequest
(
Map
<
String
,
String
>
paramMap
,
String
apiMethod
)
throws
Exception
{
public
ResponseEntity
<
String
>
zczySendRequest
(
Map
<
String
,
String
>
paramMap
,
String
apiMethod
)
throws
Exception
{
String
url
=
zczyAddress
+
apiMethod
;
log
.
info
(
"资产资源api:{}"
,
apiMethod
);
...
...
@@ -273,6 +273,9 @@ public class RestTemplateService {
String
decryptStr
=
decryptResponse
.
trim
();
log
.
info
(
"api response:{}"
,
decryptStr
);
return
decryptStr
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
HttpHeaders
.
CONTENT_TYPE
,
MediaType
.
APPLICATION_JSON_VALUE
)
.
body
(
decryptStr
);
}
}
\ 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