|
|
@@ -358,23 +358,29 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
foreach (Dictionary<string, object> subdata in source)
|
|
|
{
|
|
|
var Id = int.Parse(subdata["Id"].ToString()); //Id
|
|
|
+ var sysWithdrawalApplyRecord = main1db.SysWithdrawalApplyRecord.FirstOrDefault(m => m.Id == Id) ?? new MySystem.Models.Main1.SysWithdrawalApplyRecord();
|
|
|
|
|
|
JsonData info = JsonMapper.ToObject(HaoDaHelper.Instance.QueryApplyWithdrawalStatus(subdata["ApplyNo"].ToString(), "230817000000000278"));
|
|
|
var Status = int.Parse(info["data"]["status"].ToString()); //状态(0 提现成功 1 提现中 2 提现失败)
|
|
|
Dictionary<string, object> fields = new Dictionary<string, object>();
|
|
|
if (Status == 0)
|
|
|
{
|
|
|
- fields.Add("SeoKeyword", DateTime.Parse(info["data"]["updateTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"));
|
|
|
Status = 1;
|
|
|
+ sysWithdrawalApplyRecord.UpdateDate = DateTime.Parse(info["data"]["updateTime"].ToString());
|
|
|
}
|
|
|
- fields.Add("Status", Status);
|
|
|
- SysWithdrawalApplyRecordService.Edit(fields, Id);
|
|
|
+ if (Status == 2)
|
|
|
+ {
|
|
|
+ Status = 2;
|
|
|
+ sysWithdrawalApplyRecord.UpdateDate = DateTime.Parse(info["data"]["updateTime"].ToString());
|
|
|
+ }
|
|
|
+ sysWithdrawalApplyRecord.Status = Status;
|
|
|
+ main1db.SaveChanges();
|
|
|
|
|
|
}
|
|
|
JsonData dic = JsonMapper.ToObject(HaoDaHelper.Instance.QueryAccountBalance("230817000000000278"));
|
|
|
Obj.Add("Balance", decimal.Parse(dic["data"]["total"].ToString()) / 100); //账户余额
|
|
|
- Obj.Add("WithdrawalAmount", SysWithdrawalApplyRecordService.Sum(" and Status=1", "QueryCount") / 100); //提现中金额
|
|
|
- Obj.Add("WithdrawnAmount", SysWithdrawalApplyRecordService.Sum(" and Status=0", "QueryCount") / 100); //已提现金额
|
|
|
+ Obj.Add("WithdrawalAmount", SysWithdrawalApplyRecordService.Sum(" and Status=0", "SeoTitle") / 100); //提现中金额
|
|
|
+ Obj.Add("WithdrawnAmount", SysWithdrawalApplyRecordService.Sum(" and Status=1", "SeoTitle") / 100); //已提现金额
|
|
|
|
|
|
return Obj;
|
|
|
}
|
|
|
@@ -402,6 +408,7 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
if (dic["resultCode"].ToString() == "1")
|
|
|
{
|
|
|
Dictionary<string, object> fields = new Dictionary<string, object>();
|
|
|
+ fields.Add("CreateDate", DateTime.Now);
|
|
|
fields.Add("CreateMan", AppConfig.LoginSession.sysAdminName + "_" + AppConfig.LoginSession.sysRealName);
|
|
|
fields.Add("SeoTitle", amount);
|
|
|
fields.Add("AccountNo", "230817000000000278");
|