| | |
| | | */ |
| | | public ExchangeRate findUserConfig(String partyId) { |
| | | |
| | | Syspara currency = sysparaService.find("rate_default_currency"); |
| | | String currency = sysparaService.find("rate_default_currency").getSvalue(); |
| | | |
| | | String user_default_currency = "USD"; |
| | | |
| | | //如果配置了默认币种类型,返回配置的币种类型,默认是USD |
| | | if(Objects.nonNull(currency)) { |
| | | user_default_currency = currency.getSvalue().toUpperCase(); |
| | | if(!currency.isEmpty()) { |
| | | user_default_currency = currency; |
| | | } |
| | | ExchangeRate exchangeRate = exchangeRateService.findBy(ExchangeRate.IN, user_default_currency); |
| | | |
| | | ExchangeRate exchangeRate ; |
| | | |
| | | if (StringUtils.isNullOrEmpty(partyId)) { |
| | | /*if (StringUtils.isNullOrEmpty(partyId)) { |
| | | exchangeRate = exchangeRateService.findBy(ExchangeRate.IN, user_default_currency); |
| | | } else { |
| | | UserRateConfig userRateConfig = getByPartyId(partyId); |
| | |
| | | } else { |
| | | exchangeRate = exchangeRateService.findBy(ExchangeRate.IN, userRateConfig.getCurrency()); |
| | | } |
| | | } |
| | | }*/ |
| | | return exchangeRate; |
| | | } |
| | | |