/// <summary> /// 分页获取数据列表 /// </summary> //public DataSet GetList(int PageSize,int PageIndex,string strWhere) //{ //return dal.GetList(PageSize,PageIndex,strWhere); //} #endregion BasicMethod #region ExtensionMethod public bool AgentBalance(ColoPay.Model.Pay.Order orderInfo) { if (orderInfo.Agentd <= 0) { return(false); } //获取代理商的费率比例 ColoPay.BLL.Pay.AgentPayFee feeBll = new AgentPayFee(); ColoPay.Model.Pay.AgentPayFee payFeeInfo = feeBll.GetModel(orderInfo.Agentd, orderInfo.PaymentTypeId); ColoPay.Model.Pay.BalanceDetail detail = new Model.Pay.BalanceDetail(); if (payFeeInfo != null) { detail.AgentId = orderInfo.Agentd; detail.PaymentFee = orderInfo.Amount * (orderInfo.FeeRate - payFeeInfo.FeeRate) / 100; detail.Amount = detail.Amount; detail.OrderAmount = detail.PaymentFee; detail.CreatedTime = DateTime.Now; detail.EnterpriseID = orderInfo.EnterpriseID; detail.Type = 1; detail.PayType = 0; detail.OriginalId = orderInfo.OrderId; detail.OriginalCode = orderInfo.OrderCode; } return(dal.AgentBalance(detail)); }
public bool Pay(int withdrawId, int status, int userId) { ColoPay.Model.Pay.BalanceDetail detailModel = new Model.Pay.BalanceDetail(); ColoPay.Model.Pay.Withdraw withdrawModel = GetModel(withdrawId); if (withdrawModel != null) { detailModel.OrderAmount = withdrawModel.Amount; detailModel.Amount = withdrawModel.Amount; detailModel.PaymentFee = 0; detailModel.OriginalId = withdrawModel.WithdrawId; detailModel.OriginalCode = withdrawModel.WithdrawCode; detailModel.PayType = 1; detailModel.EnterpriseID = withdrawModel.EnterpriseID; detailModel.CreatedTime = DateTime.Now; withdrawModel.Status = status + 1; } return(dal.Pay(withdrawModel, detailModel, userId)); }