|
@@ -197,8 +197,8 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
curData.Add("MerchantName", item.Name); //商户姓名
|
|
|
curData.Add("KqRegTime", item.CreateDate == null ? "" : item.CreateDate.Value.ToString("yyyy-MM-dd")); //渠道注册时间
|
|
|
curData.Add("Id", item.Id); //Id
|
|
|
- curData.Add("TotalAmount", item.TotalAmount); //交易额
|
|
|
- curData.Add("TodayTrade", MerchantTradeStat.Instance.Amount(item.Id, DateTime.Now.ToString("yyyyMMdd"))); //今日交易额
|
|
|
+ curData.Add("TotalAmount", item.TotalAmount.ToString("f2")); //交易额
|
|
|
+ curData.Add("TodayTrade", MerchantTradeStat.Instance.Amount(item.Id, DateTime.Now.ToString("yyyyMMdd")).ToString("f2")); //今日交易额
|
|
|
curData.Add("TradeCount", item.TotalConsumeCount); //交易笔数
|
|
|
curData.Add("TodayTradeCount", MerchantTradeStat.Instance.Count(item.Id, DateTime.Now.ToString("yyyyMMdd"))); //今日交易笔数
|
|
|
dataList.Add(curData);
|
|
@@ -235,7 +235,7 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
Obj.Add("SubjectType", addinfo.SubjectType); //主体类型
|
|
|
Obj.Add("CreateDate", merchant.CreateDate == null ? "" : merchant.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //注册时间
|
|
|
Obj.Add("ActivationDate", merchant.ActivationDate == null ? "" : merchant.ActivationDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //达标时间
|
|
|
- Obj.Add("TotalAmount", merchant.TotalAmount); //总交易额
|
|
|
+ Obj.Add("TotalAmount", merchant.TotalAmount.ToString("f2")); //总交易额
|
|
|
Obj.Add("ActivationStatus", merchant.ActivationStatus); //达标状态
|
|
|
return Obj;
|
|
|
}
|
|
@@ -289,14 +289,14 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
int TradeCount = 0;
|
|
|
if(total.Rows.Count > 0)
|
|
|
{
|
|
|
- TradeAmt = decimal.Parse(total.Rows[0][0].ToString()); //交易金额
|
|
|
- ActTradeAmt = decimal.Parse(total.Rows[0][2].ToString()); //活动交易金额
|
|
|
- UnActTradeAmt = decimal.Parse(total.Rows[0][3].ToString()); //非活动交易金额
|
|
|
- TradeCount = int.Parse(total.Rows[0][1].ToString()); //交易笔数
|
|
|
+ TradeAmt = decimal.Parse(function.CheckNum(total.Rows[0][0].ToString())); //交易金额
|
|
|
+ ActTradeAmt = decimal.Parse(function.CheckNum(total.Rows[0][2].ToString())); //活动交易金额
|
|
|
+ UnActTradeAmt = decimal.Parse(function.CheckNum(total.Rows[0][3].ToString())); //非活动交易金额
|
|
|
+ TradeCount = int.Parse(function.CheckNum(total.Rows[0][1].ToString())); //交易笔数
|
|
|
}
|
|
|
- other.Add("TradeAmt", TradeAmt); //交易金额
|
|
|
- other.Add("ActTradeAmt", ActTradeAmt); //活动交易金额
|
|
|
- other.Add("UnActTradeAmt", UnActTradeAmt); //非活动交易金额
|
|
|
+ other.Add("TradeAmt", TradeAmt.ToString("f2")); //交易金额
|
|
|
+ other.Add("ActTradeAmt", ActTradeAmt.ToString("f2")); //活动交易金额
|
|
|
+ other.Add("UnActTradeAmt", UnActTradeAmt.ToString("f2")); //非活动交易金额
|
|
|
other.Add("TradeCount", TradeCount); //交易笔数
|
|
|
}
|
|
|
return dataList;
|
|
@@ -337,7 +337,7 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
{
|
|
|
Dictionary<string, object> curData = new Dictionary<string, object>();
|
|
|
curData.Add("SnNo", item.SnNo); //sn
|
|
|
- curData.Add("TradeAmount", QrCodeTradeStat.Instance.Amount(item.SnNo));
|
|
|
+ curData.Add("TradeAmount", QrCodeTradeStat.Instance.Amount(item.SnNo).ToString("f2"));
|
|
|
dataList.Add(curData);
|
|
|
}
|
|
|
return dataList;
|
|
@@ -632,17 +632,17 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
}
|
|
|
while(Start <= DateTime.Now)
|
|
|
{
|
|
|
- MerchantAmountSummay query = new MerchantAmountSummayService().Query(Id, Start.ToString("yyyyMMdd"));
|
|
|
- TotalAmount += query.TradeAmount;
|
|
|
- TotalOrder += query.TradeCount;
|
|
|
+ Dictionary<string, string> dic = new MerchantAmountSummayService().Sum("TradeAmount,TradeCount,TotalActual", " and MerchantId=" + Id + " and TradeDate='" + Start.ToString("yyyyMMdd") + "'");
|
|
|
+ TotalAmount += decimal.Parse(dic["TradeAmount"]);
|
|
|
+ TotalOrder += decimal.Parse(dic["TradeCount"]);
|
|
|
// TotalUser += query.TotalUser;
|
|
|
- // TotalActual += query.TotalActual;
|
|
|
+ TotalActual += decimal.Parse(dic["TotalActual"]);
|
|
|
Start = Start.AddDays(1);
|
|
|
}
|
|
|
- Obj.Add("TotalAmount", TotalActual); //平台总收益
|
|
|
+ Obj.Add("TotalAmount", TotalAmount); //营总收益
|
|
|
Obj.Add("TotalOrder", TotalOrder); //累计订单
|
|
|
Obj.Add("TotalUser", TotalUser); //会员数
|
|
|
- Obj.Add("TotalActual", TotalAmount); //营收总额
|
|
|
+ Obj.Add("TotalActual", TotalActual); //实收总额
|
|
|
return Obj;
|
|
|
}
|
|
|
#endregion
|
|
@@ -694,8 +694,9 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
|
|
|
MerchantInfo query = MerchantInfoDbconn.Instance.Get(Id) ?? new MerchantInfo();
|
|
|
Obj.Add("Name", query.Name); //名称
|
|
|
- Obj.Add("TotalActual", query.TotalActual); //实收总金额
|
|
|
- Obj.Add("TotalOrder", query.TotalOrder); //累计订单
|
|
|
+ Obj.Add("TotalAmount", query.TotalAmount.ToString("f2")); //营收总金额
|
|
|
+ Obj.Add("TotalActual", query.TotalActual.ToString("f2")); //实收总金额
|
|
|
+ Obj.Add("TotalOrder", query.TotalConsumeCount); //累计订单
|
|
|
Obj.Add("TotalCustomer", query.TotalCustomer); //累计客户
|
|
|
Obj.Add("Logo", DefaultPic(query.Logo)); //Logo图片
|
|
|
int ConsumeCount = 0;
|
|
@@ -709,8 +710,8 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
AlipayTotal += MerchantAmountSummary.Instance.GetActualTradeByMode(Id, 1, Date);
|
|
|
}
|
|
|
Obj.Add("SevenDayConsumer", ConsumeCount); //近7日新增会员
|
|
|
- Obj.Add("WeChatTotal", WeChatTotal); //微信实收
|
|
|
- Obj.Add("AlipayTotal", AlipayTotal); //支付宝实收
|
|
|
+ Obj.Add("WeChatTotal", WeChatTotal.ToString("f2")); //微信实收
|
|
|
+ Obj.Add("AlipayTotal", AlipayTotal.ToString("f2")); //支付宝实收
|
|
|
Obj.Add("CreateDate", query.CreateDate == null ? "" : query.CreateDate.Value.ToString("yyyy-MM-dd"));
|
|
|
return Obj;
|
|
|
}
|