824 lines
34 KiB
C#
824 lines
34 KiB
C#
|
using Api.Framework.Enums;
|
|||
|
using Api.Framework.SDK;
|
|||
|
using CircleFriends.Control;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using UI.Framework.Entitys;
|
|||
|
using Weixin.TBCirclePromotion.Control;
|
|||
|
using static Api.Framework.ApiClient;
|
|||
|
using static Weixin.TBCirclePromotion.Enums;
|
|||
|
|
|||
|
namespace Weixin.TBCirclePromotion
|
|||
|
{
|
|||
|
[Config(Name = "插件-淘宝发单-配置")]
|
|||
|
public class Config
|
|||
|
{
|
|||
|
|
|||
|
#region 大淘客xxx
|
|||
|
// #region 发单功能
|
|||
|
|
|||
|
// #region 采集
|
|||
|
// /// <summary>
|
|||
|
// /// 发单条件 - 商品最低售价
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("1)、自动采集"), DisplayName("01.采集开关"), DefaultValue(SwitchType.开启)
|
|||
|
// ]
|
|||
|
// public SwitchType Switch { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 采集数据触发数量
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("1)、自动采集"), DisplayName("02.采集触发量"), DefaultValue(10),
|
|||
|
// Description(@"当采集开关为开启时,该值为一个采集点,当采集剩余的商品数量少于等于采集触发量,将自动进行采集操作")
|
|||
|
// ]
|
|||
|
// public int GatherTouchNum { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 发单条件 - 类目
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("1)、自动采集"), DisplayName("03.类目"), DefaultValue(@""),
|
|||
|
// Description(@"筛选类目:居家日用、美食、母婴、美妆、女装、数码家电、文娱车品、内衣、家装家纺、鞋品、男装、配饰、户外运动、箱包"),
|
|||
|
// Editor(typeof(CategoryControl), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
// ]
|
|||
|
// public string Category { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 发单条件 - 平台
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("1)、自动采集"), DisplayName("04.平台"), DefaultValue(StageType.不限),
|
|||
|
// Description(@"筛选拼台:聚划算、淘抢购、天猫、金牌卖家、海淘")
|
|||
|
// ]
|
|||
|
// public StageType Stage { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 发单条件 - 商品最低售价
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("1)、自动采集"), DisplayName("05.商品最低售价"),
|
|||
|
// Description(@"采集的产品最低价格,不填写表示不限制最价!")
|
|||
|
// ]
|
|||
|
// public double? Price1 { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 发单条件 - 商品最高售价
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("1)、自动采集"), DisplayName("06.商品最高售价"),
|
|||
|
// Description(@"采集的产品最高价格,不填写表示不限制最高价!")
|
|||
|
// ]
|
|||
|
// public double? Price2 { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 发单条件 - 佣金比例
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("1)、自动采集"), DisplayName("07.佣金比例"),
|
|||
|
// Description(@"采集的产品佣金比例条件,选中的比例包含选中的值.不填写表示不限制佣金比例!")
|
|||
|
// ]
|
|||
|
// public double? Rate { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 发单条件 - 优惠券面额
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("1)、自动采集"), DisplayName("08.发单条件 - 优惠券面额"), DefaultValue(@""),
|
|||
|
// Description(@"商品对应的优惠券面额大于等于预设的值"),
|
|||
|
// Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
// ]
|
|||
|
// public double? CouponMoney { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 发单条件 - 月销量
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("1)、自动采集"), DisplayName("09.发单条件 - 月销量"), DefaultValue(@""),
|
|||
|
// Description(@"商品月销量大于等于预设的值"),
|
|||
|
// Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
// ]
|
|||
|
// public int? Sales { get; set; }
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// #region 开始时间
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 朋友圈发单二维码模板
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("2)、朋友圈基础设置"), DisplayName("01.发单二维码模板"), DefaultValue(QrImageType.模板B),
|
|||
|
// Description(@"朋友圈发单二维码模板")
|
|||
|
// ]
|
|||
|
// public QrImageType Model { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 朋友圈发单方式
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("2)、朋友圈基础设置"), DisplayName("02.发单方式"), DefaultValue(SendModeType.多产品),
|
|||
|
// Description(@"朋友圈发单方式
|
|||
|
//第一种多产品发送,一条朋友圈信息中一个图片包含一个宝贝信息
|
|||
|
//第二种单产品发送,一条朋友圈信息中包含多张该宝贝的图片信息")
|
|||
|
// ]
|
|||
|
// public SendModeType SendMode { get; set; }
|
|||
|
|
|||
|
// private string[] _sendTaskTimes;
|
|||
|
// [
|
|||
|
// Category("2)、朋友圈基础设置"), DisplayName("03.发送任务时间段"),
|
|||
|
// Description(@"每一行为一个发送时间段
|
|||
|
//格式:时间1-时间2
|
|||
|
//注:时间1 必须大于 时间2")
|
|||
|
// ]
|
|||
|
// public string[] SendTaskTimes //{ get; set; }
|
|||
|
// {
|
|||
|
// get { return _sendTaskTimes; }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// var sendTaskTimes = value as string[];
|
|||
|
// if (sendTaskTimes != null && sendTaskTimes.Length != 0)
|
|||
|
// {
|
|||
|
// for (int i = 0; i < sendTaskTimes.Length; i++)
|
|||
|
// {
|
|||
|
// var times = sendTaskTimes[i].Trim().Split('-');
|
|||
|
// if (times.Length == 2)
|
|||
|
// {
|
|||
|
// var begin = DateTime.Parse(times[0]);
|
|||
|
// var end = DateTime.Parse(times[1]);
|
|||
|
// if (begin >= end)
|
|||
|
// throw new Exception($"开始时间必须小于结束时间:[{sendTaskTimes[i]}]");
|
|||
|
// }
|
|||
|
// }
|
|||
|
// }
|
|||
|
// _sendTaskTimes = value;
|
|||
|
// }
|
|||
|
// }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 朋友圈发送间隔,单位 分
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("2)、朋友圈基础设置"), DisplayName("04.朋友圈发送间隔"), DefaultValue(120),
|
|||
|
// Description(@"朋友圈推广商品间隔,单位 分")
|
|||
|
// ]
|
|||
|
// public double Interval_Circle { get; set; }
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// #region 发送设置
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 发送商品图片数量
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("3)、多产品发单设置"), DisplayName("01.发送推广图片数量"), DefaultValue(9),
|
|||
|
// Description(@"发送朋友圈推广图片数量,最多9张图片")
|
|||
|
// ]
|
|||
|
// public int Multi_SendGoodsImageNum { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 宝贝描述语
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("3)、多产品发单设置"), DisplayName("02.发送的文字内容"), DefaultValue(@"╭┈┈┈┄┈┈┈┈┈╮
|
|||
|
// 爆款榜单
|
|||
|
//╰┈┈┈┈┈┈┈┈┈╯
|
|||
|
//补贴奖励和帮助渠道
|
|||
|
|
|||
|
//手机淘宝分享宝贝给我
|
|||
|
//可以查询优惠券款下单
|
|||
|
|
|||
|
//还有网购红包领哦"),
|
|||
|
// Description(@"发送朋友圈时的文本内容"),
|
|||
|
// Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
// ]
|
|||
|
// public string Multi_ContentCircle { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 宝贝描述语
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("3)、多产品发单设置"), DisplayName("03.宝贝描述语"), DefaultValue(@""),
|
|||
|
// Description(@"图片中宝贝描述信息,为空时以采集到的数据为准.
|
|||
|
//支持变量:[商品标题]、[商品描述]、[已售数量]、[店铺名称]、[优惠券金额]、[优惠券数量]、[商品单价]、[券后价]、[购买地址]"),
|
|||
|
// Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
// ]
|
|||
|
// public string Multi_GoodsDesc { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 朋友圈追加评语 - 多个商品
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("3)、多产品发单设置"), DisplayName("04.朋友圈追加评语"), DefaultValue(@""),
|
|||
|
// Description(@"朋友圈商品推广之后,追加评语"),
|
|||
|
// Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
// ]
|
|||
|
// public string Multi_AdditionalComment { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 是否合成宝贝优惠券
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("4)、单产品发单设置"), DisplayName("01.是否合成优惠券"), DefaultValue(SwitchType.开启),
|
|||
|
// Description(@"功能开启时,将自动合成优惠券图片")
|
|||
|
// ]
|
|||
|
// public SwitchType Single_IsSynthCoupon { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 是否合成宝贝二维码图片
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("4)、单产品发单设置"), DisplayName("02.是否合成二维码"), DefaultValue(SwitchType.开启),
|
|||
|
// Description(@"功能开启时,将自动将其中一张图片合成二维码图片")
|
|||
|
// ]
|
|||
|
// public SwitchType Single_IsQRCodePic { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 二维码宝贝描述语
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("4)、单产品发单设置"), DisplayName("03.二维码图片底栏描述语"), DefaultValue(@""),
|
|||
|
// Description(@"合成二维码功能开启时,合成二维码图片下方的空白栏内容。可以用于放广告内容"),
|
|||
|
// Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
// ]
|
|||
|
// public string Single_GoodsQRCodePicDesc { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 宝贝描述语
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("4)、单产品发单设置"), DisplayName("04.发送的文字内容"), DefaultValue(@"[商品标题]
|
|||
|
//领[优惠券金额]元券,券后【[券后价]元】包邮秒杀!
|
|||
|
//【推荐理由】[商品描述]"),
|
|||
|
// Description(@"发送朋友圈时的文本内容
|
|||
|
//支持变量:[商品标题]、[商品单价]、[优惠券金额]、[券后价]、[商品描述]、[已售数量]、[店铺名称]"),
|
|||
|
// Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
// ]
|
|||
|
// public string Single_ContentCircle { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 朋友圈追加评语 - 单个商品
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("4)、单产品发单设置"), DisplayName("05.朋友圈追加评语"), DefaultValue(@"[商品标题]
|
|||
|
//商品单价:[商品单价]元
|
|||
|
//优惠券金额:[优惠券金额]元
|
|||
|
//券后价:[券后价]元
|
|||
|
//购买地址:[购买地址]
|
|||
|
//淘口令:[淘口令]"),
|
|||
|
// Description(@"朋友圈商品推广之后,追加评语
|
|||
|
//支持变量:[商品标题]、[已售数量]、[店铺名称]、[优惠券金额]、[优惠券数量]、[商品单价]、[券后价]、[购买地址]、[淘口令]"),
|
|||
|
// Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
// ]
|
|||
|
// public string Single_AdditionalComment { get; set; }
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 自动清理
|
|||
|
// /// </summary>
|
|||
|
// [
|
|||
|
// Category("5)、定时清理"), DisplayName("01.定时清理"), DefaultValue(SwitchType.开启),
|
|||
|
// Description(@"功能开启时,将在设置的时间进行采集数据的清空操作")
|
|||
|
// ]
|
|||
|
// public SwitchType Auto_IsClear { get; set; }
|
|||
|
|
|||
|
// private string _autoClearTaskTimes;
|
|||
|
// [
|
|||
|
// Category("5)、定时清理"), DisplayName("02.定时清理时间"),
|
|||
|
// Description(@"定时清理时间
|
|||
|
//格式:HH:mm
|
|||
|
//例:23:59
|
|||
|
//注:时间为24小时制")
|
|||
|
// ]
|
|||
|
// public string AutoClearTaskTimes //{ get; set; }
|
|||
|
// {
|
|||
|
// get { return _autoClearTaskTimes; }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// try
|
|||
|
// {
|
|||
|
// var time = value as string;
|
|||
|
// var _time = DateTime.Parse(time);
|
|||
|
// }
|
|||
|
// catch (Exception)
|
|||
|
// {
|
|||
|
// throw new Exception($"时间格式不正确");
|
|||
|
// }
|
|||
|
// _autoClearTaskTimes = value;
|
|||
|
// }
|
|||
|
// }
|
|||
|
|
|||
|
// ///// <summary>
|
|||
|
// ///// 朋友圈追加评语
|
|||
|
// ///// </summary>
|
|||
|
// //[
|
|||
|
// // Category("4)、单产品发单设置"), DisplayName("04."), DefaultValue(@""),
|
|||
|
// // Description(@"朋友圈商品推广之后,追加评语"),
|
|||
|
// // Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
// //]
|
|||
|
// //public string AdditionalComment { get; set; }
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
// /// <summary>
|
|||
|
// /// 记录发送的时间
|
|||
|
// /// </summary>
|
|||
|
// [Browsable(false)]
|
|||
|
// public DateTime RecordSendTime { get; set; }
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// public Config()
|
|||
|
// {
|
|||
|
// this.Auto_IsClear = SwitchType.开启;
|
|||
|
// this.Switch = SwitchType.开启;
|
|||
|
// this.GatherTouchNum = 10;
|
|||
|
// this.Stage = StageType.不限;
|
|||
|
// this.SendMode = SendModeType.多产品;
|
|||
|
// this.Model = QrImageType.模板B;
|
|||
|
// this.Price1 = null;
|
|||
|
// this.Price1 = null;
|
|||
|
// this.CouponMoney = null;
|
|||
|
// this.Rate = null;
|
|||
|
// this.Category = string.Empty;
|
|||
|
// this.Sales = null;
|
|||
|
// this.Multi_ContentCircle = @"╭┈┈┈┄┈┈┈┈┈╮
|
|||
|
// 爆款榜单
|
|||
|
//╰┈┈┈┈┈┈┈┈┈╯
|
|||
|
//补贴奖励和帮助渠道
|
|||
|
|
|||
|
//手机淘宝分享宝贝给我
|
|||
|
//可以查询优惠券款下单
|
|||
|
|
|||
|
//还有网购红包领哦";
|
|||
|
// this.Multi_SendGoodsImageNum = 9;
|
|||
|
// this.Interval_Circle = 120;
|
|||
|
// this.SendTaskTimes = new string[] { };
|
|||
|
// this._sendTaskTimes = new string[] { "09:00-22:00" };
|
|||
|
// this._autoClearTaskTimes = "23:59";
|
|||
|
|
|||
|
// this.Single_IsSynthCoupon = SwitchType.开启;
|
|||
|
// this.Single_IsQRCodePic = SwitchType.开启;
|
|||
|
// this.Single_ContentCircle = @"[商品标题]
|
|||
|
//领[优惠券金额]元券,券后【[券后价]元】包邮秒杀!
|
|||
|
//【推荐理由】[商品描述]";
|
|||
|
// this.Single_AdditionalComment = @"[商品标题]
|
|||
|
//商品单价:[商品单价]元
|
|||
|
//优惠券金额:[优惠券金额]元
|
|||
|
//券后价:[券后价]元
|
|||
|
//购买地址:[购买地址]
|
|||
|
//淘口令:[淘口令]";
|
|||
|
// this.Single_GoodsQRCodePicDesc = string.Empty;
|
|||
|
// }
|
|||
|
#endregion
|
|||
|
|
|||
|
#region 采集
|
|||
|
/// <summary>
|
|||
|
/// 采集开关
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("01.采集开关"), DefaultValue(SwitchType.开启)
|
|||
|
]
|
|||
|
public SwitchType HDK_Switch { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 采集数据触发数量
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("02.采集触发量"), DefaultValue(10),
|
|||
|
Description(@"当采集开关为开启时,该值为一个采集点,当采集剩余的商品数量少于等于采集触发量,将自动进行采集操作")
|
|||
|
]
|
|||
|
public int HDK_GatherTouchNum { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 采集
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("03.采集导航"), DefaultValue(GatherType.今日爆单榜),
|
|||
|
Description(@"采集导航,设置为自定义条件将会以以下设置条件采集商品")
|
|||
|
]
|
|||
|
public GatherType HDK_GatherType { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 发单条件 - 类目
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("04.类目"), DefaultValue(CategoryType.全部),
|
|||
|
Description(@"筛选类目:全部、女装、男装、内衣、美妆、配饰、鞋品、箱包、儿童、母婴、居家、美食、数码、家电、车品、文体、宠物、其他")
|
|||
|
//,Editor(typeof(CategoryControl), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
]
|
|||
|
public CategoryType HDK_Category { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 发单条件 - 平台
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("05.采集源"), DefaultValue(StageType.不限),
|
|||
|
Description(@"筛选平台:今日上新、高评分、天猫、视频单、聚划算、淘抢购、营销返利、天猫超市")
|
|||
|
]
|
|||
|
public StageType HDK_Stage { get; set; }
|
|||
|
|
|||
|
private double? _HDK_Price1;
|
|||
|
/// <summary>
|
|||
|
/// 发单条件 - 商品最低售价
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("06.商品最低售价"),
|
|||
|
Description(@"采集的产品最低价格,不填写表示不限制最价!")
|
|||
|
]
|
|||
|
public double? HDK_Price1
|
|||
|
{
|
|||
|
get { return _HDK_Price1; }
|
|||
|
set
|
|||
|
{
|
|||
|
if (value != null && 0 > value)
|
|||
|
throw new Exception($"最低售价不能低于0");
|
|||
|
_HDK_Price1 = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private double? _HDK_Price2;
|
|||
|
/// <summary>
|
|||
|
/// 发单条件 - 商品最高售价
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("07.商品最高售价"),
|
|||
|
Description(@"采集的产品最高价格,不填写表示不限制最高价!")
|
|||
|
]
|
|||
|
public double? HDK_Price2
|
|||
|
{
|
|||
|
get { return _HDK_Price2; }
|
|||
|
set
|
|||
|
{
|
|||
|
if (value != null && 0 > value)
|
|||
|
throw new Exception($"最高售价不能低于0");
|
|||
|
_HDK_Price2 = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private double? _HDK_Rate;
|
|||
|
/// <summary>
|
|||
|
/// 发单条件 - 佣金比例
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("08.佣金比例"), DefaultValue(null),
|
|||
|
Description(@"采集的产品佣金比例条件,选中的比例包含选中的值.不填写表示不限制佣金比例!")
|
|||
|
]
|
|||
|
public double? HDK_Rate
|
|||
|
{
|
|||
|
get { return _HDK_Rate; }
|
|||
|
set
|
|||
|
{
|
|||
|
if (value != null && (0 > value || value > 100))
|
|||
|
throw new Exception($"最低佣金比例不能低于0并且不能高于100");
|
|||
|
_HDK_Rate = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private double? _HDK_Brokerage;
|
|||
|
/// <summary>
|
|||
|
/// 发单条件 - 佣金
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("09.佣金"), DefaultValue(null),
|
|||
|
Description(@"采集的产品佣金比例条件,选中的比例包含选中的值.不填写表示不限制佣金比例!")
|
|||
|
]
|
|||
|
public double? HDK_Brokerage
|
|||
|
{
|
|||
|
get { return _HDK_Brokerage; }
|
|||
|
set
|
|||
|
{
|
|||
|
if (value != null && 0 > value)
|
|||
|
throw new Exception($"最低佣金不能低于0");
|
|||
|
_HDK_Brokerage = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private double? _HDK_CouponMoney;
|
|||
|
/// <summary>
|
|||
|
/// 发单条件 - 优惠券面额
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("10.优惠券面额"), DefaultValue(null),
|
|||
|
Description(@"商品对应的优惠券面额大于等于预设的值"),
|
|||
|
Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
]
|
|||
|
public double? HDK_CouponMoney
|
|||
|
{
|
|||
|
get { return _HDK_CouponMoney; }
|
|||
|
set
|
|||
|
{
|
|||
|
if (value != null && 0 > value)
|
|||
|
throw new Exception($"最低优惠券面额不能低于0");
|
|||
|
_HDK_CouponMoney = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private int? _HDK_Sales;
|
|||
|
/// <summary>
|
|||
|
/// 发单条件 - 月销量
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("11.月销量"), DefaultValue(null),
|
|||
|
Description(@"商品月销量大于等于预设的值"),
|
|||
|
Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
]
|
|||
|
public int? HDK_Sales
|
|||
|
{
|
|||
|
get { return _HDK_Sales; }
|
|||
|
set
|
|||
|
{
|
|||
|
if (value != null && 0 > value)
|
|||
|
throw new Exception($"最低月销量不能低于0");
|
|||
|
_HDK_Sales = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private double? _HDK_Avgmin;
|
|||
|
/// <summary>
|
|||
|
/// 发单条件 - 月销量
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("1)、自动采集"), DisplayName("12.单品评分"), DefaultValue(null),
|
|||
|
Description(@"商品单品评分大于等于预设的值,值:0-5"),
|
|||
|
Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
]
|
|||
|
public double? HDK_Avgmin
|
|||
|
{
|
|||
|
get { return _HDK_Avgmin; }
|
|||
|
set
|
|||
|
{
|
|||
|
if (value != null && (0 > value || value > 5))
|
|||
|
throw new Exception($"最低单品评分不能低于0并且不能高于5");
|
|||
|
_HDK_Avgmin = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 朋友圈发单二维码模板
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("2)、朋友圈基础设置"), DisplayName("01.发单二维码模板"), DefaultValue(QrImageType.模板B),
|
|||
|
Description(@"朋友圈发单二维码模板")
|
|||
|
]
|
|||
|
public QrImageType HDK_Model { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 朋友圈发单方式
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("2)、朋友圈基础设置"), DisplayName("02.发单方式"), DefaultValue(SendModeType.多产品),
|
|||
|
Description(@"朋友圈发单方式
|
|||
|
第一种多产品发送,一条朋友圈信息中一个图片包含一个宝贝信息
|
|||
|
第二种单产品发送,一条朋友圈信息中包含多张该宝贝的图片信息")
|
|||
|
]
|
|||
|
public SendModeType HDK_SendMode { get; set; }
|
|||
|
|
|||
|
private string[] _HDK_SendTaskTimes;
|
|||
|
[
|
|||
|
Category("2)、朋友圈基础设置"), DisplayName("03.发送任务时间段"),
|
|||
|
Description(@"每一行为一个发送时间段
|
|||
|
格式:时间1-时间2
|
|||
|
注:时间1 必须大于 时间2")
|
|||
|
]
|
|||
|
public string[] HDK_SendTaskTimes //{ get; set; }
|
|||
|
{
|
|||
|
get { return _HDK_SendTaskTimes; }
|
|||
|
set
|
|||
|
{
|
|||
|
var sendTaskTimes = value as string[];
|
|||
|
if (sendTaskTimes != null && sendTaskTimes.Length != 0)
|
|||
|
{
|
|||
|
for (int i = 0; i < sendTaskTimes.Length; i++)
|
|||
|
{
|
|||
|
var times = sendTaskTimes[i].Trim().Split('-');
|
|||
|
if (times.Length == 2)
|
|||
|
{
|
|||
|
var begin = DateTime.Parse(times[0]);
|
|||
|
var end = DateTime.Parse(times[1]);
|
|||
|
if (begin >= end)
|
|||
|
throw new Exception($"开始时间必须小于结束时间:[{sendTaskTimes[i]}]");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
_HDK_SendTaskTimes = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 朋友圈发送间隔,单位 分
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("2)、朋友圈基础设置"), DisplayName("04.朋友圈发送间隔"), DefaultValue(120),
|
|||
|
Description(@"朋友圈推广商品间隔,单位 分")
|
|||
|
]
|
|||
|
public double HDK_Interval_Circle { get; set; }
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
//#region 发送设置
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 发送商品图片数量
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("3)、多产品发单设置"), DisplayName("01.发送推广图片数量"), DefaultValue(9),
|
|||
|
Description(@"发送朋友圈推广图片数量,最多9张图片")
|
|||
|
]
|
|||
|
public int HDK_Multi_SendGoodsImageNum { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 宝贝描述语
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("3)、多产品发单设置"), DisplayName("02.发送的文字内容"), DefaultValue(@"╭┈┈┈┄┈┈┈┈┈╮
|
|||
|
爆款榜单
|
|||
|
╰┈┈┈┈┈┈┈┈┈╯
|
|||
|
补贴奖励和帮助渠道
|
|||
|
|
|||
|
手机淘宝分享宝贝给我
|
|||
|
可以查询优惠券款下单
|
|||
|
|
|||
|
还有网购红包领哦"),
|
|||
|
Description(@"发送朋友圈时的文本内容"),
|
|||
|
Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
]
|
|||
|
public string HDK_Multi_ContentCircle { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 宝贝描述语
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("3)、多产品发单设置"), DisplayName("03.宝贝描述语"), DefaultValue(@""),
|
|||
|
Description(@"图片中宝贝描述信息,为空时以采集到的数据为准.
|
|||
|
支持变量:[商品标题]、[商品描述]、[已售数量]、[店铺名称]、[优惠券金额]、[优惠券数量]、[商品单价]、[券后价]、[购买地址]"),
|
|||
|
Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
]
|
|||
|
public string HDK_Multi_GoodsDesc { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 朋友圈追加评语 - 多个商品
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("3)、多产品发单设置"), DisplayName("04.朋友圈追加评语"), DefaultValue(@""),
|
|||
|
Description(@"朋友圈商品推广之后,追加评语"),
|
|||
|
Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
]
|
|||
|
public string HDK_Multi_AdditionalComment { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 是否合成宝贝优惠券
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("4)、单产品发单设置"), DisplayName("01.是否合成优惠券"), DefaultValue(SwitchType.开启),
|
|||
|
Description(@"功能开启时,将自动合成优惠券图片")
|
|||
|
]
|
|||
|
public SwitchType HDK_Single_IsSynthCoupon { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 是否合成宝贝二维码图片
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("4)、单产品发单设置"), DisplayName("02.是否合成二维码"), DefaultValue(SwitchType.开启),
|
|||
|
Description(@"功能开启时,将自动将其中一张图片合成二维码图片")
|
|||
|
]
|
|||
|
public SwitchType HDK_Single_IsQRCodePic { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 二维码宝贝描述语
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("4)、单产品发单设置"), DisplayName("03.二维码图片底栏描述语"), DefaultValue(@""),
|
|||
|
Description(@"合成二维码功能开启时,合成二维码图片下方的空白栏内容。可以用于放广告内容"),
|
|||
|
Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
]
|
|||
|
public string HDK_Single_GoodsQRCodePicDesc { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 宝贝描述语
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("4)、单产品发单设置"), DisplayName("04.发送的文字内容"), DefaultValue(@"[商品标题]
|
|||
|
领[优惠券金额]元券,券后【[券后价]元】包邮秒杀!
|
|||
|
【推荐理由】[商品描述]"),
|
|||
|
Description(@"发送朋友圈时的文本内容
|
|||
|
支持变量:[商品标题]、[商品单价]、[优惠券金额]、[券后价]、[商品描述]、[已售数量]、[店铺名称]、[购买地址]、[淘口令]"),
|
|||
|
Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
]
|
|||
|
public string HDK_Single_ContentCircle { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 朋友圈追加评语 - 单个商品
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("4)、单产品发单设置"), DisplayName("05.朋友圈追加评语"), DefaultValue(@"[商品标题]
|
|||
|
商品单价:[商品单价]元
|
|||
|
优惠券金额:[优惠券金额]元
|
|||
|
券后价:[券后价]元
|
|||
|
购买地址:[购买地址]
|
|||
|
淘口令:[淘口令]"),
|
|||
|
Description(@"朋友圈商品推广之后,追加评语
|
|||
|
支持变量:[商品标题]、[已售数量]、[店铺名称]、[优惠券金额]、[优惠券数量]、[商品单价]、[券后价]、[购买地址]、[淘口令]"),
|
|||
|
Editor(typeof(PropertyGridRichText), typeof(System.Drawing.Design.UITypeEditor))
|
|||
|
]
|
|||
|
public string HDK_Single_AdditionalComment { get; set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 自动清理
|
|||
|
/// </summary>
|
|||
|
[
|
|||
|
Category("5)、定时清理"), DisplayName("01.定时清理"), DefaultValue(SwitchType.开启),
|
|||
|
Description(@"功能开启时,将在设置的时间进行采集数据的清空操作")
|
|||
|
]
|
|||
|
public SwitchType HDK_Auto_IsClear { get; set; }
|
|||
|
|
|||
|
private string _HDK_AutoClearTaskTimes;
|
|||
|
[
|
|||
|
Category("5)、定时清理"), DisplayName("02.定时清理时间"), DefaultValue("23:59"),
|
|||
|
Description(@"定时清理时间
|
|||
|
格式:HH:mm
|
|||
|
例:23:59
|
|||
|
注:时间为24小时制")
|
|||
|
]
|
|||
|
public string HDK_AutoClearTaskTimes
|
|||
|
{
|
|||
|
get { return _HDK_AutoClearTaskTimes; }
|
|||
|
set
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
var time = value as string;
|
|||
|
var _time = DateTime.Parse(time);
|
|||
|
}
|
|||
|
catch (Exception)
|
|||
|
{
|
|||
|
throw new Exception($"时间格式不正确");
|
|||
|
}
|
|||
|
_HDK_AutoClearTaskTimes = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 记录发送的时间
|
|||
|
/// </summary>
|
|||
|
[Browsable(false)]
|
|||
|
public DateTime HDK_RecordSendTime { get; set; }
|
|||
|
|
|||
|
|
|||
|
public Config()
|
|||
|
{
|
|||
|
this.HDK_Auto_IsClear = SwitchType.开启;
|
|||
|
this.HDK_Switch = SwitchType.开启;
|
|||
|
this.HDK_GatherTouchNum = 10;
|
|||
|
this.HDK_Stage = StageType.不限;
|
|||
|
this.HDK_SendMode = SendModeType.多产品;
|
|||
|
this.HDK_Model = QrImageType.模板B;
|
|||
|
this.HDK_GatherType = GatherType.实时销量榜;
|
|||
|
this.HDK_Price1 = null;
|
|||
|
this.HDK_Price1 = null;
|
|||
|
this.HDK_CouponMoney = null;
|
|||
|
this.HDK_Rate = null;
|
|||
|
this.HDK_Category = CategoryType.全部;
|
|||
|
this.HDK_Sales = null;
|
|||
|
this.HDK_Multi_AdditionalComment = string.Empty;
|
|||
|
this.HDK_Multi_ContentCircle = @"╭┈┈┈┄┈┈┈┈┈╮
|
|||
|
爆款榜单
|
|||
|
╰┈┈┈┈┈┈┈┈┈╯
|
|||
|
补贴奖励和帮助渠道
|
|||
|
|
|||
|
手机淘宝分享宝贝给我
|
|||
|
可以查询优惠券款下单
|
|||
|
|
|||
|
还有网购红包领哦";
|
|||
|
this.HDK_Multi_SendGoodsImageNum = 9;
|
|||
|
this.HDK_Interval_Circle = 120;
|
|||
|
this._HDK_SendTaskTimes = new string[] { "09:00-22:00" };
|
|||
|
this._HDK_AutoClearTaskTimes = "23:59";
|
|||
|
|
|||
|
this.HDK_Single_IsSynthCoupon = SwitchType.开启;
|
|||
|
this.HDK_Single_IsQRCodePic = SwitchType.开启;
|
|||
|
this.HDK_Single_ContentCircle = @"[商品标题]
|
|||
|
领[优惠券金额]元券,券后【[券后价]元】包邮秒杀!
|
|||
|
【推荐理由】[商品描述]";
|
|||
|
this.HDK_Single_AdditionalComment = @"[商品标题]
|
|||
|
商品单价:[商品单价]元
|
|||
|
优惠券金额:[优惠券金额]元
|
|||
|
券后价:[券后价]元
|
|||
|
购买地址:[购买地址]
|
|||
|
淘口令:[淘口令]";
|
|||
|
this.HDK_Single_GoodsQRCodePicDesc = string.Empty;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|