public RedPocketReceiveListOM ReceiveList(Guid accountId, string fiatCurrency, int index, int size)
        {
            if (index < 0)
            {
                throw new CommonException(Argument_Error, MessageResources.InvalidDataFormat);
            }

            if (size > 20)
            {
                size = 20;
            }

            var om = new RedPocketReceiveListOM();
            var redPocketReceiveDAC = new RedPocketReceiverDAC();

            var list = redPocketReceiveDAC.GetList(accountId, index, size).Select(s => new ReceiveRedPockDetail
            {
                Amount      = s.Amount.ToString(CultureInfo.InvariantCulture),
                CryptoCode  = s.CryptoCode,
                RedPocketId = s.PocketId,
                Nickname    = s.Nickname,
                Timestamp   = s.Timestamp.ToUtcTimeTicks().ToString(),
            });

            om.DetailList      = list.ToList();
            om.TotalFiatAmount = ConvertFiatAmount(redPocketReceiveDAC.AccountSum(accountId), fiatCurrency).ToString();
            om.Total           = redPocketReceiveDAC.ReceiveCount(accountId);

            return(om);
        }
        public List <RedPocketListDetailOM> DetailList(long redPocketId, int index, int size)
        {
            if (index < 0)
            {
                throw new CommonException(Argument_Error, MessageResources.InvalidDataFormat);
            }

            if (size > 20)
            {
                size = 20;
            }

            var redPocketReceiveDAC = new RedPocketReceiverDAC();

            var list = redPocketReceiveDAC.GetList(redPocketId, index, size).Select(s => new RedPocketListDetailOM
            {
                Amount     = s.Amount.ToString(),
                CryptoCode = s.CryptoCode,
                IsBestLuck = s.IsBestLuck,
                Nickname   = s.Nickname,
                Timestamp  = s.Timestamp.ToUtcTimeTicks().ToString()
            });

            var om = list.ToList();

            return(om);
        }