修复问题
This commit is contained in:
parent
fb4d1cc9d2
commit
925a58ca34
|
|
@ -173,16 +173,20 @@ namespace HuanMeng.MiaoYu.Code.Users
|
|||
{
|
||||
return new BaseResponse<List<TransactionDto>>(ResonseCode.Success, "", new List<TransactionDto>());
|
||||
}
|
||||
var logs = await Dao.daoDbMiaoYu.context.T_User_Currency_Log.Where(it => it.UserId == _UserId && (it.CurrencyType == (int)UserCurrencyType.聊天次数 && it.ConsumeType == 1) && !it.IsHide).OrderByDescending(it => it.Id).Take(50).ToListAsync();
|
||||
var logs = await Dao.daoDbMiaoYu.context.T_User_Currency_Log.Where(it => it.UserId == _UserId && !(it.CurrencyType == (int)UserCurrencyType.聊天次数 && it.ConsumeType == 0) && !it.IsHide).OrderByDescending(it => it.Id).Take(50).ToListAsync();
|
||||
List<TransactionDto> list = new List<TransactionDto>();
|
||||
foreach (var item in logs)
|
||||
{
|
||||
if (string.IsNullOrEmpty(item.Title))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
TransactionDto transactionDto = new TransactionDto();
|
||||
transactionDto.TransactionType = 0;
|
||||
transactionDto.TransactionTime = item.CreateTime;
|
||||
transactionDto.CurrencyType = item.CurrencyType;
|
||||
transactionDto.TransactionContent = item.Title;
|
||||
transactionDto.TransactionAmount = $"{(item.Consume > 0 ? "+" : "")}{item.Consume:D2}{(item.CurrencyType == 1 ? UserCurrencyType.语珠.ToString() : "")}";
|
||||
transactionDto.TransactionAmount = $"{(item.Consume > 0 ? "+" : "")}{item.Consume.ToString("0.##")}{(item.CurrencyType == 1 ? UserCurrencyType.语珠.ToString() : "")}";
|
||||
list.Add(transactionDto);
|
||||
}
|
||||
return new BaseResponse<List<TransactionDto>>(ResonseCode.Success, "", list);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user