using BBWY.Client.Models; using BBWY.Common.Http; using BBWY.Common.Models; using System; using System.Collections.Generic; 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, long shopId) { return SendRequest(globalContext.BBYWApiHost, "Api/Statistics/GetOrderAchievementStatistics", new { 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); } /// /// 刷单组个人统计 /// /// /// public ApiResponse GetSDGroupPersonStatistics(string sdOperator, DateTime startDate, DateTime endDate) { return SendRequest(globalContext.BBYWApiHost, "/Api/Statistics/GetSDGroupPersonStatistics", $"sdOperator={sdOperator}&startDate={startDate}&endDate={endDate}", null, HttpMethod.Get); } /// /// 获取Sku近30天件数销量 /// /// /// public ApiResponse> GetSkuRecentSales(List skuIds) { return SendRequest>(globalContext.BBYWApiHost, "/Api/Statistics/GetSkuRecentSales", new { skuIds }, null, HttpMethod.Post); } } }