店铺考核提供备注功能 微信带货助手采集功能
This commit is contained in:
1 parent
4fa1fc03ca
commit
119b2f4f3e
64 files changed
+7940
-908
No files matched your search
@@ -296,10 +296,13 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
cmbGroupFilter.Visible = true;
|
||||
lblJstInitSet.Visible = true;
|
||||
cmbJstInitSet.Visible = true;
|
||||
lblHot.Visible = true;
|
||||
cmbHot.Visible = true;
|
||||
}
|
||||
|
||||
if (BaseClass.UserAuthority.ParseToString().Contains("货源选择"))
|
||||
{
|
||||
lblSourceType.Visible = true;
|
||||
cmbSourceType.Visible = true;
|
||||
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text))
|
||||
{
|
||||
@@ -312,7 +315,17 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
chkWXComplateProd.Visible = true;
|
||||
chkUseWXComplateProd.Visible = true;
|
||||
}
|
||||
//#endif
|
||||
if (BaseClass.UserAuthority.ParseToString().Contains("爆款数据"))
|
||||
{
|
||||
lblHot.Visible = true;
|
||||
cmbHot.Visible = true;
|
||||
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text))
|
||||
{
|
||||
lblGroupFilter.Visible = true;
|
||||
cmbGroupFilter.Visible = true;
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
if (BaseClass.SaLevel == 1)
|
||||
{
|
||||
//chkImgRandomBlock.Visible = true;
|
||||
@@ -476,7 +489,11 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
string sourceType = cmbSourceType.Text.Trim();
|
||||
Task.Run(() =>
|
||||
{
|
||||
PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter, sourceType, "", BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin"); // 同时刷新下商品分组
|
||||
// 同时刷新下商品分组
|
||||
string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
|
||||
if (BaseClass.GroupId != 3)
|
||||
addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
|
||||
PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter, sourceType, "", addUserName); // 同时刷新下商品分组
|
||||
GetPddProductCate();
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -506,7 +523,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (cmbSourceType.Text.Trim() != "厂商直采" && cmbSourceType.Text.Trim() != "微信店采")
|
||||
if (cmbSourceType.Text.Trim() != "厂商直采" && cmbSourceType.Text.Trim() != "微信店采" && cmbSourceType.Text.Trim() != "微信小店")
|
||||
{
|
||||
fillPddCate();
|
||||
}
|
||||
@@ -1254,6 +1271,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
data += "&wx_safe_status=安全商品,未校验";
|
||||
if (noBanWx)
|
||||
data += "&ban_wx=0";
|
||||
if (BaseClass.SaLevel > 0 || BaseClass.UserAuthority.Contains("爆款数据"))
|
||||
data += "&special_prod_type=普通商品,书籍,爆款数据";
|
||||
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
@@ -1355,7 +1374,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
#region 跳过已上传商品
|
||||
if (chkSkipUploaded.Checked)
|
||||
{
|
||||
var searchExtCode = "EC1" + dbProd.spu_id + "A";
|
||||
var searchExtCode = dbProd.ext_code;
|
||||
if (searchExtCode.ParseToString().Length < 10)
|
||||
searchExtCode = "EC1" + dbProd.spu_id + "A";
|
||||
if (dbProd.sku_secret_json != null && dbProd.sku_secret_json.Contains("goodsId"))
|
||||
{
|
||||
var sku_secret_json = dbProd.sku_secret_json;
|
||||
@@ -1803,7 +1824,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
#region 设置货号
|
||||
var extCode = dbProd.ext_code.IsNullOrEmpty() ? prodInfo.detail.out_goods_sn : dbProd.ext_code;
|
||||
if (extCode.IsNullOrEmpty() || extCode.Length < 4)
|
||||
if (extCode.IsNullOrEmpty() || extCode.Length <= 10)
|
||||
{
|
||||
//extCode = "EC" + Randomx.GetId(1000).ToString().PadLeft(3, '0') + dbProd.spu_id + "C";
|
||||
extCode = "EC1" + dbProd.spu_id + "A";
|
||||
@@ -2609,8 +2630,24 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
error = expressRst;
|
||||
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"运费模板获取失败 " + error + "\"}";
|
||||
}
|
||||
upProdParam.product.info.expressInfo = new expressInfoParam();
|
||||
upProdParam.product.info.expressInfo.templateId = BaseRegex.GetStringJson(ref expressRst, "templateId");
|
||||
try
|
||||
{
|
||||
var addressArr = JsonHelper.JObjectParse(expressRst)["freightTemplateList"];
|
||||
foreach (var addressObj in addressArr)
|
||||
{
|
||||
if (addressObj["isDefault"].ParseToInt() == 1)
|
||||
{
|
||||
string templateId = addressObj["templateId"].ParseToString();
|
||||
upProdParam.product.info.expressInfo = new expressInfoParam();
|
||||
upProdParam.product.info.expressInfo.templateId = templateId; // BaseRegex.GetStringJson(ref expressRst, "templateId");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"运费模板获取失败 " + ex.Message + "\"}";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 详情图
|
||||
@@ -3064,7 +3101,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
else if (attr.value == "ml")
|
||||
{
|
||||
if ((propInfo.values.FirstOrDefault()?.value).ParseToString().EndsWith(attr.value))
|
||||
attrValue = propInfo.values.FirstOrDefault()?.value;
|
||||
attrValue = propInfo.values.FirstOrDefault()?.value.TrimStart('-', ' ');
|
||||
else
|
||||
attrValue = "100 ml";
|
||||
}
|
||||
@@ -3567,6 +3604,11 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
skuParam.productSkuInfo.salePrice += (shipPrice * defaultAddPriceRule.ShippingPriceTimes).ParseToInt();
|
||||
// sku图
|
||||
skuParam.productSkuInfo.thumbImg = upProdParam.product.info.productSaleAttrs[0].items.FirstOrDefault(a => a.value == skuInfo.spec[0].spec_name)?.imgUrl;
|
||||
if (dbProd.special_prod_type == "爆款数据")
|
||||
{
|
||||
if (!skuInfo.out_sku_sn.StartsWith("BS")) // Best-seller 爆款
|
||||
skuInfo.out_sku_sn = "BS" + skuInfo.out_sku_sn;
|
||||
}
|
||||
skuParam.productSkuInfo.skuCode = skuInfo.out_sku_sn;
|
||||
skuParam.productSkuInfo.outSkuId = skuInfo.out_sku_sn;
|
||||
skuParam.productSkuInfo.out_sku_id = skuInfo.out_sku_sn;
|
||||
@@ -4465,18 +4507,26 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
data = UserLogin.GetSignaturex() +
|
||||
"&page=" + 1 +
|
||||
"&page_size=" + pageSize;
|
||||
data += "&ban_wx=0";
|
||||
if (isNotCount)
|
||||
{
|
||||
data += "&is_not_count=" + true;
|
||||
data += "&prod_count=" + totalProdCount;
|
||||
}
|
||||
data += "&ban_wx=0";
|
||||
|
||||
data += "&in_ext_codes=" + txtExtCodeFilter.Text;
|
||||
data += "&in_spu_ids=" + txtIdFilter.Text;
|
||||
data += "&in_groups=" + cmbGroupFilter.Text;
|
||||
data += "&product_name=" + txtSearchGoodsName.Text.Trim();
|
||||
|
||||
data += "&add_user_name=" + (BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin");
|
||||
// 同时刷新下商品分组
|
||||
string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
|
||||
if (BaseClass.GroupId != 3)
|
||||
addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
|
||||
data += "&add_user_name=" + addUserName;
|
||||
|
||||
// 采集来源判断
|
||||
data += "&product_get_type=" + cmbSourceType.Text.Trim();
|
||||
if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店")
|
||||
data += "&in_cates=" + (cmbCateFilter1.Text == "全部" ? "" : cmbCateFilter1.Text);
|
||||
else
|
||||
@@ -4520,14 +4570,24 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
if (!string.IsNullOrEmpty(cmbCateFilter3.Text) && selectCate3?.Count > 0)
|
||||
data += "&wx_cat_3=" + string.Join(",", selectCate3.Select(c => c.cat_id).ToList());
|
||||
}
|
||||
data += "&product_get_type=" + cmbSourceType.Text.Trim();
|
||||
data += "&wx_safe_status=" + cmbWxSafe.Text.Trim().Replace("安全+未校验", "安全商品,未校验");
|
||||
data += "&is_supplier_prod_ok=" + cmbJstInitSet.Text.Trim();
|
||||
data += "&product_name=" + txtSearchGoodsName.Text.Trim();
|
||||
|
||||
// 爆款数据商品
|
||||
if (!string.IsNullOrWhiteSpace(cmbHot.Text.Trim()))
|
||||
data += "&special_prod_type=" + cmbHot.Text.Replace("普通商品", "普通商品,书籍");
|
||||
else
|
||||
data += "&special_prod_type=普通商品,书籍";
|
||||
|
||||
// 聚水潭商品处理条件校验
|
||||
data += "&is_supplier_prod_ok=" + cmbJstInitSet.Text.Trim();
|
||||
|
||||
// 微信安全商品检测
|
||||
data += "&wx_safe_status=" + cmbWxSafe.Text.Trim().Replace("安全+未校验", "安全商品,未校验");
|
||||
|
||||
// 7天爆款数据
|
||||
if (chkSevenDays.Checked)
|
||||
data += "&add_days_less=21";
|
||||
|
||||
// 回采数据
|
||||
if (chkWXComplateProd.Checked)
|
||||
data += "&has_wx_format=1";
|
||||
}));
|
||||
@@ -4748,6 +4808,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
cmbCateFilter1.Text = "";
|
||||
cmbWxSafe.Text = "安全+未校验";
|
||||
cmbSourceType.Text = "厂商直采";
|
||||
cmbHot.Text = "普通商品";
|
||||
chkSkipQualification.Checked = false;
|
||||
|
||||
int prodCount;
|
||||
@@ -4941,7 +5002,11 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
string sourceType = cmbSourceType.Text.Trim();
|
||||
Task.Run(() =>
|
||||
{
|
||||
PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter, sourceType, "", BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin"); // 同时刷新下商品分组
|
||||
// 同时刷新下商品分组
|
||||
string addUserName = BaseClass.UserAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.UserName) : "admin";
|
||||
if (BaseClass.GroupId != 3)
|
||||
addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
|
||||
PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter, sourceType, "", addUserName); // 同时刷新下商品分组
|
||||
});
|
||||
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text))
|
||||
{
|
||||
@@ -5248,6 +5313,20 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
|
||||
}));
|
||||
}
|
||||
|
||||
private void cmbHot_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cmbHot.Text == "爆款数据")
|
||||
{
|
||||
cmbSourceType.Text = "";
|
||||
cmbJstInitSet.Text = "未设置";
|
||||
}
|
||||
else
|
||||
{
|
||||
cmbSourceType.Text = "厂商直采";
|
||||
cmbJstInitSet.Text = "已设置";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class WXUpload
|
||||
|
||||
Reference in new issue
Block a user