Exemple #1
0
 public async Task <ServiceResult <ListOM> > ListAllType(ListAllTypeIM im)
 {
     return(new ServiceResult <ListOM>
     {
         Data = await new UserStatementComponent().ListAllType(this.GetUser(), im, this.IsZH())
     });
 }
Exemple #2
0
        public async Task <ListOM> ListAllType(UserAccount user, ListAllTypeIM im, bool isZH)
        {
            im.PageSize = im.PageSize ?? 20;
            if (im.PageSize > 20)
            {
                im.PageSize = 20;
            }

            var esList   = await new UserTransactionDAC().GetListAsync(user.Id, null, im.CoinId, im.PageSize.Value, im.PageIndex ?? 0, im.Mounth, im.StartDate, im.EndDate, im.Keyword, im.MaxType);
            var coinList = await new CryptocurrencyDAC().GetAllAsync();

            return(new ListOM
            {
                CurrentPageIndex = im.PageIndex ?? 0,
                List = esList.Select(a => new ListOMItem
                {
                    CryptoAmount = a.Amount.ToString(),
                    Code = a.CryptoCode,
                    //IconUrl = coin?.IconURL,
                    OrderId = a.DetailId,
                    StatusStr = GetStatusStr((int)a.Type, a.Status, isZH),
                    Status = a.Status,
                    RefundStatus = GetRefundStatus((int)a.Type, a.Status),
                    RefundStatusStr = GetRefundStatusStr((int)a.Type, a.Status, isZH),
                    Timestamp = a.Timestamp.ToUtcTimeTicks().ToString(),
                    Type = (int)a.Type
                }).ToList()
            });
        }