diff --git a/BBWY.Server.Business/Statistics/StatisticsBusiness.cs b/BBWY.Server.Business/Statistics/StatisticsBusiness.cs index e5a0ba17..8e5c9b8f 100644 --- a/BBWY.Server.Business/Statistics/StatisticsBusiness.cs +++ b/BBWY.Server.Business/Statistics/StatisticsBusiness.cs @@ -209,7 +209,7 @@ namespace BBWY.Server.Business GOIByShop shopGoi = null; #region spu goi { - var httpResult = restApiService.SendRequest("http://snapi.qiyue666.com/api/goi/QueryPopularizeLevelGOIBySpuId", string.Empty, new + var httpResult = restApiService.SendRequest("http://snapi.qiyue666.com/", "Api/GOI/QueryPopularizeLevelGOIBySpuId", new { SpuIdList = spuIdList, StartTime = xingXiangSearchOrderRequest.SearchDate, @@ -218,14 +218,14 @@ namespace BBWY.Server.Business if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) throw new BusinessException("查询spu goi失败"); - var listRes = JsonConvert.DeserializeObject>(httpResult.Content); + var listRes = JsonConvert.DeserializeObject>>(httpResult.Content)?.Data; spuGoiList = listRes.ItemList; } #endregion #region shop goi { - var httpResult = restApiService.SendRequest("http://snapi.qiyue666.com/api/goi/QueryPopularizeLevelGOIByShopId", string.Empty, new + var httpResult = restApiService.SendRequest("http://snapi.qiyue666.com/", "Api/GOI/QueryPopularizeLevelGOIByShopId", new { xingXiangSearchOrderRequest.ShopId, StartTime = xingXiangSearchOrderRequest.SearchDate, @@ -234,7 +234,7 @@ namespace BBWY.Server.Business if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) throw new BusinessException("查询店铺 goi失败"); - shopGoi = JsonConvert.DeserializeObject(httpResult.Content); + shopGoi = JsonConvert.DeserializeObject>(httpResult.Content)?.Data; } #endregion @@ -280,6 +280,7 @@ namespace BBWY.Server.Business { var productAmount = orderSkuList.Where(osku => osku.ProductId == d.Spu).Sum(osku => osku.ItemTotal * osku.Price); d.SpuYingLiRatio = Math.Round((spuGoi.Profit - spuGoi.Cost) / productAmount.Value, 2); + //d.SpuYingLiRatio = Math.Round((d.Profit - spuGoi.Cost) / productAmount.Value, 2); } d.ShopYingLiRatio = shopProductAmount == 0 ? 0 : Math.Round((shopGoi.Profit - shopGoi.Cost) / shopProductAmount.Value, 2);