From 235db2f6cc31663ac6e2d9b001001836f0c591b7 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sat, 23 Sep 2023 16:31:58 +0800 Subject: [PATCH] 1 --- .../Sync/OrderSyncBusiness.cs | 5 +- .../Db/Product/Skutotalsaleinfo.cs | 22 +------- .../Db/Product/SpuTotalSaleInfo.cs | 54 +++++++++++++++++++ 3 files changed, 56 insertions(+), 25 deletions(-) create mode 100644 BBWYB.Server.Model/Db/Product/SpuTotalSaleInfo.cs diff --git a/BBWYB.Server.Business/Sync/OrderSyncBusiness.cs b/BBWYB.Server.Business/Sync/OrderSyncBusiness.cs index 5dda27e..e278255 100644 --- a/BBWYB.Server.Business/Sync/OrderSyncBusiness.cs +++ b/BBWYB.Server.Business/Sync/OrderSyncBusiness.cs @@ -196,8 +196,7 @@ namespace BBWYB.Server.Business.Sync ProductId = qtOrderSku.ProductId, BelongSkuId = belongSkus?.FirstOrDefault(j => j.Value("SkuId") == qtOrderSku.SkuId)?.Value("BelongSkuId") ?? string.Empty, InPackAmount = qtOrderSku.PackAmount, - BuyerPayFreight = qtOrderSku.FreightAmount, - IsNeedOptimization = 0 + BuyerPayFreight = qtOrderSku.FreightAmount }); } //收货人 @@ -286,8 +285,6 @@ namespace BBWYB.Server.Business.Sync CreateTime = DateTime.Now, IsEnabled = true, ItemCount = 0, - LastOptimizationItemCount = 0, - LastOptimizationTime = null, ProductId = qtOrderSku.ProductId, ShopId = shopId, UpdateTime = DateTime.Now diff --git a/BBWYB.Server.Model/Db/Product/Skutotalsaleinfo.cs b/BBWYB.Server.Model/Db/Product/Skutotalsaleinfo.cs index 4358d0d..a880f04 100644 --- a/BBWYB.Server.Model/Db/Product/Skutotalsaleinfo.cs +++ b/BBWYB.Server.Model/Db/Product/Skutotalsaleinfo.cs @@ -1,12 +1,4 @@ -using FreeSql.DatabaseModel; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Threading.Tasks; -using Newtonsoft.Json; -using FreeSql.DataAnnotations; +using FreeSql.DataAnnotations; namespace BBWYB.Server.Model.Db { @@ -39,18 +31,6 @@ namespace BBWYB.Server.Model.Db [Column(DbType = "bigint")] public long? ItemCount { get; set; } - /// - /// 上次优化时的销量 - /// - [Column(DbType = "bigint")] - public long? LastOptimizationItemCount { get; set; } - - /// - /// 上次优化时间 - /// - [Column(DbType = "datetime")] - public DateTime? LastOptimizationTime { get; set; } - /// /// Spu /// diff --git a/BBWYB.Server.Model/Db/Product/SpuTotalSaleInfo.cs b/BBWYB.Server.Model/Db/Product/SpuTotalSaleInfo.cs new file mode 100644 index 0000000..bc44a14 --- /dev/null +++ b/BBWYB.Server.Model/Db/Product/SpuTotalSaleInfo.cs @@ -0,0 +1,54 @@ +using FreeSql.DataAnnotations; + +namespace BBWYB.Server.Model.Db +{ + + /// + /// Spu总销量表 + /// + [Table(Name = "sputotalsaleinfo", DisableSyncStructure = true)] + public partial class SpuTotalSaleInfo + { + + /// + /// Spu + /// + [Column(StringLength = 50, IsPrimary = true, IsNullable = false)] + public string ProductId { get; set; } + + [Column(DbType = "datetime")] + public DateTime? CreateTime { get; set; } + + /// + /// 是否有效 + /// + + public bool? IsEnabled { get; set; } = false; + + /// + /// 销量,销售件数 + /// + [Column(DbType = "bigint")] + public long? ItemCount { get; set; } + + /// + /// 上次优化时的销量 + /// + [Column(DbType = "bigint")] + public long? LastOptimizationItemCount { get; set; } + + /// + /// 上次优化时间 + /// + [Column(DbType = "datetime")] + public DateTime? LastOptimizationTime { get; set; } + + [Column(DbType = "bigint")] + public long? ShopId { get; set; } + + [Column(DbType = "datetime")] + public DateTime? UpdateTime { get; set; } + + } + +}