using BBWY.Client.Models;
using BBWY.Common.Http;
using BBWY.Common.Models;
using System;
using System.Net.Http;
namespace BBWY.Client.APIServices
{
public class StatisticsService : BaseApiService, IDenpendency
{
public StatisticsService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext)
{
}
///
/// 今日业绩统计
///
///
public ApiResponse GetTodayAchievementStatistics(DateTime startTime, DateTime endTime)
{
return SendRequest(globalContext.BBYWApiHost, "Api/Statistics/GetOrderAchievementStatistics", new
{
globalContext.User.Shop.ShopId,
startTime,
endTime
},
null, HttpMethod.Post);
}
public ApiResponse GetOrderCountStatistics(long shopId, DateTime startDate, DateTime endDate)
{
return SendRequest(globalContext.BBYWApiHost, "Api/Statistics/GetOrderCountStatistics", $"shopId={shopId}&startDate={startDate:yyyy-MM-dd}&endDate={endDate:yyyy-MM-dd}", null, HttpMethod.Get);
}
}
}