diff --git a/SiNan.API/Controllers/GOIController.cs b/SiNan.API/Controllers/GOIController.cs
index 35423f2..219bafe 100644
--- a/SiNan.API/Controllers/GOIController.cs
+++ b/SiNan.API/Controllers/GOIController.cs
@@ -41,9 +41,20 @@ namespace SiNan.API.Controllers
///
///
[HttpPost]
- public ListResponse QueryProduct360HistogramStatistics([FromBody]JDXXHistogramRequest request)
+ public JDXXHistogramResponse QueryProduct360HistogramStatistics([FromBody]JDXXHistogramRequest request)
{
return goiBusiness.QueryProduct360HistogramStatistics(request);
}
+
+ ///
+ /// 产品360分析-头部统计
+ ///
+ ///
+ ///
+ [HttpPost]
+ public Product360TopStatisticsResponse QueryProduct360TopStatistics([FromBody]Product360TopStatisticsRequest request)
+ {
+ return goiBusiness.QueryProduct360TopStatistics(request);
+ }
}
}
diff --git a/SiNan.Business/GOIBusiness.cs b/SiNan.Business/GOIBusiness.cs
index 223dbd7..fc69735 100644
--- a/SiNan.Business/GOIBusiness.cs
+++ b/SiNan.Business/GOIBusiness.cs
@@ -437,23 +437,87 @@ namespace SiNan.Business
};
}
- public ListResponse QueryProduct360HistogramStatistics(JDXXHistogramRequest request)
+ public JDXXHistogramResponse QueryProduct360HistogramStatistics(JDXXHistogramRequest request)
{
+ List skuIdList = null;
+ if (!string.IsNullOrEmpty(request.Sku))
+ {
+ request.Spu = string.Empty;
+ skuIdList = new List() { request.Sku };
+ }
+ if (!string.IsNullOrEmpty(request.Spu))
+ {
+ skuIdList = fsql.Select().Where(ps => ps.ProductId == request.Spu).ToList(ps => ps.Id);
+ }
+
var startDate = DateTime.Now.Date.AddDays(-14);
var endDate = DateTime.Now.Date.AddSeconds(-1);
- var list = fsql.Select().Where(s => request.SkuList.Contains(s.Sku))
- .Where(s => s.CreateTime >= startDate && s.CreateTime <= endDate)
- .ToList(s => new JDXXHistogramResponse()
- {
- UV = s.Uv,
- Sales = s.Sales,
- Profit = s.Profits,
- TotalCost = s.TotalCost
- });
- return new ListResponse()
+ var data = fsql.Select().Where(s => skuIdList.Contains(s.Sku))
+ .Where(s => s.CreateTime >= startDate && s.CreateTime <= endDate)
+ .ToAggregate(s => new JDXXHistogramResponse()
+ {
+ UV = s.Sum(s.Key.Uv),
+ Sales = s.Sum(s.Key.Sales),
+ Profit = s.Sum(s.Key.Profits),
+ TotalCost = s.Sum(s.Key.TotalCost)
+ });
+ return data;
+ }
+
+ public Product360TopStatisticsResponse QueryProduct360TopStatistics(Product360TopStatisticsRequest request)
+ {
+ if (string.IsNullOrEmpty(request.Sku) && string.IsNullOrEmpty(request.Spu))
+ throw new BusinessException("缺少必要参数");
+
+ if (!string.IsNullOrEmpty(request.Sku))
+ request.Spu = string.Empty;
+
+ Product p = null;
+ ProductSku productSku = null;
+
+ if (!string.IsNullOrEmpty(request.Spu))
+ p = fsql.Select(request.Spu).ToOne();
+
+ var psList = fsql.Select().WhereIf(!string.IsNullOrEmpty(request.Spu), ps => ps.ProductId == request.Spu)
+ .WhereIf(!string.IsNullOrEmpty(request.Sku), ps => ps.Id == request.Sku)
+ .ToList();
+ if (!string.IsNullOrEmpty(request.Sku))
+ productSku = psList.FirstOrDefault(ps => ps.Id == request.Sku);
+
+
+ var skuIdList = psList.Select(ps => ps.Id).ToList();
+ var spu = psList.FirstOrDefault().ProductId;
+
+ var noOrderStateList = new List()
+ {
+ Enums.OrderState.已取消,
+ Enums.OrderState.待付款
+ };
+
+
+ var saleQueryTime = DateTime.Now.Date.AddDays(-30);
+
+ var saleCount = fsql.Select()
+ .InnerJoin((o, osku) => o.Id == osku.OrderId)
+ .Where((o, osku) => !noOrderStateList.Contains(o.OrderState) &&
+ o.StartTime >= saleQueryTime)
+ .WhereIf(!string.IsNullOrEmpty(request.Spu), (o, osku) => osku.ProductId == request.Spu)
+ .WhereIf(!string.IsNullOrEmpty(request.Sku), (o, osku) => osku.SkuId == request.Sku)
+ .Sum((o, osku) => osku.ItemTotal);
+
+ var pingjia = fsql.Select().Where(x => x.SpusId == spu).OrderByDescending(x => x.CreateTime).ToOne(x => x.TotalCount);
+
+
+ var historyPopularizeLevelGOIList = StatisticsPopularizeLevelGOI(skuIdList, null, null);
+ var totalDeficit = historyPopularizeLevelGOIList.Sum(x => x.Profit) - historyPopularizeLevelGOIList.Sum(x => x.Cost);
+
+ return new Product360TopStatisticsResponse()
{
- Count = list.Count,
- ItemList = list
+ CreateTime = p?.CreateTime ?? productSku?.CreateTime,
+ EvaluateCount = pingjia,
+ MaxDeficit = p?.MaxDeficitThreshold ?? productSku?.MaxDeficitThreshold,
+ MonthSaleCount = saleCount,
+ TotalDeficit = totalDeficit
};
}
}
diff --git a/SiNan.Model/Db/JDXX/Skus.cs b/SiNan.Model/Db/JDXX/Skus.cs
index 25a956e..e156d9a 100644
--- a/SiNan.Model/Db/JDXX/Skus.cs
+++ b/SiNan.Model/Db/JDXX/Skus.cs
@@ -1,452 +1,459 @@
using FreeSql.DataAnnotations;
-namespace SiNan.Server.Model.Db
+namespace SiNan.Model.Db
{
///
/// sku表
///
- [ Table(Name = "skus", DisableSyncStructure = true)]
- public partial class Skus {
-
- ///
- /// Id
- ///
- [Column(StringLength = 50, IsPrimary = true, IsNullable = false)]
- public string Id { get; set; }
-
- ///
- /// 加购物车数量
- ///
- [Column(DbType = "int")]
- public int? AddCardCount { get; set; }
-
- ///
- /// 加购人数
- ///
- [Column(DbType = "int")]
- public int? AddCardMember { get; set; }
-
- ///
- /// 加购率
- ///
- [Column(DbType = "decimal(11,2)")]
- public decimal? AddCardRate { get; set; }
-
- ///
- /// 点击次数
- ///
- [Column(DbType = "int")]
- public int? ClickCount { get; set; }
-
- ///
- /// 点击率
- ///
- [Column(DbType = "decimal(11,2)")]
- public decimal? ClickRate { get; set; }
-
- ///
- /// 栏目订单
- ///
- [Column(DbType = "int")]
- public int? ColumnOrder { get; set; }
-
- ///
- /// 转化率
- ///
- [Column(DbType = "decimal(11,2)")]
- public decimal? ConversionRate { get; set; }
-
- ///
- /// 收费流量
- ///
- [Column(DbType = "int")]
- public int? CostUv { get; set; }
-
- ///
- /// 创建时间
- ///
- [Column(DbType = "datetime")]
- public DateTime CreateTime { get; set; }
-
- ///
- /// 创建人Id
- ///
- [Column(StringLength = 50)]
- public string CreatorId { get; set; }
-
- ///
- /// 创建人
- ///
- [Column(StringLength = 50, IsNullable = false)]
- public string CreatorRealName { get; set; }
-
- ///
- /// 盈亏小节
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? EarningsPrice { get; set; }
-
- ///
- /// 曝光量
- ///
- [Column(DbType = "int")]
- public int? Exposure { get; set; }
-
- ///
- /// 快车点击率
- ///
- [Column(DbType = "decimal(11,2)")]
- public decimal? ExposureClickRate { get; set; }
-
- ///
- /// 快车点击
- ///
- [Column(DbType = "int")]
- public int? ExpressClick { get; set; }
-
- ///
- /// 快车花费
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? ExpressCost { get; set; }
-
- ///
- /// 快车展现
- ///
-
- public decimal? ExpressExposure { get; set; }
-
- ///
- /// 快车订单
- ///
- [Column(DbType = "int")]
- public int? ExpressOrder { get; set; }
-
- ///
- /// 快车成交额
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? ExpressPayPrice { get; set; }
-
- ///
- /// 快车人均点击
- ///
- [Column(DbType = "decimal(11,4)")]
- public decimal? ExpressPeopleClick { get; set; }
-
- ///
- /// 快车访客
- ///
- [Column(DbType = "int")]
- public int? ExpressUv { get; set; }
-
- ///
- /// 免费订单
- ///
- [Column(DbType = "int")]
- public int? FreeOrder { get; set; }
-
- ///
- /// 免费成交额
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? FreePayPrice { get; set; }
-
- ///
- /// 免费流量
- ///
- [Column(DbType = "int")]
- public int? FreeUv { get; set; }
-
- ///
- /// 首页访客
- ///
- [Column(DbType = "int")]
- public int? IndexUv { get; set; }
-
- ///
- /// 是否收藏
- ///
- [Column(DbType = "tinyint")]
- public sbyte? IsStar { get; set; }
-
- ///
- /// 新品交易榜单
- ///
- [Column(DbType = "int")]
- public int? NewSaleTopIndex { get; set; }
-
- ///
- /// 新品人气榜单
- ///
- [Column(DbType = "int")]
- public int? NewUvTopIndex { get; set; }
-
- ///
- /// 一级类目
- ///
- [Column(StringLength = 50)]
- public string OneCatId { get; set; }
-
- ///
- /// 其他订单
- ///
- [Column(DbType = "int")]
- public int? OtherOrder { get; set; }
-
- ///
- /// 其他成交额
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? OtherPrice { get; set; }
-
- ///
- /// 其他访客
- ///
- [Column(DbType = "int")]
- public int? OtherUv { get; set; }
-
- ///
- /// 流量路径
- ///
- [Column(StringLength = -2)]
- public string PathList { get; set; }
-
- ///
- /// 下单商品件数
- ///
- [Column(DbType = "int")]
- public int? PayItemCount { get; set; }
-
- ///
- /// 下单客户数
- ///
- [Column(DbType = "int")]
- public int? PayMember { get; set; }
-
- ///
- /// 下单数
- ///
- [Column(DbType = "int")]
- public int? PayOrder { get; set; }
-
- ///
- /// 下单金额
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? PayPrice { get; set; }
-
- ///
- /// 下单转化率
- ///
- [Column(DbType = "decimal(11,2)")]
- public decimal? PayRate { get; set; }
-
- ///
- /// 毛利
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? Profits { get; set; }
-
- ///
- /// 流量
- ///
- [Column(DbType = "int")]
- public int? Pv { get; set; }
-
- ///
- /// 真实转化率
- ///
- [Column(DbType = "decimal(11,2)")]
- public decimal? RealConversionRate { get; set; }
-
- ///
- /// 真实成交额
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? RealPrice { get; set; }
-
- ///
- /// 成交客户数
- ///
- [Column(DbType = "int")]
- public int? SaleMember { get; set; }
-
- ///
- /// 成交金额
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? SalePrice { get; set; }
-
- ///
- /// 成交转化率
- ///
- [Column(DbType = "decimal(11,2)")]
- public decimal? SaleRate { get; set; }
-
- ///
- /// 成交件数
- ///
- [Column(DbType = "int")]
- public int? Sales { get; set; }
-
- ///
- /// 交易榜单排名
- ///
- [Column(DbType = "int")]
- public int? SaleTopIndex { get; set; }
-
- ///
- /// 风向标
- ///
- [Column(DbType = "decimal(11,2)")]
- public decimal? ScoreRank { get; set; }
-
- ///
- /// 刷单花费
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? SdCost { get; set; }
-
- ///
- /// 刷单单量
- ///
- [Column(DbType = "int")]
- public int? SdOrder { get; set; }
-
- ///
- /// 刷单成交额
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? SdPrice { get; set; }
-
- ///
- /// 搜索访客
- ///
- [Column(DbType = "int")]
- public int? SearchUv { get; set; }
-
- ///
- /// 二级类目
- ///
- [Column(StringLength = 50)]
- public string SecondCatId { get; set; }
-
- ///
- /// 自主订单
- ///
- [Column(DbType = "int")]
- public int? SelfOrder { get; set; }
-
- ///
- /// 店铺Id
- ///
- [Column(StringLength = 50)]
- public string ShopsId { get; set; }
-
- ///
- /// 海投点击
- ///
- [Column(DbType = "int")]
- public int? ShotgunClick { get; set; }
-
- ///
- /// 海投点击率
- ///
- [Column(DbType = "decimal(11,2)")]
- public decimal? ShotgunClickRate { get; set; }
-
- ///
- /// 海投花费
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? ShotgunCost { get; set; }
-
- ///
- /// 海投展现
- ///
- [Column(DbType = "decimal(11,2)")]
- public decimal? ShotgunExposure { get; set; }
-
- ///
- /// 海投订单
- ///
- [Column(DbType = "int")]
- public int? ShotgunOrder { get; set; }
-
- ///
- /// 海投成交额
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? ShotgunPayPrice { get; set; }
-
- ///
- /// 海投人均点击
- ///
- [Column(DbType = "decimal(11,4)")]
- public decimal? ShotgunPeopleClick { get; set; }
-
- ///
- /// 海投访客
- ///
- [Column(DbType = "int")]
- public int? ShotgunUv { get; set; }
-
- ///
- /// sku
- ///
- [Column(StringLength = 50)]
- public string Sku { get; set; }
-
- ///
- /// Spu
- ///
- [Column(StringLength = 50)]
- public string Spu { get; set; }
-
- ///
- /// SpuId
- ///
- [Column(StringLength = 50)]
- public string SpusId { get; set; }
-
- ///
- /// 推荐访客
- ///
- [Column(DbType = "int")]
- public int? StarUv { get; set; }
-
- ///
- /// 三级类目
- ///
- [Column(StringLength = 50)]
- public string ThirdCatId { get; set; }
-
- ///
- /// 标题
- ///
- [Column(StringLength = -1)]
- public string Title { get; set; }
-
- ///
- /// 总花费
- ///
- [Column(DbType = "decimal(19,4)")]
- public decimal? TotalCost { get; set; }
-
- ///
- /// 访客
- ///
- [Column(DbType = "int")]
- public int? Uv { get; set; }
-
- ///
- /// 人气榜单排名
- ///
- [Column(DbType = "int")]
- public int? UvTopIndex { get; set; }
-
- }
+ [Table(Name = "skus", DisableSyncStructure = true)]
+ public partial class Skus
+ {
+
+ ///
+ /// Id
+ ///
+ [Column(StringLength = 50, IsPrimary = true, IsNullable = false)]
+ public string Id { get; set; }
+
+ ///
+ /// 加购物车数量
+ ///
+ [Column(DbType = "int")]
+ public int? AddCardCount { get; set; }
+
+ ///
+ /// 加购人数
+ ///
+ [Column(DbType = "int")]
+ public int? AddCardMember { get; set; }
+
+ ///
+ /// 加购率
+ ///
+ [Column(DbType = "decimal(11,2)")]
+ public decimal? AddCardRate { get; set; }
+
+ ///
+ /// 点击次数
+ ///
+ [Column(DbType = "int")]
+ public int? ClickCount { get; set; }
+
+ ///
+ /// 点击率
+ ///
+ [Column(DbType = "decimal(11,2)")]
+ public decimal? ClickRate { get; set; }
+
+ ///
+ /// 栏目订单
+ ///
+ [Column(DbType = "int")]
+ public int? ColumnOrder { get; set; }
+
+ ///
+ /// 转化率
+ ///
+ [Column(DbType = "decimal(11,2)")]
+ public decimal? ConversionRate { get; set; }
+
+ ///
+ /// 收费流量
+ ///
+ [Column(DbType = "int")]
+ public int? CostUv { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Column(DbType = "datetime")]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 创建人Id
+ ///
+ [Column(StringLength = 50)]
+ public string CreatorId { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [Column(StringLength = 50, IsNullable = false)]
+ public string CreatorRealName { get; set; }
+
+ ///
+ /// 盈亏小节
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? EarningsPrice { get; set; }
+
+ ///
+ /// 曝光量
+ ///
+ [Column(DbType = "int")]
+ public int? Exposure { get; set; }
+
+ ///
+ /// 快车点击率
+ ///
+ [Column(DbType = "decimal(11,2)")]
+ public decimal? ExposureClickRate { get; set; }
+
+ ///
+ /// 快车点击
+ ///
+ [Column(DbType = "int")]
+ public int? ExpressClick { get; set; }
+
+ ///
+ /// 快车花费
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? ExpressCost { get; set; }
+
+ ///
+ /// 快车展现
+ ///
+
+ public decimal? ExpressExposure { get; set; }
+
+ ///
+ /// 快车订单
+ ///
+ [Column(DbType = "int")]
+ public int? ExpressOrder { get; set; }
+
+ ///
+ /// 快车成交额
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? ExpressPayPrice { get; set; }
+
+ ///
+ /// 快车人均点击
+ ///
+ [Column(DbType = "decimal(11,4)")]
+ public decimal? ExpressPeopleClick { get; set; }
+
+ ///
+ /// 快车访客
+ ///
+ [Column(DbType = "int")]
+ public int? ExpressUv { get; set; }
+
+ ///
+ /// 免费订单
+ ///
+ [Column(DbType = "int")]
+ public int? FreeOrder { get; set; }
+
+ ///
+ /// 免费成交额
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? FreePayPrice { get; set; }
+
+ ///
+ /// 免费流量
+ ///
+ [Column(DbType = "int")]
+ public int? FreeUv { get; set; }
+
+ ///
+ /// 首页访客
+ ///
+ [Column(DbType = "int")]
+ public int? IndexUv { get; set; }
+
+ ///
+ /// 是否收藏
+ ///
+ [Column(DbType = "tinyint")]
+ public sbyte? IsStar { get; set; }
+
+ ///
+ /// 新品交易榜单
+ ///
+ [Column(DbType = "int")]
+ public int? NewSaleTopIndex { get; set; }
+
+ ///
+ /// 新品人气榜单
+ ///
+ [Column(DbType = "int")]
+ public int? NewUvTopIndex { get; set; }
+
+ ///
+ /// 一级类目
+ ///
+ [Column(StringLength = 50)]
+ public string OneCatId { get; set; }
+
+ ///
+ /// 其他订单
+ ///
+ [Column(DbType = "int")]
+ public int? OtherOrder { get; set; }
+
+ ///
+ /// 其他成交额
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? OtherPrice { get; set; }
+
+ ///
+ /// 其他访客
+ ///
+ [Column(DbType = "int")]
+ public int? OtherUv { get; set; }
+
+ ///
+ /// 流量路径
+ ///
+ [Column(StringLength = -2)]
+ public string PathList { get; set; }
+
+ ///
+ /// 下单商品件数
+ ///
+ [Column(DbType = "int")]
+ public int? PayItemCount { get; set; }
+
+ ///
+ /// 下单客户数
+ ///
+ [Column(DbType = "int")]
+ public int? PayMember { get; set; }
+
+ ///
+ /// 下单数
+ ///
+ [Column(DbType = "int")]
+ public int? PayOrder { get; set; }
+
+ ///
+ /// 下单金额
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? PayPrice { get; set; }
+
+ ///
+ /// 下单转化率
+ ///
+ [Column(DbType = "decimal(11,2)")]
+ public decimal? PayRate { get; set; }
+
+ ///
+ /// 毛利
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? Profits { get; set; }
+
+ ///
+ /// 流量
+ ///
+ [Column(DbType = "int")]
+ public int? Pv { get; set; }
+
+ ///
+ /// 真实转化率
+ ///
+ [Column(DbType = "decimal(11,2)")]
+ public decimal? RealConversionRate { get; set; }
+
+ ///
+ /// 真实成交额
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? RealPrice { get; set; }
+
+ ///
+ /// 成交客户数
+ ///
+ [Column(DbType = "int")]
+ public int? SaleMember { get; set; }
+
+ ///
+ /// 成交金额
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? SalePrice { get; set; }
+
+ ///
+ /// 成交转化率
+ ///
+ [Column(DbType = "decimal(11,2)")]
+ public decimal? SaleRate { get; set; }
+
+ ///
+ /// 成交件数
+ ///
+ [Column(DbType = "int")]
+ public int? Sales { get; set; }
+
+ ///
+ /// 交易榜单排名
+ ///
+ [Column(DbType = "int")]
+ public int? SaleTopIndex { get; set; }
+
+ ///
+ /// 风向标
+ ///
+ [Column(DbType = "decimal(11,2)")]
+ public decimal? ScoreRank { get; set; }
+
+ ///
+ /// 刷单花费
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? SdCost { get; set; }
+
+ ///
+ /// 刷单单量
+ ///
+ [Column(DbType = "int")]
+ public int? SdOrder { get; set; }
+
+ ///
+ /// 刷单成交额
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? SdPrice { get; set; }
+
+ ///
+ /// 搜索访客
+ ///
+ [Column(DbType = "int")]
+ public int? SearchUv { get; set; }
+
+ ///
+ /// 二级类目
+ ///
+ [Column(StringLength = 50)]
+ public string SecondCatId { get; set; }
+
+ ///
+ /// 自主订单
+ ///
+ [Column(DbType = "int")]
+ public int? SelfOrder { get; set; }
+
+ ///
+ /// 店铺ID
+ ///
+ [Column(StringLength = 50)]
+ public string ShopId { get; set; }
+
+ ///
+ /// 店铺Id
+ ///
+ [Column(StringLength = 50)]
+ public string ShopsId { get; set; }
+
+ ///
+ /// 海投点击
+ ///
+ [Column(DbType = "int")]
+ public int? ShotgunClick { get; set; }
+
+ ///
+ /// 海投点击率
+ ///
+ [Column(DbType = "decimal(11,2)")]
+ public decimal? ShotgunClickRate { get; set; }
+
+ ///
+ /// 海投花费
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? ShotgunCost { get; set; }
+
+ ///
+ /// 海投展现
+ ///
+ [Column(DbType = "decimal(11,2)")]
+ public decimal? ShotgunExposure { get; set; }
+
+ ///
+ /// 海投订单
+ ///
+ [Column(DbType = "int")]
+ public int? ShotgunOrder { get; set; }
+
+ ///
+ /// 海投成交额
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? ShotgunPayPrice { get; set; }
+
+ ///
+ /// 海投人均点击
+ ///
+ [Column(DbType = "decimal(11,4)")]
+ public decimal? ShotgunPeopleClick { get; set; }
+
+ ///
+ /// 海投访客
+ ///
+ [Column(DbType = "int")]
+ public int? ShotgunUv { get; set; }
+
+ ///
+ /// sku
+ ///
+ [Column(StringLength = 50)]
+ public string Sku { get; set; }
+
+ ///
+ /// Spu
+ ///
+ [Column(StringLength = 50)]
+ public string Spu { get; set; }
+
+ ///
+ /// SpuId
+ ///
+ [Column(StringLength = 50)]
+ public string SpusId { get; set; }
+
+ ///
+ /// 推荐访客
+ ///
+ [Column(DbType = "int")]
+ public int? StarUv { get; set; }
+
+ ///
+ /// 三级类目
+ ///
+ [Column(StringLength = 50)]
+ public string ThirdCatId { get; set; }
+
+ ///
+ /// 标题
+ ///
+ [Column(StringLength = -1)]
+ public string Title { get; set; }
+
+ ///
+ /// 总花费
+ ///
+ [Column(DbType = "decimal(19,4)")]
+ public decimal? TotalCost { get; set; }
+
+ ///
+ /// 访客
+ ///
+ [Column(DbType = "int")]
+ public int? Uv { get; set; }
+
+ ///
+ /// 人气榜单排名
+ ///
+ [Column(DbType = "int")]
+ public int? UvTopIndex { get; set; }
+
+ }
}
diff --git a/SiNan.Model/Db/JDXX/Spuchange.cs b/SiNan.Model/Db/JDXX/Spuchange.cs
new file mode 100644
index 0000000..dbe0a39
--- /dev/null
+++ b/SiNan.Model/Db/JDXX/Spuchange.cs
@@ -0,0 +1,147 @@
+using FreeSql.DataAnnotations;
+
+namespace SiNan.Model.Db
+{
+
+ ///
+ /// spu评论数据变更表
+ ///
+ [Table(Name = "spuchange", DisableSyncStructure = true)]
+ public partial class Spuchange
+ {
+
+ ///
+ /// Id
+ ///
+ [Column(StringLength = 50, IsPrimary = true, IsNullable = false)]
+ public string Id { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Column(DbType = "datetime")]
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 创建人Id
+ ///
+ [Column(StringLength = 50)]
+ public string CreatorId { get; set; }
+
+ ///
+ /// 好评率
+ ///
+ [Column(StringLength = 11)]
+ public string GoodRate { get; set; }
+
+ ///
+ /// 差评
+ ///
+ [Column(StringLength = 11)]
+ public string HasBad { get; set; }
+
+ ///
+ /// 好评
+ ///
+ [Column(StringLength = 11)]
+ public string HasGood { get; set; }
+
+ ///
+ /// 有图评价
+ ///
+ [Column(StringLength = 11)]
+ public string HasImg { get; set; }
+
+ ///
+ /// 中评
+ ///
+ [Column(StringLength = 11)]
+ public string HasMedium { get; set; }
+
+ ///
+ /// 追评
+ ///
+ [Column(StringLength = 11)]
+ public string HasMore { get; set; }
+
+ ///
+ /// 带视频评价
+ ///
+ [Column(StringLength = 11)]
+ public string HasVideo { get; set; }
+
+ ///
+ /// 旧的好评率
+ ///
+ [Column(StringLength = 11)]
+ public string OldGoodRate { get; set; }
+
+ ///
+ /// 旧的差评
+ ///
+ [Column(StringLength = 11)]
+ public string OldHasBad { get; set; }
+
+ ///
+ /// 旧的好评
+ ///
+ [Column(StringLength = 11)]
+ public string OldHasGood { get; set; }
+
+ ///
+ /// 旧的有图评价
+ ///
+ [Column(StringLength = 11)]
+ public string OldHasImg { get; set; }
+
+ ///
+ /// 旧的中评
+ ///
+ [Column(StringLength = 11)]
+ public string OldHasMedium { get; set; }
+
+ ///
+ /// 旧的追评
+ ///
+ [Column(StringLength = 11)]
+ public string OldHasMore { get; set; }
+
+ ///
+ /// 旧的带视频评价
+ ///
+ [Column(StringLength = 11)]
+ public string OldHasVideo { get; set; }
+
+ ///
+ /// 旧的全部评价
+ ///
+ [Column(StringLength = 11)]
+ public string OldTotalCount { get; set; }
+
+ ///
+ /// Spu
+ ///
+ [Column(StringLength = 50)]
+ public string Spu { get; set; }
+
+ ///
+ /// Spu表Id
+ ///
+ [Column(StringLength = 50)]
+ public string SpusId { get; set; }
+
+ ///
+ /// 团队ID
+ ///
+ [Column(StringLength = 50)]
+ public string TeamId { get; set; }
+
+ ///
+ /// 全部评价
+ ///
+ [Column(StringLength = 11)]
+ public string TotalCount { get; set; }
+
+ }
+
+}
diff --git a/SiNan.Model/Db/Order/OrderSku.cs b/SiNan.Model/Db/Order/OrderSku.cs
new file mode 100644
index 0000000..9a1c6ac
--- /dev/null
+++ b/SiNan.Model/Db/Order/OrderSku.cs
@@ -0,0 +1,68 @@
+using FreeSql.DataAnnotations;
+
+namespace SiNan.Model.Db
+{
+
+ [Table(Name = "ordersku", DisableSyncStructure = true)]
+ public partial class OrderSku
+ {
+
+ [Column(DbType = "bigint(1)", IsPrimary = true)]
+ public long Id { get; set; }
+
+ [Column(DbType = "datetime")]
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 销售数量
+ ///
+ [Column(DbType = "int(1)")]
+ public int? ItemTotal { get; set; }
+
+ [Column(StringLength = 50)]
+ public string OrderId { get; set; }
+
+ ///
+ /// 销售单价
+ ///
+ [Column(DbType = "decimal(20,2)")]
+ public decimal? Price { get; set; }
+
+ [Column(StringLength = 50)]
+ public string ProductId { get; set; }
+
+ ///
+ /// 货号
+ ///
+ [Column(StringLength = 50)]
+ public string ProductNo { get; set; }
+
+ [Column(StringLength = 50, IsNullable = false)]
+ public string SkuId { get; set; }
+
+ ///
+ /// Sku标题
+ ///
+ [Column(StringLength = 255)]
+ public string Title { get; set; }
+
+ [Column(StringLength = 255)]
+ public string Logo { get; set; }
+
+ ///
+ /// 代发信息Id
+ ///
+ [Column(DbType = "bigint(1)", IsNullable = true)]
+ public long? OrderDropShippingId { get; set; }
+
+ ///
+ /// 是否售后
+ ///
+ [Column(DbType = "bit")]
+ public bool IsRefund { get; set; } = false;
+
+ [Column(IsIgnore = true)]
+ public long ShopId { get; set; }
+ }
+
+}
diff --git a/SiNan.Model/Dto/Request/GOI/Product360PopularizeAnalysisRequest.cs b/SiNan.Model/Dto/Request/GOI/Product360PopularizeAnalysisRequest.cs
index 02c10e1..c299d69 100644
--- a/SiNan.Model/Dto/Request/GOI/Product360PopularizeAnalysisRequest.cs
+++ b/SiNan.Model/Dto/Request/GOI/Product360PopularizeAnalysisRequest.cs
@@ -10,7 +10,7 @@
public string Spu { get; set; }
///
- /// 按SKU条件查询时传值该字段,SPU和SKU同时有值会忽略SPU条件
+ /// 按SKU条件查询时传值该字段,同时有值会忽略SPU
///
public string Sku { get; set; }
diff --git a/SiNan.Model/Dto/Request/JDXX/JDXXHistogramRequest.cs b/SiNan.Model/Dto/Request/JDXX/JDXXHistogramRequest.cs
index 32cdc79..05d393e 100644
--- a/SiNan.Model/Dto/Request/JDXX/JDXXHistogramRequest.cs
+++ b/SiNan.Model/Dto/Request/JDXX/JDXXHistogramRequest.cs
@@ -2,6 +2,14 @@
{
public class JDXXHistogramRequest
{
- public IList SkuList { get; set; }
+ ///
+ /// 按SPU条件查询时传值该字段
+ ///
+ public string Spu { get; set; }
+
+ ///
+ /// 按SKU条件查询时传值该字段,同时有值会忽略SPU
+ ///
+ public string Sku { get; set; }
}
}
diff --git a/SiNan.Model/Dto/Request/Statistics/Product360TopStatisticsRequest.cs b/SiNan.Model/Dto/Request/Statistics/Product360TopStatisticsRequest.cs
new file mode 100644
index 0000000..54c50a4
--- /dev/null
+++ b/SiNan.Model/Dto/Request/Statistics/Product360TopStatisticsRequest.cs
@@ -0,0 +1,15 @@
+namespace SiNan.Model.Dto
+{
+ public class Product360TopStatisticsRequest
+ {
+ ///
+ /// 按SPU查询传该值
+ ///
+ public string Spu { get; set; }
+
+ ///
+ /// 按SKU查询传该值,同时有值会忽略SPU
+ ///
+ public string Sku { get; set; }
+ }
+}
diff --git a/SiNan.Model/Dto/Response/JDXX/JDXXHistogramResponse.cs b/SiNan.Model/Dto/Response/JDXX/JDXXHistogramResponse.cs
index 33a2c36..31a0432 100644
--- a/SiNan.Model/Dto/Response/JDXX/JDXXHistogramResponse.cs
+++ b/SiNan.Model/Dto/Response/JDXX/JDXXHistogramResponse.cs
@@ -5,12 +5,12 @@
///
/// 访客
///
- public long? UV { get; set; }
+ public decimal? UV { get; set; }
///
/// 销量
///
- public long? Sales { get; set; }
+ public decimal? Sales { get; set; }
///
/// 花费
diff --git a/SiNan.Model/Dto/Response/Statistics/Product360TopStatisticsResponse.cs b/SiNan.Model/Dto/Response/Statistics/Product360TopStatisticsResponse.cs
new file mode 100644
index 0000000..f052004
--- /dev/null
+++ b/SiNan.Model/Dto/Response/Statistics/Product360TopStatisticsResponse.cs
@@ -0,0 +1,30 @@
+namespace SiNan.Model.Dto
+{
+ public class Product360TopStatisticsResponse
+ {
+ ///
+ /// 月销量(近30天销量)
+ ///
+ public decimal? MonthSaleCount { get; set; }
+
+ ///
+ /// 评价数,string类型
+ ///
+ public string EvaluateCount { get; set; }
+
+ ///
+ /// 累计亏损
+ ///
+ public decimal? TotalDeficit { get; set; }
+
+ ///
+ /// 最大亏损阈值
+ ///
+ public decimal? MaxDeficit { get; set; }
+
+ ///
+ /// 上架时间
+ ///
+ public DateTime? CreateTime { get; set; }
+ }
+}