/// <summary> /// 提现相关 /// </summary> /// <param name="pageIndex"></param> /// <param name="withdrawStatus"></param> /// <param name="payType"></param> /// <param name="withdrawalNo"></param> /// <param name="accId"></param> /// <param name="start"></param> /// <param name="end"></param> /// <returns></returns> public static string GetWithdrawalRecord(int pageIndex, int withdrawStatus, int payType, string withdrawalNo, string accId, string start, string end) { string Column = string.Empty; string strWhere = string.Empty; Dictionary <string, string> dic = new Dictionary <string, string>() { { "RowCount", "" }, { "PageCount", "" }, { "list", "" } }; if (Convert.ToDateTime(end) > Convert.ToDateTime(start)) { if (start != "") { DateTime stTime = Convert.ToDateTime(start); strWhere += " twr.createTime >='" + stTime.ToString("yyyy-MM-dd") + "' and"; } if (end != "") { DateTime edTime = Convert.ToDateTime(end); strWhere += " twr.createTime <'" + edTime.AddDays(1).Date.ToString("yyyy-MM-dd") + "' and"; } } if (withdrawStatus != -99) { strWhere += " twr.status=" + withdrawStatus.ToString() + " and "; } //payType: 0 支付宝 对应paymentType=0 //payType: 1 银行卡 对应paymentType=2、3、4... if (payType != -99) { if (payType == 0) { strWhere += " twi.paymentType=0 and "; } else if (payType == 1) { strWhere += " twi.paymentType>1 and "; } } if (withdrawalNo != "") { strWhere += " id=" + withdrawalNo + " and "; } if (accId != "") { strWhere += " twr.accId=" + accId + " and "; } if (strWhere.Length > 0) { strWhere = strWhere.Substring(0, strWhere.LastIndexOf('a')); } int pageCount = CustomerCareBLL.GetPageCount(strWhere); int pageSize = 15; if (pageCount != 0) { dic["RowCount"] = pageCount.ToString(); } else { dic["RowCount"] = "0"; } if (pageCount > 0) { dic["PageCount"] = Convert.ToInt32(Math.Ceiling(Convert.ToDecimal(pageCount) / Convert.ToDecimal(pageSize))).ToString(); } else { dic["PageCount"] = "0"; } List <WithdrawalRecordModel> withdrawalList = CustomerCareBLL.GetPage(pageIndex, pageSize, Column, strWhere); dic["list"] = CommonLib.Helper.JsonSerializeObject(withdrawalList, "yyyy-MM-dd HH:mm:ss"); return(CommonLib.Helper.JsonSerializeObject(dic)); }