/// <summary> /// 订单统计 /// </summary> /// <param name="startTime">开始时间</param> /// <param name="endTime">结束时间</param> /// <param name="statType">统计类型(0代表订单数,1代表订单合计)</param> /// <returns></returns> public ActionResult OrderStat(string startTime, string endTime, int statType = 0) { if (string.IsNullOrWhiteSpace(startTime)) { startTime = DateTime.Now.Date.ToString("yyyy-MM-dd HH:mm:ss"); } if (string.IsNullOrWhiteSpace(endTime)) { endTime = DateTime.Now.AddDays(1).Date.ToString("yyyy-MM-dd HH:mm:ss"); } OrderStatModel model = new OrderStatModel(); model.StatType = statType; model.StartTime = startTime; model.EndTime = endTime; model.StatItemList = AdminOrders.GetOrderStat(statType, startTime, endTime); return(View(model)); }