예제 #1
0
        public Tuple <IEnumerable <CashOutLog>, int> GetCashOutLog(string code, string key, DateTime?startTime, DateTime?endTime, int startIndex, int count, string outTradeNo = null)
        {
            var ch     = new CashbagHelper(_webUrLfunds + "Withdraw", "GET");
            var data   = ch.GetURLEncodeData(code, key, startTime, endTime, startIndex, count, outTradeNo);
            var result = ch.GetBackJsonData(data);

            if (result.status == false)
            {
                throw new CashBagException(result.message.ToString());
            }

            var lists      = new List <CashOutLog>();
            var rows       = JArray.FromObject(result.result.rows);
            int totalcount = result.result.total;

            foreach (var item in rows)
            {
                var rl = new CashOutLog
                {
                    SerialNum     = item.SerialNum,
                    CashOutTime   = item.CashOutTime,
                    CashOutMoney  = item.CashOutMoney,
                    CashOutStatus = item.CashOutStatus,
                    ClearDateTime = item.ClearDateTime,
                    BankNo        = item.AccountName,
                    FeeAmount     = item.FeeAmount,
                    OutTradeNo    = item.OutTradeNo,
                    ReceivingType = item.ReceivingType
                };
                lists.Add(rl);
            }
            var tuple = new Tuple <IEnumerable <CashOutLog>, int>(lists, totalcount);

            return(tuple);
        }
예제 #2
0
        public Tuple <IEnumerable <TransferLog>, int> GetTransferAccountsLog(string code, string key, DateTime?startTime, DateTime?endTime, int startIndex, int count, string outTradeNo = null)
        {
            var ch   = new CashbagHelper(_webUrLfunds + "Transfer", "GET");
            var data = ch.GetURLEncodeData(code, key, startTime, endTime, startIndex, count, outTradeNo);

            var result = ch.GetBackJsonData(data);

            if (result.status == false)
            {
                throw new CashBagException(result.message.ToString());
            }
            var lst        = new List <TransferLog>();
            var rows       = JArray.FromObject(result.result.rows);
            int totalcount = result.result.total;

            foreach (var item in rows)
            {
                lst.Add(new TransferLog
                {
                    SerialNum              = item.SerialNum,
                    TransferAccountsMoney  = item.TransferAccountsMoney,
                    TransferAccountsStatus = item.TransferAccountsStatus,
                    TransferAccountsTime   = item.TransferAccountsTime,
                    TransferAccountsType   = item.TransferAccountsType,
                    TransferNotes          = item.TransferNotes,
                    TargetAccount          = item.TargetAccount,
                    Type       = item.Type,
                    OutTradeNo = item.OutTradeNo
                });
            }
            var tuple = new Tuple <IEnumerable <TransferLog>, int>(lst, totalcount);

            return(tuple);
        }
예제 #3
0
        public Tuple <IEnumerable <BalanceDetail>, int> GetScoreAccountDetails(string code, string key, DateTime?startTime, DateTime?endTime, int startIndex, int count, string outTradeNo = null)
        {
            var ch = new CashbagHelper(_webUrlAccount + "Point", "GET");

            var data = ch.GetURLEncodeData(code, key, startTime, endTime, startIndex, count, outTradeNo);

            var result = ch.GetBackJsonData(data);

            if (result.status == false)
            {
                throw new CashBagException(result.message.ToString());
            }
            var lst        = new List <BalanceDetail>();
            var rows       = JArray.FromObject(result.result.rows);
            int totalcount = result.result.total;

            foreach (var item in rows)
            {
                lst.Add(new BalanceDetail
                {
                    SerialNum     = item.OrderNo,
                    Amount        = item.Amount,
                    CreateAmount  = item.CreateDate,
                    OperationType = item.OperationType,
                    PayType       = item.PayType,
                    LeaveAmount   = item.LeaveAmount,
                    OutTradeNo    = item.OutTradeNo
                });
            }
            var tuple = new Tuple <IEnumerable <BalanceDetail>, int>(lst, totalcount);

            return(tuple);
        }
예제 #4
0
        public Tuple <IEnumerable <ScoreConvertLog>, int> GetScoreConvertLog(string code, string key, DateTime?startTime, DateTime?endTime, int startIndex, int count)
        {
            var ch   = new CashbagHelper(_webUrLfunds + "ExchangePoint", "GET");
            var data = ch.GetURLEncodeData(code, key, startTime, endTime, startIndex, count);

            var result = ch.GetBackJsonData(data);

            if (result.status == false)
            {
                throw new CashBagException(result.message.ToString());
            }
            var lst        = new List <ScoreConvertLog>();
            var rows       = JArray.FromObject(result.result.rows);
            int totalcount = result.result.total;

            foreach (var item in rows)
            {
                lst.Add(new ScoreConvertLog
                {
                    CreateDate  = item.CreateDate,
                    LeaveAmount = item.LeaveAmount,
                    PointAmount = item.PointAmount
                });
            }
            var tuple = new Tuple <IEnumerable <ScoreConvertLog>, int>(lst, totalcount);

            return(tuple);
        }
