diff --git a/BBWY.Client/Views/PackTask/PrintWindow.xaml b/BBWY.Client/Views/PackTask/PrintWindow.xaml index cd2c9821..860acbbe 100644 --- a/BBWY.Client/Views/PackTask/PrintWindow.xaml +++ b/BBWY.Client/Views/PackTask/PrintWindow.xaml @@ -45,13 +45,13 @@ <TextBlock Margin="48,0,10,0" VerticalAlignment="Center" HorizontalAlignment="Left" Height="15" Width="43" Text="打印机:"/> <Border BorderBrush="{StaticResource Border.Brush}" Height="30" BorderThickness="1"> - <ComboBox x:Name="cbPrints" BorderThickness="0" Width="200" Height="30" VerticalAlignment="Top" HorizontalAlignment="Left" /> + <ComboBox ItemsSource="{Binding PrintList}" Text="{Binding PrintName}" BorderThickness="0" Width="200" Height="30" VerticalAlignment="Top" HorizontalAlignment="Left" /> </Border> </StackPanel> <StackPanel Orientation="Horizontal" Margin="0 10 0 10"> <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="60,0,0,0" Width="30" Height="15" Text="数量:"/> - <c:BTextBox x:Name="tbCount" Width="203" Margin="11,0,0,0" Height="30" VerticalAlignment="Top" HorizontalAlignment="Left"/> + <c:BTextBox Text="{Binding PrintCount}" Width="203" Margin="11,0,0,0" Height="30" VerticalAlignment="Top" HorizontalAlignment="Left"/> </StackPanel> <StackPanel Margin="0 10 0 0"> diff --git a/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs b/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs index 0eb7a853..ce4d0ab1 100644 --- a/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs +++ b/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs @@ -9,6 +9,8 @@ using System.Threading.Tasks; using System.Windows; using System.Collections.ObjectModel; using BBWY.Client.Extensions; +using System.Reflection; +using System.IO; namespace BBWY.Client.Views.PackTask { @@ -20,21 +22,17 @@ namespace BBWY.Client.Views.PackTask public PrintWindow() { InitializeComponent(); - this.Loaded += PrintWindow_Loaded; - - - } + InitPrintList(); + this.DataContext = this; - private void PrintWindow_Loaded(object sender, RoutedEventArgs e) - { - LoadPrints(); } - /// <summary> /// 获取打印机名称 /// </summary> - private void LoadPrints() + public void InitPrintList() { + + PrintList = new ObservableCollection<string>(); var printingNames = PrinterSettings.InstalledPrinters;//获取本机的打印机数据 int index = -1; int selectIndex = 0; @@ -49,12 +47,30 @@ namespace BBWY.Client.Views.PackTask { selectIndex = index; } - cbPrints.Items.Add(name); + PrintList.Add(name); + } + try + { + var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + string printNames = System.IO.Path.Combine(applicationPath, "handPrintBarCerName.init"); + if (File.Exists(printNames)) + { + PrintName = File.ReadAllText(printNames); + } + else + { + if (PrintList.Count > 0) + { + PrintName = PrintList[0].ToString(); + } + } } - if (cbPrints.Items.Count > selectIndex) + catch (Exception) { - cbPrints.SelectedIndex = selectIndex; + + } + } @@ -81,43 +97,59 @@ namespace BBWY.Client.Views.PackTask cer.Visibility = Visibility.Collapsed; bar.Visibility = Visibility.Visible; } - this.DataContext = this; + } - public CertificateModel[] CertificateModel { get; set; } + private CertificateModel[] certificateModel; + public CertificateModel[] CertificateModel { get => certificateModel; set { Set(ref certificateModel, value); } } - public BarCodeModel BarCodeModel { get; set; } + private BarCodeModel barCodeModel; + public BarCodeModel BarCodeModel { get=> barCodeModel; set {Set(ref barCodeModel,value); } } - private void BButton_Click(object sender, RoutedEventArgs e) - { - int printCount = 0; - try - { - printCount = Convert.ToInt32(tbCount.Text); - } - catch - { - new TipsWindow("请输入打印份数", 1).ShowDialog(); - return; - } - string printName = cbPrints.Text;//选择的要打印的打印机名称 + /// <summary> + /// 打印机列表 + /// </summary> + public ObservableCollection<string> PrintList { get; set; } + public string PrintName { get; set; } + public int PrintCount { get => printCount; set { Set(ref printCount, value); } } + private int printCount = 1; + + private void BButton_Click(object sender, RoutedEventArgs e) + { Task.Factory.StartNew(() => { if (BarCodeModel != null) { - PrintData(printCount, printName,BarCodeModel); + PrintData(PrintCount, PrintName,BarCodeModel); //MyPrintHelper.PrintBarcode(ref args, BarCodeModel, font); } if (CertificateModel != null&& CertificateModel.Count()>0) { foreach (var cer in CertificateModel) { - PrintData(printCount, printName,null,cer); + PrintData(PrintCount, PrintName,null,cer); System.Threading.Thread.Sleep(100); } } + + var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + string printNames = System.IO.Path.Combine(applicationPath, "handPrintBarCerName.init"); + try + { + if (File.Exists(printNames)) + { + File.Delete(printNames); + } + } + catch + { + + + } + + File.WriteAllText(printNames, PrintName); }); } diff --git a/BBWY.Client/Views/PackagingTask/PrintPackDetailWindow.xaml.cs b/BBWY.Client/Views/PackagingTask/PrintPackDetailWindow.xaml.cs index 54b0767c..c543d504 100644 --- a/BBWY.Client/Views/PackagingTask/PrintPackDetailWindow.xaml.cs +++ b/BBWY.Client/Views/PackagingTask/PrintPackDetailWindow.xaml.cs @@ -93,13 +93,6 @@ namespace BBWY.Client.Views.PackagingTask } private void BButton_Click(object sender, System.Windows.RoutedEventArgs e) { - - - - - - - if (PrintName.IsNullOrEmpty()) { MessageBox.Show("请选择打印设备"); diff --git a/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormAdGroupLevelSyncBusiness.cs b/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormAdGroupLevelSyncBusiness.cs index a592b94d..7e1bc996 100644 --- a/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormAdGroupLevelSyncBusiness.cs +++ b/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormAdGroupLevelSyncBusiness.cs @@ -132,6 +132,7 @@ namespace BBWY.Server.Business.Sync var insertList = new List<JDPopularizeAdGroup>(); foreach (var j in jArray) { + var r0 = j["retrievalType0"]; insertList.Add(new JDPopularizeAdGroup() { Id = idGenerator.NewLong(), @@ -142,11 +143,38 @@ namespace BBWY.Server.Business.Sync AdGroupId = j.Value<long>("adGroupId"), AdGroupName = j.Value<string>("adGroupName"), Date = DateTime.ParseExact(j.Value<string>("date"), "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture), - Cost = j["retrievalType0"].Value<decimal>("cost"), - Clicks = j["retrievalType0"].Value<int?>("clicks") ?? 0, - Impressions = j["retrievalType0"].Value<int?>("impressions") ?? 0, - TotalCartCnt = j["retrievalType0"].Value<int?>("totalCartCnt") ?? 0, - TotalOrderCnt = j["retrievalType0"].Value<int?>("totalOrderCnt") ?? 0 + Cost = r0.Value<decimal>("cost"), + Clicks = r0.Value<int?>("clicks") ?? 0, + Impressions = r0.Value<int?>("impressions") ?? 0, + TotalCartCnt = r0.Value<int?>("totalCartCnt") ?? 0, + TotalOrderCnt = r0.Value<int?>("totalOrderCnt") ?? 0, + TotalOrderCVS = r0.Value<decimal?>("totalOrderCVS") ?? 0M, + CouponCnt = r0.Value<int?>("couponCnt") ?? 0, + CPA = r0.Value<decimal?>("CPA") ?? 0.00M, + CPC = r0.Value<decimal?>("CPC") ?? 0.00M, + CPM = r0.Value<decimal?>("CPM") ?? 0.00M, + CTR = r0.Value<decimal?>("CTR") ?? 0.00M, + DepthPassengerCnt = r0.Value<int?>("depthPassengerCnt") ?? 0, + DirectCartCnt = r0.Value<int?>("directCartCnt") ?? 0, + DirectOrderCnt = r0.Value<int?>("directOrderCnt") ?? 0, + DirectOrderSum = r0.Value<decimal?>("directOrderSum") ?? 0M, + GoodsAttentionCnt = r0.Value<int?>("goodsAttentionCnt") ?? 0, + IndirectCartCnt = r0.Value<int?>("indirectCartCnt") ?? 0, + IndirectOrderCnt = r0.Value<int?>("indirectOrderCnt") ?? 0, + IndirectOrderSum = r0.Value<decimal?>("indirectOrderSum") ?? 0, + NewCustomersCnt = r0.Value<int?>("newCustomersCnt") ?? 0, + OrderDate = DateTime.ParseExact(r0.Value<string>("orderDate"), "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture), + Pin = r0.Value<string>("pin"), + PreorderCnt = r0.Value<int?>("preorderCnt") ?? 0, + ShopAttentionCnt = r0.Value<int?>("shopAttentionCnt") ?? 0, + TotalCartCost = r0.Value<decimal?>("totalCartCost") ?? 0M, + TotalOrderROI = r0.Value<decimal?>("totalOrderROI") ?? 0M, + TotalOrderSum = r0.Value<decimal?>("totalOrderSum") ?? 0M, + TotalPresaleOrderCnt = r0.Value<int?>("totalPresaleOrderCnt") ?? 0, + TotalPresaleOrderSum = r0.Value<decimal?>("totalPresaleOrderSum") ?? 0M, + VisitorCnt = r0.Value<int?>("visitorCnt") ?? 0, + VisitPageCnt = r0.Value<int?>("visitPageCnt") ?? 0, + VisitTimeAverage = r0.Value<decimal?>("visitTimeAverage") ?? 0M }); } if (insertList.Count > 0) diff --git a/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormAdLevelSyncBusiness.cs b/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormAdLevelSyncBusiness.cs index 00e3594b..03cc414f 100644 --- a/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormAdLevelSyncBusiness.cs +++ b/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormAdLevelSyncBusiness.cs @@ -159,7 +159,7 @@ namespace BBWY.Server.Business.Sync nLogManager.GetLogger($"创意维度-{shopName}").Info($"创意名称识别失败 adId {adId} adName {adName} 提取的[sku]与创意Id相同"); continue; } - + var r0 = j["retrievalType0"]; insertList.Add(new JDPopularizeAdSku() { Id = idGenerator.NewLong(), @@ -170,15 +170,44 @@ namespace BBWY.Server.Business.Sync AdGroupId = j.Value<long>("adGroupId"), AdId = long.Parse(adId), AdName = adName, - Date = DateTime.ParseExact(j.Value<string>("date"), "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture), - Cost = j["retrievalType0"].Value<decimal>("cost"), - Clicks = j["retrievalType0"].Value<int?>("clicks") ?? 0, - Impressions = j["retrievalType0"].Value<int?>("impressions") ?? 0, - TotalCartCnt = j["retrievalType0"].Value<int?>("totalCartCnt") ?? 0, - TotalOrderCnt = j["retrievalType0"].Value<int?>("totalOrderCnt") ?? 0, + Date = DateTime.ParseExact(r0.Value<string>("date"), "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture), + Cost = r0.Value<decimal>("cost"), + Clicks = r0.Value<int?>("clicks") ?? 0, + Impressions = r0.Value<int?>("impressions") ?? 0, + TotalCartCnt = r0.Value<int?>("totalCartCnt") ?? 0, + TotalOrderCnt = r0.Value<int?>("totalOrderCnt") ?? 0, Sku = sku, - VisitorCnt = j["retrievalType0"].Value<int?>("visitorCnt") ?? 0, - TotalOrderSum = j["retrievalType0"].Value<decimal>("totalOrderSum") + VisitorCnt = r0.Value<int?>("visitorCnt") ?? 0, + TotalOrderSum = r0.Value<decimal>("totalOrderSum"), + TotalOrderCVS = r0.Value<decimal?>("totalOrderCVS") ?? 0M, + CouponCnt = r0.Value<int?>("couponCnt") ?? 0, + CPA = r0.Value<decimal?>("CPA") ?? 0.00M, + CPC = r0.Value<decimal?>("CPC") ?? 0.00M, + CPM = r0.Value<decimal?>("CPM") ?? 0.00M, + CTR = r0.Value<decimal?>("CTR") ?? 0.00M, + DepthPassengerCnt = r0.Value<int?>("depthPassengerCnt") ?? 0, + DirectCartCnt = r0.Value<int?>("directCartCnt") ?? 0, + DirectOrderCnt = r0.Value<int?>("directOrderCnt") ?? 0, + DirectOrderSum = r0.Value<decimal?>("directOrderSum") ?? 0M, + GoodsAttentionCnt = r0.Value<int?>("goodsAttentionCnt") ?? 0, + IndirectCartCnt = r0.Value<int?>("indirectCartCnt") ?? 0, + IndirectOrderCnt = r0.Value<int?>("indirectOrderCnt") ?? 0, + IndirectOrderSum = r0.Value<decimal?>("indirectOrderSum") ?? 0, + NewCustomersCnt = r0.Value<int?>("newCustomersCnt") ?? 0, + OrderDate = DateTime.ParseExact(r0.Value<string>("orderDate"), "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture), + Pin = r0.Value<string>("pin"), + PreorderCnt = r0.Value<int?>("preorderCnt") ?? 0, + ShopAttentionCnt = r0.Value<int?>("shopAttentionCnt") ?? 0, + TotalCartCost = r0.Value<decimal?>("totalCartCost") ?? 0M, + TotalOrderROI = r0.Value<decimal?>("totalOrderROI") ?? 0M, + TotalPresaleOrderCnt = r0.Value<int?>("totalPresaleOrderCnt") ?? 0, + TotalPresaleOrderSum = r0.Value<decimal?>("totalPresaleOrderSum") ?? 0M, + VisitPageCnt = r0.Value<int?>("visitPageCnt") ?? 0, + VisitTimeAverage = r0.Value<decimal?>("visitTimeAverage") ?? 0M, + AdCreativeType = r0.Value<string>("adCreativeType"), + AdCustomTitle = r0.Value<string>("adCustomTitle"), + MaterialId = r0.Value<long?>("MaterialId") ?? 0, + MaterialSize = r0.Value<string>("materialSize"), }); //Console.WriteLine(insertList.Count()); } diff --git a/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormCampaignLevelSyncBusiness.cs b/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormCampaignLevelSyncBusiness.cs index 63eec634..ef9049e9 100644 --- a/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormCampaignLevelSyncBusiness.cs +++ b/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormCampaignLevelSyncBusiness.cs @@ -154,7 +154,38 @@ namespace BBWY.Server.Business.Sync Clicks = j.Value<int?>("clicks") ?? 0, Impressions = j.Value<int?>("impressions") ?? 0, TotalCartCnt = j.Value<int?>("totalCartCnt") ?? 0, - TotalOrderCnt = j.Value<int?>("totalOrderCnt") ?? 0 + TotalOrderCnt = j.Value<int?>("totalOrderCnt") ?? 0, + CampaignPutType = j.Value<int?>("campaignPutType"), + CampaignType = j.Value<int?>("campaignType"), + CampaignTypeExpand = j.Value<int?>("campaignTypeExpand"), + CouponCnt = j.Value<int?>("couponCnt") ?? 0, + CPA = j.Value<decimal?>("CPA") ?? 0.00M, + CPC = j.Value<decimal?>("CPC") ?? 0.00M, + CPM = j.Value<decimal?>("CPM") ?? 0.00M, + CTR = j.Value<decimal?>("CTR") ?? 0.00M, + DepthPassengerCnt = j.Value<int?>("depthPassengerCnt") ?? 0, + DirectCartCnt = j.Value<int?>("directCartCnt") ?? 0, + DirectOrderCnt = j.Value<int?>("directOrderCnt") ?? 0, + DirectOrderSum = j.Value<decimal?>("directOrderSum") ?? 0M, + GoodsAttentionCnt = j.Value<int?>("goodsAttentionCnt") ?? 0, + IndirectCartCnt = j.Value<int?>("indirectCartCnt") ?? 0, + IndirectOrderCnt = j.Value<int?>("indirectOrderCnt") ?? 0, + IndirectOrderSum = j.Value<decimal?>("indirectOrderSum") ?? 0, + NewCustomersCnt = j.Value<int?>("newCustomersCnt") ?? 0, + OrderDate = DateTime.ParseExact(j.Value<string>("orderDate"), "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture), + Pin = j.Value<string>("pin"), + PreorderCnt = j.Value<int?>("preorderCnt") ?? 0, + PutType = j.Value<string>("putType"), + ShopAttentionCnt = j.Value<int?>("shopAttentionCnt") ?? 0, + TotalCartCost = j.Value<decimal?>("totalCartCost") ?? 0M, + TotalOrderCVS = j.Value<decimal?>("totalOrderCVS") ?? 0M, + TotalOrderROI = j.Value<decimal?>("totalOrderROI") ?? 0M, + TotalOrderSum = j.Value<decimal?>("totalOrderSum") ?? 0M, + TotalPresaleOrderCnt = j.Value<int?>("totalPresaleOrderCnt") ?? 0, + TotalPresaleOrderSum = j.Value<decimal?>("totalPresaleOrderSum") ?? 0M, + VisitorCnt = j.Value<int?>("visitorCnt") ?? 0, + VisitPageCnt = j.Value<int?>("visitPageCnt") ?? 0, + VisitTimeAverage = j.Value<decimal?>("visitTimeAverage") ?? 0M }); } if (insertList.Count > 0) diff --git a/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormSkuLevelSyncBusiness.cs b/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormSkuLevelSyncBusiness.cs index 4c7a957d..5f49a135 100644 --- a/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormSkuLevelSyncBusiness.cs +++ b/BBWY.Server.Business/Sync/JD/JDPopularizeReportFormSkuLevelSyncBusiness.cs @@ -149,7 +149,33 @@ namespace BBWY.Server.Business.Sync TotalCartCnt = j.Value<int?>("totalCartCnt") ?? 0, TotalOrderCnt = j.Value<int?>("totalOrderCnt") ?? 0, TotalOrderSum = j.Value<decimal>("totalOrderSum"), - VisitorCnt = 0 + VisitorCnt = 0, + CTR = j.Value<decimal?>("CTR") ?? 0.00M, + DepthPassengerCnt = j.Value<int?>("depthPassengerCnt") ?? 0, + CPM = j.Value<decimal?>("CPM") ?? 0.00M, + SkuBrandId = j.Value<string>("skuBrandId"), + PreorderCnt = j.Value<int?>("preorderCnt") ?? 0, + IndirectOrderCnt = j.Value<int?>("indirectOrderCnt") ?? 0, + DirectOrderCnt = j.Value<int?>("directOrderCnt") ?? 0, + IndirectCartCnt = j.Value<int?>("indirectCartCnt") ?? 0, + VisitPageCnt = j.Value<int?>("visitPageCnt") ?? 0, + VisitTimeAverage = j.Value<decimal?>("visitTimeAverage") ?? 0M, + TotalPresaleOrderSum = j.Value<decimal?>("totalPresaleOrderSum") ?? 0M, + TotalCartCost = j.Value<decimal?>("totalCartCost") ?? 0M, + DirectCartCnt = j.Value<int?>("directCartCnt") ?? 0, + SkuCid3 = j.Value<string>("skuCid3"), + CouponCnt = j.Value<int?>("couponCnt") ?? 0, + SkuBrandName = j.Value<string>("skuBrandName"), + NewCustomersCnt = j.Value<int?>("newCustomersCnt") ?? 0, + TotalOrderROI = j.Value<decimal?>("totalOrderROI") ?? 0M, + IndirectOrderSum = j.Value<decimal?>("indirectOrderSum") ?? 0, + DirectOrderSum = j.Value<decimal?>("directOrderSum") ?? 0M, + GoodsAttentionCnt = j.Value<int?>("goodsAttentionCnt") ?? 0, + TotalOrderCVS = j.Value<decimal?>("totalOrderCVS") ?? 0M, + CPC = j.Value<decimal?>("CPC") ?? 0.00M, + TotalPresaleOrderCnt = j.Value<int?>("totalPresaleOrderCnt") ?? 0, + ShopAttentionCnt = j.Value<int?>("shopAttentionCnt") ?? 0, + OrderDate = DateTime.ParseExact(j.Value<string>("orderDate"), "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture) }).ToList(); fsql.Insert(insertList).ExecuteAffrows(); } diff --git a/BBWY.Server.Model/Db/JD/JDPopularizeAdGroup.cs b/BBWY.Server.Model/Db/JD/JDPopularizeAdGroup.cs index b7aa57f2..a8718bf6 100644 --- a/BBWY.Server.Model/Db/JD/JDPopularizeAdGroup.cs +++ b/BBWY.Server.Model/Db/JD/JDPopularizeAdGroup.cs @@ -1,4 +1,4 @@ -using FreeSql.DataAnnotations; +using FreeSql.DataAnnotations; using System; namespace BBWY.Server.Model.Db @@ -11,56 +11,149 @@ namespace BBWY.Server.Model.Db public partial class JDPopularizeAdGroup { - [Column(IsPrimary = true)] + [Column(DbType = "bigint", IsPrimary = true)] public long Id { get; set; } /// <summary> /// 单元Id /// </summary> - + [Column(DbType = "bigint")] public long? AdGroupId { get; set; } + /// <summary> + /// 单元名称 + /// </summary> [Column(StringLength = 100)] public string AdGroupName { get; set; } /// <summary> /// 业务线(快车:2 京速推:134217728) /// </summary> - + [Column(DbType = "int")] public int? BusinessType { get; set; } /// <summary> /// 计划Id /// </summary> - + [Column(DbType = "bigint")] public long? CampaignId { get; set; } /// <summary> /// 点击数 /// </summary> - [Column(Name = "clicks")] - public int? Clicks { get; set; } + [Column(Name = "clicks", DbType = "int")] + public int? Clicks { get; set; } = 0; /// <summary> /// 总花费 /// </summary> [Column(DbType = "decimal(18,2)")] - public decimal? Cost { get; set; } + public decimal? Cost { get; set; } = 0.00M; + + /// <summary> + /// 领券数 + /// </summary> + [Column(Name = "couponCnt", DbType = "int")] + public int? CouponCnt { get; set; } = 0; + + /// <summary> + /// CPA + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CPA { get; set; } = 0.00M; + + /// <summary> + /// 平均点击成本 + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CPC { get; set; } = 0.00M; + + /// <summary> + /// 千次展现成本 + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CPM { get; set; } = 0.00M; [Column(DbType = "datetime")] public DateTime? CreateTime { get; set; } + /// <summary> + /// 点击率 + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CTR { get; set; } = 0.00M; + /// <summary> /// 计费日期 /// </summary> [Column(DbType = "datetime")] public DateTime? Date { get; set; } + /// <summary> + /// 深度进店数 + /// </summary> + [Column(Name = "depthPassengerCnt", DbType = "int")] + public int? DepthPassengerCnt { get; set; } = 0; + + /// <summary> + /// 直接购物车数 + /// </summary> + [Column(Name = "directCartCnt", DbType = "int")] + public int? DirectCartCnt { get; set; } = 0; + + /// <summary> + /// 直接订单行 + /// </summary> + [Column(Name = "directOrderCnt", DbType = "int")] + public int? DirectOrderCnt { get; set; } = 0; + + /// <summary> + /// 直接订单金额 + /// </summary> + [Column(Name = "directOrderSum", DbType = "decimal(18,2)")] + public decimal? DirectOrderSum { get; set; } = 0.00M; + + /// <summary> + /// 商品关注数 + /// </summary> + [Column(Name = "goodsAttentionCnt", DbType = "int")] + public int? GoodsAttentionCnt { get; set; } = 0; + /// <summary> /// 展现次数 /// </summary> - [Column(Name = "impressions")] - public int? Impressions { get; set; } + [Column(Name = "impressions", DbType = "int")] + public int? Impressions { get; set; } = 0; + + /// <summary> + /// 间接购物车数 + /// </summary> + [Column(Name = "indirectCartCnt", DbType = "int")] + public int? IndirectCartCnt { get; set; } = 0; + + /// <summary> + /// 间接订单行 + /// </summary> + [Column(Name = "indirectOrderCnt", DbType = "int")] + public int? IndirectOrderCnt { get; set; } = 0; + + /// <summary> + /// 间接订单金额 + /// </summary> + [Column(Name = "indirectOrderSum", DbType = "decimal(18,2)")] + public decimal? IndirectOrderSum { get; set; } = 0.00M; + + /// <summary> + /// 下单新客数 + /// </summary> + [Column(Name = "newCustomersCnt", DbType = "int")] + public int? NewCustomersCnt { get; set; } = 0; + + /// <summary> + /// 下单日期 + /// </summary> + [Column(Name = "orderDate", DbType = "datetime")] + public DateTime? OrderDate { get; set; } /// <summary> /// 账号归属 @@ -68,20 +161,86 @@ namespace BBWY.Server.Model.Db [Column(Name = "pin")] public string Pin { get; set; } + /// <summary> + /// 预约数 + /// </summary> + [Column(Name = "preorderCnt", DbType = "int")] + public int? PreorderCnt { get; set; } = 0; + + /// <summary> + /// 店铺关注数 + /// </summary> + [Column(Name = "shopAttentionCnt", DbType = "int")] + public int? ShopAttentionCnt { get; set; } = 0; + [Column(DbType = "bigint")] public long? ShopId { get; set; } /// <summary> /// 总加购人数 /// </summary> - [Column(Name = "totalCartCnt")] - public int? TotalCartCnt { get; set; } + [Column(Name = "totalCartCnt", DbType = "int")] + public int? TotalCartCnt { get; set; } = 0; + + /// <summary> + /// 总加购成本 + /// </summary> + [Column(Name = "totalCartCost", DbType = "decimal(18,2)")] + public decimal? TotalCartCost { get; set; } = 0.00M; /// <summary> /// 总订单数 /// </summary> - [Column(Name = "totalOrderCnt")] - public int? TotalOrderCnt { get; set; } + [Column(Name = "totalOrderCnt", DbType = "int")] + public int? TotalOrderCnt { get; set; } = 0; + + /// <summary> + /// 点击转化率 + /// </summary> + [Column(Name = "totalOrderCVS", DbType = "decimal(18,2)")] + public decimal? TotalOrderCVS { get; set; } = 0.00M; + + /// <summary> + /// ROI + /// </summary> + [Column(Name = "totalOrderROI", DbType = "decimal(18,2)")] + public decimal? TotalOrderROI { get; set; } = 0.00M; + + /// <summary> + /// 总订单金额 + /// </summary> + [Column(Name = "totalOrderSum", DbType = "decimal(18,2)")] + public decimal? TotalOrderSum { get; set; } = 0.00M; + + /// <summary> + /// 预售订单行 + /// </summary> + [Column(Name = "totalPresaleOrderCnt", DbType = "int")] + public int? TotalPresaleOrderCnt { get; set; } = 0; + + /// <summary> + /// 预售订单金额 + /// </summary> + [Column(Name = "totalPresaleOrderSum", DbType = "decimal(18,2)")] + public decimal? TotalPresaleOrderSum { get; set; } = 0.00M; + + /// <summary> + /// 访客数 + /// </summary> + [Column(Name = "visitorCnt", DbType = "int")] + public int? VisitorCnt { get; set; } = 0; + + /// <summary> + /// 访问页面数 + /// </summary> + [Column(Name = "visitPageCnt", DbType = "int")] + public int? VisitPageCnt { get; set; } = 0; + + /// <summary> + /// 访问时长 + /// </summary> + [Column(Name = "visitTimeAverage", DbType = "decimal(18,2)")] + public decimal? VisitTimeAverage { get; set; } = 0.00M; } diff --git a/BBWY.Server.Model/Db/JD/JDPopularizeAdSku.cs b/BBWY.Server.Model/Db/JD/JDPopularizeAdSku.cs index 6303915b..69baf11e 100644 --- a/BBWY.Server.Model/Db/JD/JDPopularizeAdSku.cs +++ b/BBWY.Server.Model/Db/JD/JDPopularizeAdSku.cs @@ -1,4 +1,4 @@ -using FreeSql.DataAnnotations; +using FreeSql.DataAnnotations; using System; namespace BBWY.Server.Model.Db @@ -11,62 +11,179 @@ namespace BBWY.Server.Model.Db public partial class JDPopularizeAdSku { - [Column(IsPrimary = true)] + [Column(DbType = "bigint", IsPrimary = true)] public long Id { get; set; } /// <summary> - /// 单元Id + /// 文档无解释 + /// </summary> + [Column(Name = "adCreativeType", StringLength = 50)] + public string AdCreativeType { get; set; } = "0"; + + /// <summary> + /// adCustomTitle无文档解释 /// </summary> + [Column(Name = "adCustomTitle")] + public string AdCustomTitle { get; set; } + /// <summary> + /// 单元Id + /// </summary> + [Column(DbType = "bigint")] public long? AdGroupId { get; set; } /// <summary> /// 创意Id /// </summary> - + [Column(DbType = "bigint")] public long? AdId { get; set; } + /// <summary> + /// 创意名称 + /// </summary> [Column(StringLength = 100)] public string AdName { get; set; } /// <summary> /// 业务线(快车:2 京速推:134217728) /// </summary> - + [Column(DbType = "int")] public int? BusinessType { get; set; } /// <summary> /// 计划Id /// </summary> - + [Column(DbType = "bigint")] public long? CampaignId { get; set; } /// <summary> /// 点击数 /// </summary> - [Column(Name = "clicks")] - public int? Clicks { get; set; } + [Column(Name = "clicks", DbType = "int")] + public int? Clicks { get; set; } = 0; /// <summary> /// 总花费 /// </summary> [Column(DbType = "decimal(18,2)")] - public decimal? Cost { get; set; } + public decimal? Cost { get; set; } = 0.00M; + + /// <summary> + /// 领券数 + /// </summary> + [Column(Name = "couponCnt", DbType = "int")] + public int? CouponCnt { get; set; } = 0; + + /// <summary> + /// CPA + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CPA { get; set; } = 0.00M; + + /// <summary> + /// 平均点击成本 + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CPC { get; set; } = 0.00M; + + /// <summary> + /// 千次展现成本 + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CPM { get; set; } = 0.00M; [Column(DbType = "datetime")] public DateTime? CreateTime { get; set; } + /// <summary> + /// 点击率 + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CTR { get; set; } = 0.00M; + /// <summary> /// 计费日期 /// </summary> [Column(DbType = "datetime")] public DateTime? Date { get; set; } + /// <summary> + /// 深度进店数 + /// </summary> + [Column(Name = "depthPassengerCnt", DbType = "int")] + public int? DepthPassengerCnt { get; set; } = 0; + + /// <summary> + /// 直接购物车数 + /// </summary> + [Column(Name = "directCartCnt", DbType = "int")] + public int? DirectCartCnt { get; set; } = 0; + + /// <summary> + /// 直接订单行 + /// </summary> + [Column(Name = "directOrderCnt", DbType = "int")] + public int? DirectOrderCnt { get; set; } = 0; + + /// <summary> + /// 直接订单金额 + /// </summary> + [Column(Name = "directOrderSum", DbType = "decimal(18,2)")] + public decimal? DirectOrderSum { get; set; } = 0.00M; + + /// <summary> + /// 商品关注数 + /// </summary> + [Column(Name = "goodsAttentionCnt", DbType = "int")] + public int? GoodsAttentionCnt { get; set; } = 0; + /// <summary> /// 展现次数 /// </summary> - [Column(Name = "impressions")] - public int? Impressions { get; set; } + [Column(Name = "impressions", DbType = "int")] + public int? Impressions { get; set; } = 0; + + /// <summary> + /// 间接购物车数 + /// </summary> + [Column(Name = "indirectCartCnt", DbType = "int")] + public int? IndirectCartCnt { get; set; } = 0; + + /// <summary> + /// 间接订单行 + /// </summary> + [Column(Name = "indirectOrderCnt", DbType = "int")] + public int? IndirectOrderCnt { get; set; } = 0; + + /// <summary> + /// 间接订单金额 + /// </summary> + [Column(Name = "indirectOrderSum", DbType = "decimal(18,2)")] + public decimal? IndirectOrderSum { get; set; } = 0.00M; + + /// <summary> + /// materialId无文档解释 + /// </summary> + [Column(Name = "materialId", DbType = "bigint")] + public long? MaterialId { get; set; } = 0; + + /// <summary> + /// materialSize文档无解释 + /// </summary> + [Column(Name = "materialSize", StringLength = 100)] + public string MaterialSize { get; set; } + + /// <summary> + /// 下单新客数 + /// </summary> + [Column(Name = "newCustomersCnt", DbType = "int")] + public int? NewCustomersCnt { get; set; } = 0; + + /// <summary> + /// 下单日期 + /// </summary> + [Column(Name = "orderDate", DbType = "datetime")] + public DateTime? OrderDate { get; set; } /// <summary> /// 账号归属 @@ -74,38 +191,111 @@ namespace BBWY.Server.Model.Db [Column(Name = "pin")] public string Pin { get; set; } + /// <summary> + /// 预约数 + /// </summary> + [Column(Name = "preorderCnt", DbType = "int")] + public int? PreorderCnt { get; set; } = 0; + + [Column(StringLength = 50)] + public string ProductId { get; set; } + + /// <summary> + /// 店铺关注数 + /// </summary> + [Column(Name = "shopAttentionCnt", DbType = "int")] + public int? ShopAttentionCnt { get; set; } = 0; + [Column(DbType = "bigint")] public long? ShopId { get; set; } [Column(StringLength = 50)] public string Sku { get; set; } - [Column(StringLength = 50)] - public string ProductId { get; set; } + /// <summary> + /// 品牌ID + /// </summary> + [Column(Name = "skuBrandId", StringLength = 50)] + public string SkuBrandId { get; set; } + + /// <summary> + /// sku品牌名称 + /// </summary> + [Column(Name = "skuBrandName", StringLength = 50)] + public string SkuBrandName { get; set; } + + /// <summary> + /// SKU三级类目Id + /// </summary> + [Column(Name = "skuCid3", StringLength = 50)] + public string SkuCid3 { get; set; } /// <summary> /// 总加购人数 /// </summary> - [Column(Name = "totalCartCnt")] - public int? TotalCartCnt { get; set; } + [Column(Name = "totalCartCnt", DbType = "int")] + public int? TotalCartCnt { get; set; } = 0; + + /// <summary> + /// 总加购成本 + /// </summary> + [Column(Name = "totalCartCost", DbType = "decimal(18,2)")] + public decimal? TotalCartCost { get; set; } = 0.00M; /// <summary> /// 总订单数 /// </summary> - [Column(Name = "totalOrderCnt")] - public int? TotalOrderCnt { get; set; } + [Column(Name = "totalOrderCnt", DbType = "int")] + public int? TotalOrderCnt { get; set; } = 0; + + /// <summary> + /// 点击转化率 + /// </summary> + [Column(Name = "totalOrderCVS", DbType = "decimal(18,2)")] + public decimal? TotalOrderCVS { get; set; } = 0.00M; + + /// <summary> + /// ROI + /// </summary> + [Column(Name = "totalOrderROI", DbType = "decimal(18,2)")] + public decimal? TotalOrderROI { get; set; } = 0.00M; /// <summary> /// 总订单金额 /// </summary> - [Column(Name = "totalOrderSum")] - public decimal TotalOrderSum { get; set; } + [Column(Name = "totalOrderSum", DbType = "decimal(11,2)")] + public decimal? TotalOrderSum { get; set; } = 0.00M; + + /// <summary> + /// 预售订单行 + /// </summary> + [Column(Name = "totalPresaleOrderCnt", DbType = "int")] + public int? TotalPresaleOrderCnt { get; set; } = 0; + + /// <summary> + /// 预售订单金额 + /// </summary> + [Column(Name = "totalPresaleOrderSum", DbType = "decimal(18,2)")] + public decimal? TotalPresaleOrderSum { get; set; } = 0.00M; /// <summary> /// 访客数 /// </summary> - [Column(Name = "visitorCnt")] - public int VisitorCnt { get; set; } + [Column(Name = "visitorCnt", DbType = "int")] + public int? VisitorCnt { get; set; } = 0; + + /// <summary> + /// 访问页面数 + /// </summary> + [Column(Name = "visitPageCnt", DbType = "int")] + public int? VisitPageCnt { get; set; } = 0; + + /// <summary> + /// 访问时长 + /// </summary> + [Column(Name = "visitTimeAverage", DbType = "decimal(18,2)")] + public decimal? VisitTimeAverage { get; set; } = 0.00M; + } } diff --git a/BBWY.Server.Model/Db/JD/JDPopularizeCampaign.cs b/BBWY.Server.Model/Db/JD/JDPopularizeCampaign.cs index 946dd97e..bf6e19bb 100644 --- a/BBWY.Server.Model/Db/JD/JDPopularizeCampaign.cs +++ b/BBWY.Server.Model/Db/JD/JDPopularizeCampaign.cs @@ -1,4 +1,4 @@ -using FreeSql.DataAnnotations; +using FreeSql.DataAnnotations; using System; namespace BBWY.Server.Model.Db @@ -11,28 +11,50 @@ namespace BBWY.Server.Model.Db public partial class JDPopularizeCampaign { - [Column(IsPrimary = true)] + [Column(DbType = "bigint", IsPrimary = true)] public long Id { get; set; } /// <summary> /// 业务线(快车:2 京速推:134217728) /// </summary> - + [Column(DbType = "int")] public int? BusinessType { get; set; } /// <summary> /// 计划Id /// </summary> + [Column(DbType = "bigint")] public long? CampaignId { get; set; } + /// <summary> + /// 计划名称 + /// </summary> [Column(StringLength = 100)] public string CampaignName { get; set; } + /// <summary> + /// 文档无解释 + /// </summary> + [Column(Name = "campaignPutType", DbType = "int")] + public int? CampaignPutType { get; set; } + + /// <summary> + /// 计划类型 + /// </summary> + [Column(Name = "campaignType", DbType = "int")] + public int? CampaignType { get; set; } = 0; + + /// <summary> + /// 计划类型 + /// </summary> + [Column(Name = "campaignTypeExpand", DbType = "int")] + public int? CampaignTypeExpand { get; set; } = 0; + /// <summary> /// 点击数 /// </summary> - [Column(Name = "clicks")] - public int? Clicks { get; set; } + [Column(Name = "clicks", DbType = "int")] + public int? Clicks { get; set; } = 0; /// <summary> /// 总花费 @@ -40,20 +62,110 @@ namespace BBWY.Server.Model.Db [Column(DbType = "decimal(18,2)")] public decimal? Cost { get; set; } + /// <summary> + /// 领券数 + /// </summary> + [Column(Name = "couponCnt", DbType = "int")] + public int? CouponCnt { get; set; } = 0; + + /// <summary> + /// CPA + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CPA { get; set; } = 0.00M; + + /// <summary> + /// 平均点击成本 + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CPC { get; set; } = 0.00M; + + /// <summary> + /// 千次展现成本 + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CPM { get; set; } = 0.00M; + [Column(DbType = "datetime")] public DateTime? CreateTime { get; set; } + /// <summary> + /// 点击率 + /// </summary> + [Column(DbType = "decimal(18,2)")] + public decimal? CTR { get; set; } = 0.00M; + /// <summary> /// 计费日期 /// </summary> [Column(DbType = "datetime")] public DateTime? Date { get; set; } + /// <summary> + /// 深度进店数 + /// </summary> + [Column(Name = "depthPassengerCnt", DbType = "int")] + public int? DepthPassengerCnt { get; set; } = 0; + + /// <summary> + /// 直接购物车数 + /// </summary> + [Column(Name = "directCartCnt", DbType = "int")] + public int? DirectCartCnt { get; set; } = 0; + + /// <summary> + /// 直接订单行 + /// </summary> + [Column(Name = "directOrderCnt", DbType = "int")] + public int? DirectOrderCnt { get; set; } = 0; + + /// <summary> + /// 直接订单金额 + /// </summary> + [Column(Name = "directOrderSum", DbType = "decimal(18,2)")] + public decimal? DirectOrderSum { get; set; } = 0.00M; + + /// <summary> + /// 商品关注数 + /// </summary> + [Column(Name = "goodsAttentionCnt", DbType = "int")] + public int? GoodsAttentionCnt { get; set; } = 0; + /// <summary> /// 展现次数 /// </summary> - [Column(Name = "impressions")] - public int? Impressions { get; set; } + [Column(Name = "impressions", DbType = "int")] + public int? Impressions { get; set; } = 0; + + /// <summary> + /// 间接购物车数 + /// </summary> + [Column(Name = "indirectCartCnt", DbType = "int")] + public int? IndirectCartCnt { get; set; } = 0; + + /// <summary> + /// 间接订单行 + /// </summary> + [Column(Name = "indirectOrderCnt", DbType = "int")] + public int? IndirectOrderCnt { get; set; } = 0; + + /// <summary> + /// 间接订单金额 + /// </summary> + [Column(Name = "indirectOrderSum", DbType = "decimal(18,2)")] + public decimal? IndirectOrderSum { get; set; } = 0.00M; + + /// <summary> + /// 下单新客数 + /// </summary> + [Column(Name = "newCustomersCnt", DbType = "int")] + public int? NewCustomersCnt { get; set; } = 0; + + /// <summary> + /// 下单日期 + /// </summary> + [Column(Name = "orderDate", DbType = "datetime")] + public DateTime? OrderDate { get; set; } /// <summary> /// 账号归属 @@ -61,20 +173,92 @@ namespace BBWY.Server.Model.Db [Column(Name = "pin")] public string Pin { get; set; } + /// <summary> + /// 预约数 + /// </summary> + [Column(Name = "preorderCnt", DbType = "int")] + public int? PreorderCnt { get; set; } = 0; + + /// <summary> + /// 文档无解释 + /// </summary> + [Column(Name = "putType", StringLength = 100)] + public string PutType { get; set; } + + /// <summary> + /// 店铺关注数 + /// </summary> + [Column(Name = "shopAttentionCnt", DbType = "int")] + public int? ShopAttentionCnt { get; set; } = 0; + [Column(DbType = "bigint")] public long? ShopId { get; set; } /// <summary> /// 总加购人数 /// </summary> - [Column(Name = "totalCartCnt")] - public int? TotalCartCnt { get; set; } + [Column(Name = "totalCartCnt", DbType = "int")] + public int? TotalCartCnt { get; set; } = 0; + + /// <summary> + /// 总加购成本 + /// </summary> + [Column(Name = "totalCartCost", DbType = "decimal(18,2)")] + public decimal? TotalCartCost { get; set; } = 0.00M; /// <summary> /// 总订单数 /// </summary> - [Column(Name = "totalOrderCnt")] - public int? TotalOrderCnt { get; set; } + [Column(Name = "totalOrderCnt", DbType = "int")] + public int? TotalOrderCnt { get; set; } = 0; + + /// <summary> + /// 点击转化率 + /// </summary> + [Column(Name = "totalOrderCVS", DbType = "decimal(18,2)")] + public decimal? TotalOrderCVS { get; set; } = 0.00M; + + /// <summary> + /// ROI + /// </summary> + [Column(Name = "totalOrderROI", DbType = "decimal(18,2)")] + public decimal? TotalOrderROI { get; set; } = 0.00M; + + /// <summary> + /// 总订单金额 + /// </summary> + [Column(Name = "totalOrderSum", DbType = "decimal(18,2)")] + public decimal? TotalOrderSum { get; set; } = 0.00M; + + /// <summary> + /// 预售订单行 + /// </summary> + [Column(Name = "totalPresaleOrderCnt", DbType = "int")] + public int? TotalPresaleOrderCnt { get; set; } = 0; + + /// <summary> + /// 预售订单金额 + /// </summary> + [Column(Name = "totalPresaleOrderSum", DbType = "decimal(18,2)")] + public decimal? TotalPresaleOrderSum { get; set; } = 0.00M; + + /// <summary> + /// 访客数 + /// </summary> + [Column(Name = "visitorCnt", DbType = "int")] + public int? VisitorCnt { get; set; } = 0; + + /// <summary> + /// 访问页面数 + /// </summary> + [Column(Name = "visitPageCnt", DbType = "int")] + public int? VisitPageCnt { get; set; } = 0; + + /// <summary> + /// 访问时长 + /// </summary> + [Column(Name = "visitTimeAverage", DbType = "decimal(18,2)")] + public decimal? VisitTimeAverage { get; set; } = 0.00M; }