佣金上货逻辑调整
This commit is contained in:
1 parent
381332b7c8
commit
8f5debb85c
5 files changed
+458
-114
No files matched your search
@@ -329,10 +329,10 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
lblSourceType.Visible = true;
|
||||
cmbSourceType.Visible = true;
|
||||
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text))
|
||||
//if (!string.IsNullOrWhiteSpace(cmbSourceType.Text))
|
||||
{
|
||||
//lblGroupFilter.Visible = true;
|
||||
//cmbGroupFilter.Visible = true;
|
||||
lblGroupFilter.Visible = true;
|
||||
cmbGroupFilter.Visible = true;
|
||||
}
|
||||
}
|
||||
if (BaseClass.UserAuthority.ParseToString().Contains("微信回采"))
|
||||
@@ -1604,11 +1604,12 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
fromCommissionRate = BaseRegex.GetStringJson(ref prodCommissionRst, "commission_rate").ParseToNullableInt();
|
||||
if (fromCommissionRate == null)
|
||||
fromCommissionRate = -1;
|
||||
if (prodCommissionRst.Contains("\"data\":[]"))
|
||||
if (prodCommissionRst.Contains("\"data\":[]") || BaseRegex.GetStringJson(ref prodCommissionRst, "mdy_time").ParseToString().ParseToDateTime() < DateTime.Now.AddDays(-30))
|
||||
{
|
||||
var assistantShop = new ShopLoginInfo();
|
||||
assistantShop.Cookies = JsonHelper.SerializeObject(lstWxSaleAssistantCookie);
|
||||
var result = WxGetAssistant.wxGetAssistant(assistantShop, dbProd.spu_id);
|
||||
Thread.Sleep(Randomx.GetId(500, 1500));
|
||||
if (result.Contains("mcn magic invalid"))
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
@@ -3161,6 +3162,11 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
upProdParam.product.info.param.Add(wxPropParam);
|
||||
foreach (var wxEditCategoryParam in wxEditPropParam.categorys)
|
||||
{
|
||||
// 修改书名
|
||||
//if (wxEditPropParam.categorys.FirstOrDefault().name == "书名" && wxEditCategoryParam == wxEditPropParam.categorys.LastOrDefault())
|
||||
//{
|
||||
// wxEditCategoryParam.name = prodTitle;
|
||||
//}
|
||||
var wxCategoryParam = new categoryPropParam()
|
||||
{
|
||||
catType = wxEditCategoryParam.catType,
|
||||
@@ -3313,6 +3319,16 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//书籍属性处理
|
||||
if (upProdParam.product.info.category.FirstOrDefault()?.name == "图书" || prodInfo.detail.cats.FirstOrDefault() == "书籍/杂志/报纸")
|
||||
{
|
||||
// 修改书名 作者
|
||||
//if (attr.name == "书名" /*&& dbProd.product_get_type_text == "微信小店"*/)
|
||||
//{
|
||||
// attrValue = prodTitle;
|
||||
//}
|
||||
//if (attr.name == "作者" && attrValue == "无")
|
||||
//{
|
||||
// attrValue = new List<string>() { "赵老师", "钱老师", "孙老师", "李老师", "周老师", "吴老师", "郑老师", "王老师", "张老师", "孙老师", "刘老师" }.OrderBy(x => Guid.NewGuid()).FirstOrDefault();
|
||||
//}
|
||||
|
||||
if (attrValue.IsNullOrEmpty() && attr.type == "integer_unit" && (propInfo.values.FirstOrDefault()?.value).IsNumber())
|
||||
{
|
||||
attrValue = propInfo.values.FirstOrDefault()?.value + " " + attr.value.Split(';').FirstOrDefault();
|
||||
@@ -3587,7 +3603,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
if (attr.name == "出版社名称")
|
||||
attrValue = new List<string>() { "技术出版社", "文化出版社", "美术出版社" }[Randomx.GetId(3)];
|
||||
if (attr.name == "作者")
|
||||
attrValue = new List<string>() { "李老师", "张老师", "王老师" }[Randomx.GetId(3)];
|
||||
attrValue = new List<string>() { "赵老师", "钱老师", "孙老师", "李老师", "周老师", "吴老师", "郑老师", "王老师", "张老师", "孙老师", "刘老师" }.OrderBy(x => Guid.NewGuid()).FirstOrDefault();
|
||||
if (attr.name == "包装")
|
||||
attrValue = "平装";
|
||||
if (attr.name == "出版时间")
|
||||
@@ -4144,7 +4160,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
}
|
||||
// 微信店采直接复制
|
||||
else if (dbProd.product_get_type_text == "微信店采")
|
||||
else if (dbProd.product_get_type_text == "微信店采") //&& upProdParam.product.info.category.FirstOrDefault()?.name != "图书")
|
||||
{
|
||||
upProdParam.product.info.qualificationList.Clear();
|
||||
if (wxEditProdInfo.product?.info?.qualificationList?.Count > 0)
|
||||
@@ -4181,9 +4197,10 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}));
|
||||
}
|
||||
|
||||
string publisher = "出版社:" + new List<string>() { "技术出版社", "文化出版社", "美术出版社" }[Randomx.GetId(3)];
|
||||
string publisher = "出版社名称:" + new List<string>() { "技术出版社", "文化出版社", "美术出版社" }[Randomx.GetId(3)];
|
||||
string isbn = "ISBN:";
|
||||
string bookName = "书名:";
|
||||
//string bookName = "图书名称:";
|
||||
string bookPrice = "定价:" + upProdParam.product.productSkus.Max(s => s.productSkuInfo.salePrice) * 0.01;
|
||||
string author = "作者:王老师";
|
||||
string publishTime = "出版时间:" + DateTime.Now.AddMonths(-3).ToString("yyyy年MM月dd日");
|
||||
@@ -4193,10 +4210,11 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
foreach (var propParam in upProdParam.product.info.param)
|
||||
{
|
||||
if (propParam.categorys[0].name.Contains("出版社名称"))
|
||||
publisher = "出版社:" + propParam.categorys[1].name;
|
||||
publisher = "出版社名称:" + propParam.categorys[1].name;
|
||||
else if (propParam.categorys[0].name.Contains("ISBN版号/CN刊号"))
|
||||
isbn = "ISBN:" + propParam.categorys[1].name;
|
||||
else if (propParam.categorys[0].name.Contains("书名"))
|
||||
//bookName = "图书名称:" + propParam.categorys[1].name;
|
||||
bookName = "书名:" + propParam.categorys[1].name;
|
||||
else if (propParam.categorys[0].name.Contains("定价"))
|
||||
{
|
||||
@@ -4228,6 +4246,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
g.Clear(Color.White);
|
||||
//Font font = new Font("宋体", 15, FontStyle.Bold);
|
||||
Font font = new Font("微软雅黑", 15, FontStyle.Regular);
|
||||
//Font font = new Font("微软雅黑", 16, FontStyle.Regular);
|
||||
//Font font = new Font("宋体", 17, FontStyle.Bold);
|
||||
Brush textBrush = Brushes.Black;
|
||||
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
RectangleF rectF = new RectangleF(80, 80, 800 - 80, 800 - 80);
|
||||
|
||||
Reference in new issue
Block a user