修复用户本位币为空字符串时的默认值逻辑,兼容null和空两种情况
This commit is contained in:
parent
dcb80d9b85
commit
fb5faeee81
@ -198,7 +198,7 @@ public class PortfolioService : IPortfolioService
|
||||
throw new Exception("User not found");
|
||||
}
|
||||
|
||||
string targetCurrency = user.DefaultCurrency ?? "CNY";
|
||||
string targetCurrency = !string.IsNullOrEmpty(user.DefaultCurrency) ? user.DefaultCurrency : "CNY";
|
||||
_logger.LogInformation("用户 {UserId} 默认本位币: {Currency}", userId, targetCurrency);
|
||||
decimal totalValueInTargetCurrency = 0;
|
||||
decimal totalCostInTargetCurrency = 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user