shanji 3 years ago
parent
commit
de67292c48
  1. 4
      BBWY.Client/APIServices/StatisticsService.cs
  2. 6
      BBWY.Client/ViewModels/Order/OrderListViewModel.cs

4
BBWY.Client/APIServices/StatisticsService.cs

@ -29,9 +29,9 @@ namespace BBWY.Client.APIServices
null, HttpMethod.Post); null, HttpMethod.Post);
} }
public ApiResponse<OrderCountStatisticsResponse> GetOrderCountStatistics(long shopId, DateTime startDate, DateTime endDate) public ApiResponse<OrderCountStatisticsResponse> GetOrderCountStatistics(long shopId)
{ {
return SendRequest<OrderCountStatisticsResponse>(globalContext.BBYWApiHost, "Api/Statistics/GetOrderCountStatistics", $"shopId={shopId}&startDate={startDate:yyyy-MM-dd}&endDate={endDate:yyyy-MM-dd}", null, HttpMethod.Get); return SendRequest<OrderCountStatisticsResponse>(globalContext.BBYWApiHost, "Api/Statistics/GetOrderCountStatistics", $"shopId={shopId}", null, HttpMethod.Get);
} }
/// <summary> /// <summary>

6
BBWY.Client/ViewModels/Order/OrderListViewModel.cs

@ -370,7 +370,7 @@ namespace BBWY.Client.ViewModels
if (!IsSDGroup) if (!IsSDGroup)
{ {
Task.Factory.StartNew(() => LoadTodayAchievement(StartDate, EndDate, queryShopId.Value)); Task.Factory.StartNew(() => LoadTodayAchievement(StartDate, EndDate, queryShopId.Value));
Task.Factory.StartNew(() => LoadOrderCount(StartDate, EndDate, queryShopId.Value)); Task.Factory.StartNew(() => LoadOrderCount(queryShopId.Value));
} }
else else
{ {
@ -486,9 +486,9 @@ namespace BBWY.Client.ViewModels
}); });
} }
private void LoadOrderCount(DateTime startDate, DateTime endDate, long shopId) private void LoadOrderCount(long shopId)
{ {
var response = statisticsService.GetOrderCountStatistics(shopId, startDate, endDate); var response = statisticsService.GetOrderCountStatistics(shopId);
if (!response.Success) if (!response.Success)
return; return;
WaitPurchaseOrderCount = response.Data.WaitPurchaseCount; WaitPurchaseOrderCount = response.Data.WaitPurchaseCount;

Loading…
Cancel
Save