Commit 6a855f92 authored by 332784038@qq.com's avatar 332784038@qq.com Committed by wux

空值汇率信息api返回时默认参数修改

parent 7f72298b
......@@ -41,7 +41,7 @@ public class CurrecyApiImpl implements CurrencyApi {
dto.setTargetCurrencyId(targetId);
if (sourceId == null || targetId == null) {
dto.setCurrencyRate(BigDecimal.ZERO);
dto.setSourceCurrencyAmount(BigDecimal.ZERO);
dto.setSourceCurrencyAmount(BigDecimal.ONE);
dto.setTargetCurrencyAmount(BigDecimal.ZERO);
} else {
if (sourceId.equals(targetId)){
......@@ -75,6 +75,8 @@ public class CurrecyApiImpl implements CurrencyApi {
dto.setTargetCurrencyCode(targetCode);
if (StrUtil.equals(sourceCode, targetCode)) {
dto.setSourceCurrencyAmount(BigDecimal.ONE);
dto.setTargetCurrencyAmount(BigDecimal.ONE);
dto.setCurrencyRate(BigDecimal.ONE);
return dto;
}
......@@ -88,7 +90,7 @@ public class CurrecyApiImpl implements CurrencyApi {
if (sourceId == null || targetId == null) {
dto.setCurrencyRate(BigDecimal.ZERO);
dto.setSourceCurrencyAmount(BigDecimal.ZERO);
dto.setSourceCurrencyAmount(BigDecimal.ONE);
dto.setTargetCurrencyAmount(BigDecimal.ZERO);
} else {
if (sourceId.equals(targetId)){
......
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