예제 #5
0
        public Tuple <IEnumerable <BargainLog>, int> GetBargainLog(string code, string key, DateTime?startTime, DateTime?endTime, int startIndex, int count, string outTradeNo = null)
        {
            var ch   = new CashbagHelper(_webUrLfunds + "Bargain", "GET");
            var data = ch.GetURLEncodeData(code, key, startTime, endTime, startIndex, count, outTradeNo);

            var result = ch.GetBackJsonData(data);

            if (result.status == false)
            {
                throw new CashBagException(result.message.ToString());
            }
            var lst        = new List <BargainLog>();
            var rows       = JArray.FromObject(result.result.rows);
            int totalcount = result.result.total;

            foreach (var item in rows)
            {
                lst.Add(new BargainLog
                {
                    CashSource  = item.CashSource,
                    Money       = item.Money ?? 0,
                    Status      = item.Status,
                    SerialNum   = item.SerialNum,
                    CreateTime  = item.Time,
                    OrderId     = item.outOrderNo,
                    BargainTime = item.PayTime,
                    OutTradeNo  = item.OutTradeNo,
                    TradeType   = item.TradeType,
                    Notes       = item.Notes
                });
            }
            var tuple = new Tuple <IEnumerable <BargainLog>, int>(lst, totalcount);

            return(tuple);
        }
예제 #6
0
        public Tuple <IEnumerable <RechargeLog>, int> GetRechargeLogs(string code, string key, DateTime?startTime, DateTime?endTime, int startIndex, int count, string outTradeNo = null)
        {
            var ch   = new CashbagHelper(_webUrLfunds + "Recharge", "GET");
            var data = ch.GetURLEncodeData(code, key, startTime, endTime, startIndex, count, outTradeNo);

            var result = ch.GetBackJsonData(data);

            if (result.status == false)
            {
                throw new CashBagException(result.message.ToString());
            }

            var lists      = new List <RechargeLog>();
            var rows       = JArray.FromObject(result.result.rows);
            int totalcount = result.result.total;

            foreach (var item in rows)
            {
                var rl = new RechargeLog
                {
                    SerialNum      = item.SerialNum,
                    RechargeTime   = item.RechargeTime,
                    TypeName       = item.TypeName,
                    RechargeMoney  = item.RechargeMoney,
                    CashSource     = item.CashSource,
                    RechargeStatus = item.RechargeStatus,
                    OutTradeNo     = item.OutTradeNo
                };
                lists.Add(rl);
            }
            var tuple = new Tuple <IEnumerable <RechargeLog>, int>(lists, totalcount);

            return(tuple);
        }
예제 #7
0
        public Tuple <IEnumerable <FinancialLog>, int> GetFinancialLog(string code, string key, DateTime?startTime, DateTime?endTime, int startIndex, int count, string outTradeNo = null)
        {
            var ch     = new CashbagHelper(_webUrLfunds + "Financing", "GET");
            var data   = ch.GetURLEncodeData(code, key, startTime, endTime, startIndex, count, outTradeNo);
            var result = ch.GetBackJsonData(data);

            if (result.status == false)
            {
                throw new CashBagException(result.message.ToString());
            }

            var lists      = new List <FinancialLog>();
            var rows       = JArray.FromObject(result.result.rows);
            int totalcount = result.result.total;

            foreach (var item in rows)
            {
                var rl = new FinancialLog
                {
                    SerialNum                                           = item.SerialNum,
                    BuyTime                                             = item.BuyTime,
                    ProductName                                         = item.ProductName,
                    FinancialMoney                                      = item.FinancialMoney,
                    FinancialLogStatus                                  = item.FinancialLogStatus,
                    CashSource                                          = item.CashSource,
                    AbortTime                                           = item.EndDateTime == null?DateTime.Parse("0001-01-01 00:00:00") : item.EndDateTime,
                                                         StartDateTime  = item.StartDateTime,
                                                         PointAmount    = item.PointAmount,
                                                         PreEndDateTime = item.PreEndDateTime == null?DateTime.Parse("0001-01-01 00:00:00") : item.PreEndDateTime,
                                                                              AuditDate  = item.AuditDate,
                                                                              OutTradeNo = item.OutTradeNo,
                                                                              Remark     = item.Notes
                };
                lists.Add(rl);
            }
            var tuple = new Tuple <IEnumerable <FinancialLog>, int>(lists, totalcount);

            return(tuple);
        }