gx
This commit is contained in:
1 parent
085f275620
commit
256a0c24f9
11 files changed
+198
-147
No files matched your search
@@ -36,8 +36,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 Store.Product.Models.PublishParameters;
|
||||
//using Store.Product.Publish.Steps;
|
||||
using Work.Services;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
|
||||
public bool IsWxNotUseSoftwareDefaultAddressOnce { get; set; } = false;
|
||||
|
||||
public WXPublishParameters PublishParameters { get; set; } = new WXPublishParameters();
|
||||
//public WXPublishParameters PublishParameters { get; set; } = new WXPublishParameters();
|
||||
|
||||
ConcurrentList<AddPriceRule> lstAddPriceRule = new ConcurrentList<AddPriceRule>();
|
||||
|
||||
@@ -1064,97 +1064,97 @@ 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),
|
||||
//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,
|
||||
// // 原 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,
|
||||
// // 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()
|
||||
};
|
||||
// // 加价规则与商品价格/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(() =>
|
||||
{
|
||||
@@ -1327,7 +1327,6 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
this.pbLoading.Visible = false;
|
||||
}));
|
||||
GlobalConfig.ShopLoginList
|
||||
Task.Run(() =>
|
||||
{
|
||||
DateTime startTime = DateTime.Now;
|
||||
|
||||
Reference in new issue
Block a user