Commit 0fc8bef6 by huluobin

# update

parent cda0109f
...@@ -59,6 +59,7 @@ public interface OaApi { ...@@ -59,6 +59,7 @@ public interface OaApi {
* ExchangeRate exchangeRate = JsonUtilByFsJson.jsonToBean(response, ExchangeRate.class); * ExchangeRate exchangeRate = JsonUtilByFsJson.jsonToBean(response, ExchangeRate.class);
* </code> * </code>
*/ */
@Deprecated
@GetMapping("/api/ExchangeRate/GetExchangeRate") @GetMapping("/api/ExchangeRate/GetExchangeRate")
String getExchangeRate(@RequestParam("fromCur") String fromCur, String getExchangeRate(@RequestParam("fromCur") String fromCur,
@RequestParam("toCur") String toCur); @RequestParam("toCur") String toCur);
......
package com.bailuntec.api.bailuntec.oa.response; package com.bailuntec.api.bailuntec.oa.response;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -18,14 +17,11 @@ import java.time.LocalDateTime; ...@@ -18,14 +17,11 @@ import java.time.LocalDateTime;
@Data @Data
public class ExchangeRate { public class ExchangeRate {
@JsonProperty("Rate")
private BigDecimal rate; private BigDecimal rate;
@JsonProperty("ToCurName")
private String toCurName; private String toCurName;
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonProperty("CreateTime")
private LocalDateTime createTime; private LocalDateTime createTime;
......
...@@ -50,7 +50,7 @@ class OaApiTest { ...@@ -50,7 +50,7 @@ class OaApiTest {
@Test @Test
void GetExchangeRateByCurAndDate(){ void GetExchangeRateByCurAndDate(){
ExchangeRate exchangeRate =oaApi.getExchangeRateByCurAndDate("CNY","USD", LocalDate.now()); ExchangeRate exchangeRate =oaApi.getExchangeRateByCurAndDate("USD","USD", LocalDate.now());
log.info(JsonUtilByFsJson.beanToJson(exchangeRate)); log.info(JsonUtilByFsJson.beanToJson(exchangeRate));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment