Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-api
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
huluobin
bailuntec-api
Commits
0fc8bef6
Commit
0fc8bef6
authored
Jan 22, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# update
parent
cda0109f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
+3
-6
OaApi.java
src/main/java/com/bailuntec/api/bailuntec/oa/OaApi.java
+1
-0
ExchangeRate.java
...com/bailuntec/api/bailuntec/oa/response/ExchangeRate.java
+1
-5
OaApiTest.java
src/test/java/com/bailuntec/api/bailuntec/oa/OaApiTest.java
+1
-1
No files found.
src/main/java/com/bailuntec/api/bailuntec/oa/OaApi.java
View file @
0fc8bef6
...
...
@@ -59,6 +59,7 @@ public interface OaApi {
* ExchangeRate exchangeRate = JsonUtilByFsJson.jsonToBean(response, ExchangeRate.class);
* </code>
*/
@Deprecated
@GetMapping
(
"/api/ExchangeRate/GetExchangeRate"
)
String
getExchangeRate
(
@RequestParam
(
"fromCur"
)
String
fromCur
,
@RequestParam
(
"toCur"
)
String
toCur
);
...
...
src/main/java/com/bailuntec/api/bailuntec/oa/response/ExchangeRate.java
View file @
0fc8bef6
package
com
.
bailuntec
.
api
.
bailuntec
.
oa
.
response
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
...
...
@@ -18,14 +17,11 @@ import java.time.LocalDateTime;
@Data
public
class
ExchangeRate
{
@JsonProperty
(
"Rate"
)
private
BigDecimal
rate
;
@JsonProperty
(
"ToCurName"
)
private
String
toCurName
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonProperty
(
"CreateTime"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
createTime
;
...
...
src/test/java/com/bailuntec/api/bailuntec/oa/OaApiTest.java
View file @
0fc8bef6
...
...
@@ -50,7 +50,7 @@ class OaApiTest {
@Test
void
GetExchangeRateByCurAndDate
(){
ExchangeRate
exchangeRate
=
oaApi
.
getExchangeRateByCurAndDate
(
"
CNY
"
,
"USD"
,
LocalDate
.
now
());
ExchangeRate
exchangeRate
=
oaApi
.
getExchangeRateByCurAndDate
(
"
USD
"
,
"USD"
,
LocalDate
.
now
());
log
.
info
(
JsonUtilByFsJson
.
beanToJson
(
exchangeRate
));
}
}
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