|
|
@@ -28,10 +28,11 @@ namespace MySystem.Areas.Api.Controllers.v1.Main1
|
|
|
{
|
|
|
value = PublicFunction.DesDecrypt(value);
|
|
|
JsonData data = JsonMapper.ToObject(value);
|
|
|
- List<Dictionary<string, object>> dataList = DirectActRecordDo(value);
|
|
|
- return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
|
|
|
+ Dictionary<string, object> Other = new Dictionary<string, object>();
|
|
|
+ List<Dictionary<string, object>> dataList = DirectActRecordDo(value, out Other);
|
|
|
+ return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList, Other = Other });
|
|
|
}
|
|
|
- private List<Dictionary<string, object>> DirectActRecordDo(string value)
|
|
|
+ private List<Dictionary<string, object>> DirectActRecordDo(string value, out Dictionary<string, object> Other)
|
|
|
{
|
|
|
JsonData data = JsonMapper.ToObject(value);
|
|
|
string MerchantName = data["MerchantName"].ToString(); //商户名称
|
|
|
@@ -42,19 +43,46 @@ namespace MySystem.Areas.Api.Controllers.v1.Main1
|
|
|
int pageSize = int.Parse(function.CheckInt(data["page_size"].ToString()));
|
|
|
int pageNum = int.Parse(function.CheckInt(data["page_num"].ToString()));
|
|
|
string condition = "";
|
|
|
+ if (!string.IsNullOrEmpty(MerchantName))
|
|
|
+ {
|
|
|
+ var query = MerchantAddInfoService.Query(" and CertMerchantName='" + MerchantName + "'");
|
|
|
+ condition += " and MerchantId='" + query.Id + "'";
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(AliPID))
|
|
|
+ {
|
|
|
+ condition += " and AlipayPid='" + AliPID + "'";
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(WeChatNo))
|
|
|
+ {
|
|
|
+ condition += " and SubMchid='" + WeChatNo + "'";
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(data["UpdateDate"].ToString()))
|
|
|
+ {
|
|
|
+ string[] datelist = UpdateDate.Split(new string[] { " - " }, StringSplitOptions.None);
|
|
|
+ string start = datelist[0];
|
|
|
+ string end = datelist[1];
|
|
|
+ condition += " and UpdateDate>='" + start + " 00:00:00' and UpdateDate<='" + end + " 23:59:59'";
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(data["PayMode"].ToString()))
|
|
|
+ {
|
|
|
+ condition += " and Sort='" + PayMode + "'";
|
|
|
+ }
|
|
|
List<RelationData> relationData = new List<RelationData>();
|
|
|
List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
|
|
|
- List<Dictionary<string, object>> source = MerchantDepositOrderService.List(relationData, condition, pageNum, pageSize);
|
|
|
+ Other = new Dictionary<string, object>();
|
|
|
+ int count = 0;
|
|
|
+ List<Dictionary<string, object>> source = MerchantDepositOrderService.List(relationData, condition, out count, pageNum, pageSize);
|
|
|
foreach (Dictionary<string, object> subdata in source)
|
|
|
{
|
|
|
Dictionary<string, object> curData = new Dictionary<string, object>();
|
|
|
- curData.Add("", subdata[""].ToString()); //
|
|
|
+ var query = MerchantAddInfoService.Query(int.Parse(subdata["MerchantId"].ToString()));
|
|
|
curData.Add("Id", subdata["Id"].ToString()); //Id
|
|
|
- curData.Add("MerchantName", ""); //商户名称
|
|
|
- curData.Add("MctNo", ""); //商户号
|
|
|
- curData.Add("UpdateDate", ""); //激活时间
|
|
|
- curData.Add("PayMode", ""); //支付方式(1 支付宝 2 微信)
|
|
|
- curData.Add("ActPayPrice", ""); //支付金额
|
|
|
+ curData.Add("MerchantName", query.CertMerchantName); //交易商户
|
|
|
+ curData.Add("AliPID", query.AlipayPid); //支付宝PID
|
|
|
+ curData.Add("WeChatNo", query.SubMchid); //微信商户号
|
|
|
+ curData.Add("UpdateDate", subdata["UpdateDate"].ToString() == null ? "" : DateTime.Parse(subdata["UpdateDate"].ToString()).ToString("yyyy-MM-dd HH:mm:ss")); //激活时间
|
|
|
+ curData.Add("PayMode", int.Parse(subdata["Sort"].ToString())); //支付方式(1 支付宝 2 微信)
|
|
|
+ curData.Add("ActPayPrice", decimal.Parse(subdata["ActPayPrice"].ToString())); //支付金额
|
|
|
|
|
|
dataList.Add(curData);
|
|
|
}
|