gx
This commit is contained in:
1 parent
0a3e5af6a9
commit
c2dcedd238
59 files changed
+2053
-1274
No files matched your search
@@ -35,6 +35,8 @@ using TemuKJD.UserControls;
|
||||
using TemuKJD.WXForms.ShopForms;
|
||||
using Work;
|
||||
using Work.BLL.Tools;
|
||||
using Store.Product.Models.PublishParameters;
|
||||
using Store.Product.Publish.Steps;
|
||||
using Work.Services;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
@@ -49,6 +51,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
|
||||
public bool IsWxNotUseSoftwareDefaultAddressOnce { get; set; } = false;
|
||||
|
||||
public WXPublishParameters PublishParameters { get; set; } = new WXPublishParameters();
|
||||
|
||||
ConcurrentList<AddPriceRule> lstAddPriceRule = new ConcurrentList<AddPriceRule>();
|
||||
|
||||
bool isInit = false;
|
||||
@@ -1059,6 +1063,98 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
void AddProductArr(List<string> shopIdLst)
|
||||
{
|
||||
PublishParameters = new WXPublishParameters
|
||||
{
|
||||
// 复用基类已有参数。
|
||||
TitlePrefix = txtTitleHeadWord.Text.Trim(),
|
||||
StorageType = chkUpDraft.Checked ? ProductStorage.InStock : ProductStorage.OnSale,
|
||||
IsFilterPrice = new SwitchParams<Tuple<int, int>>(
|
||||
!string.IsNullOrWhiteSpace(txtMinPrice.Text) || !string.IsNullOrWhiteSpace(txtMaxPrice.Text),
|
||||
new Tuple<int, int>(
|
||||
string.IsNullOrWhiteSpace(txtMinPrice.Text) ? 0 : txtMinPrice.Text.Trim().ParseToInt(),
|
||||
string.IsNullOrWhiteSpace(txtMaxPrice.Text) ? int.MaxValue : txtMaxPrice.Text.Trim().ParseToInt())),
|
||||
IsFilterCustomTitleKeywors = chkSkipReplaceText.Checked,
|
||||
IsRemoveCustomTitleKeywors = !chkSkipReplaceText.Checked && !string.IsNullOrWhiteSpace(txtReplaceText.Text),
|
||||
|
||||
// 原 WXUploadRule 对应参数。
|
||||
PreSaleDays = txtPreDays.Text.Trim().ParseToInt(),
|
||||
FilterWords = txtReplaceText.Text.Trim(),
|
||||
IsSkipHasFilterWordsProd = chkSkipReplaceText.Checked,
|
||||
SkuMinPrice = string.IsNullOrWhiteSpace(txtMinPrice.Text) ? 0 : txtMinPrice.Text.Trim().ParseToInt(),
|
||||
SkuMaxPrice = string.IsNullOrWhiteSpace(txtMaxPrice.Text) ? int.MaxValue : txtMaxPrice.Text.Trim().ParseToInt(),
|
||||
WaitSeconds = txtWaitSeconds.Text.Trim().ParseToInt(),
|
||||
OnlyHighestPriceSku = chkHighestPriceSku.Checked,
|
||||
OnlyLowestPriceSku = chkLowestPriceSku.Checked,
|
||||
SameSpecSamePriceUp = chkSameSpecPriceUp.Checked,
|
||||
SameSpecSamePriceDown = chkSameSpecPriceDown.Checked,
|
||||
SkipUploaded = chkSkipUploaded.Checked,
|
||||
SkipExisting = chkSkipUploaded.Checked,
|
||||
UpDraft = chkUpDraft.Checked,
|
||||
IsPreSale = chkPreSale.Checked,
|
||||
TitleHeadWords = txtTitleHeadWord.Text.Trim(),
|
||||
IsSaveBound = chkSaveBound.Checked,
|
||||
FilterBoundMinSave = txtFilterBoundMin.Text.Trim().ParseToInt(),
|
||||
FilterBoundMaxSave = txtFilterBoundMax.Text.Trim().ParseToInt(),
|
||||
IsAiShortTitle = chkAiShortTitle.Checked,
|
||||
IsUseWXComplateProd = chkUseWXComplateProd.Checked,
|
||||
IsUseShanghaiReturnOrderAddress = chkUseShanghaiReturnOrderAddress.Checked,
|
||||
|
||||
// UploadProduct 内直接读取的窗体参数。
|
||||
IsFissionTitle = chkFissionGoodsName.Checked,
|
||||
FissionTitles = txtFissionTitle.Text,
|
||||
IsRemoveSpecialChar = chkRemoveSpecialChar.Checked,
|
||||
IsCommissionUpload = chkCommission.Checked,
|
||||
IsCommissionIncrease = cmbCommissionAddOrReduce.Text == "增加",
|
||||
CommissionMinPercent = txtMinUpCommission.Text.Trim().ParseToInt(),
|
||||
CommissionMaxPercent = txtMaxUpCommission.Text.Trim().ParseToInt(),
|
||||
CommissionChangePercent = txtCommissionChangeValue.Text.Trim().ParseToInt(),
|
||||
IsUseRecommendation = chkUseRecommand.Checked,
|
||||
IsImageRandomBlock = chkImgRandomBlock.Checked,
|
||||
IsRandomMainImageOrder = chkRandomMainImgOrder.Checked,
|
||||
IsRandomDetailImageOrder = chkRandomDetailImgOrder.Checked,
|
||||
IsFissionRandomPriceChange = chkFissionRandomPriceChange.Checked,
|
||||
FissionRandomPriceChangeValue = txtFissionRandomPriceChange.Text.Trim().ParseToDecimal(),
|
||||
SpecialBrandName = cmbSpBrandName.Text.Trim(),
|
||||
IsAiImage = chkAiImage.Checked,
|
||||
AiImageCount = txtAiImgCount.Text.Trim().ParseToInt(),
|
||||
IsDefaultBestBefore = chkDefaultBestBefore.Checked,
|
||||
DefaultBestBeforeDays = txtDefaultBestBefore.Text.Trim().ParseToInt(),
|
||||
IsRandomImageBorder = chkRandomImgBorder.Checked,
|
||||
MainBorderImageCount = txtMainBorderImgCount.Text.Trim().ParseToInt(),
|
||||
DetailBorderImageCount = txtDetailBorderImgCount.Text.Trim().ParseToInt(),
|
||||
IsFreightInsurance = chkFreightInsurance.Checked,
|
||||
IsTestNoAuditUpload = chkTestNoAuditUpload.Checked,
|
||||
IsCheckSubmitSuccess = chkIsSubmitSuccess.Checked,
|
||||
UseSoftwareDefaultAddress = GlobalConfig.GlobalSettings.IsWxUseSoftwareDefaultAddress,
|
||||
IgnoreSoftwareDefaultAddressOnce = IsWxNotUseSoftwareDefaultAddressOnce,
|
||||
|
||||
// 加价规则与商品价格/SKU/图片参数一起迁移。
|
||||
DefaultAddPriceRule = new WXAddPriceRule
|
||||
{
|
||||
MoreThanPrice = defaultAddPriceRule.MoreThanPrice,
|
||||
LessThanPrice = defaultAddPriceRule.LessThanPrice,
|
||||
AddPriceTimes = defaultAddPriceRule.AddPriceTimes,
|
||||
AddMorePrice = defaultAddPriceRule.AddMorePrice,
|
||||
SinglePriceAdd = defaultAddPriceRule.SinglePriceAdd,
|
||||
AddMorePriceFirst = defaultAddPriceRule.AddMorePriceFirst,
|
||||
StockNum = defaultAddPriceRule.StockNum,
|
||||
IsStepAddPrice = defaultAddPriceRule.IsStepAddPrice,
|
||||
ShippingPriceTimes = defaultAddPriceRule.ShippingPriceTimes
|
||||
},
|
||||
AddPriceRules = lstAddPriceRule.Select(rule => new WXAddPriceRule
|
||||
{
|
||||
MoreThanPrice = rule.MoreThanPrice,
|
||||
LessThanPrice = rule.LessThanPrice,
|
||||
AddPriceTimes = rule.AddPriceTimes,
|
||||
AddMorePrice = rule.AddMorePrice,
|
||||
SinglePriceAdd = rule.SinglePriceAdd,
|
||||
AddMorePriceFirst = rule.AddMorePriceFirst,
|
||||
StockNum = rule.StockNum,
|
||||
IsStepAddPrice = rule.IsStepAddPrice,
|
||||
ShippingPriceTimes = rule.ShippingPriceTimes
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
@@ -7838,33 +7934,90 @@ Content-Type: application/octet-stream
|
||||
|
||||
public class WXUploadRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 预售天数(页面限制为 3-45 天)。
|
||||
/// </summary>
|
||||
public int PreSaleDays { get; set; } = 5;
|
||||
|
||||
/// <summary>
|
||||
/// 需要移除的敏感词,多个词使用逗号分隔。
|
||||
/// </summary>
|
||||
public string FilterWords { get; set; } = "顶级,之王,二手,亏本,冲量,白菜价,跳楼价,xx,xxx,最大,最小,低价,降价,成本,赔钱,甩卖,真丝,蚕丝,香云纱,羊绒,羊毛,羊羔绒,羊羔毛,羽绒,皮草";
|
||||
/// <summary>
|
||||
/// 是否跳过标题中包含过滤词的商品。
|
||||
/// </summary>
|
||||
public bool IsSkipHasFilterWordsProd { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 跳过最低售价低于该值的 SKU(单位:元)。
|
||||
/// </summary>
|
||||
public int SkuMinPrice { get; set; } = 10;
|
||||
/// <summary>
|
||||
/// 跳过最高售价高于该值的 SKU(单位:元)。
|
||||
/// </summary>
|
||||
public int SkuMaxPrice { get; set; } = 9999;
|
||||
|
||||
/// <summary>
|
||||
/// 商品上传操作后的额外等待秒数(无论上传成功或失败)。
|
||||
/// </summary>
|
||||
public int WaitSeconds { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// 是否只保留最高价 SKU。
|
||||
/// </summary>
|
||||
public bool OnlyHighestPriceSku { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 是否只保留最低价 SKU。
|
||||
/// </summary>
|
||||
public bool OnlyLowestPriceSku { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 是否启用颜色规格同价(上浮)。
|
||||
/// </summary>
|
||||
public bool SameSpecSamePriceUp { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 是否启用颜色规格同价(下浮)。
|
||||
/// </summary>
|
||||
public bool SameSpecSamePriceDown { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 是否跳过已铺货商品。
|
||||
/// </summary>
|
||||
public bool SkipUploaded { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 是否仅上传草稿,不上架商品。
|
||||
/// </summary>
|
||||
public bool UpDraft { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 是否启用预售天数。
|
||||
/// </summary>
|
||||
public bool IsPreSale { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 添加到商品标题最前面的标题前缀词。
|
||||
/// </summary>
|
||||
public string TitleHeadWords { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 是否记住待传类目保证金的过滤范围。
|
||||
/// </summary>
|
||||
public bool IsSaveBound { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 待传类目保证金过滤范围下限(单位:元)。
|
||||
/// </summary>
|
||||
public int FilterBoundMinSave { get; set; } = 1000;
|
||||
/// <summary>
|
||||
/// 待传类目保证金过滤范围上限(单位:元)。
|
||||
/// </summary>
|
||||
public int FilterBoundMaxSave { get; set; } = 1000;
|
||||
/// <summary>
|
||||
/// 是否使用 AI 优化商品标题。
|
||||
/// </summary>
|
||||
public bool IsAiShortTitle { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 是否使用回采数据。
|
||||
/// </summary>
|
||||
public bool IsUseWXComplateProd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上海仓退货
|
||||
/// 是否使用拍单退货仓地址。
|
||||
/// </summary>
|
||||
public bool IsUseShanghaiReturnOrderAddress { get; set; } = false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user