1微信用户采集店铺商品功能 2查询达人带货商品并联系达人功能
This commit is contained in:
1 parent
e1ee91dd03
commit
2759ff0f6d
33 files changed
+2464
-626
No files matched your search
@@ -310,14 +310,6 @@ namespace TemuKJD.ToolForms
|
||||
var dbId = currentProd.id;
|
||||
var rows = dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["col_spu_id"].Value.ParseToString() == prodId).ToList();
|
||||
|
||||
if (chkWithTitle.Checked && !data.Contains(currentProd.product_name))
|
||||
{
|
||||
foreach (var row in rows)
|
||||
Invoke(new Action(() => { row.Cells["colOpResult"].Value = "标题不匹配"; }));
|
||||
currentProd = null;
|
||||
return;
|
||||
}
|
||||
|
||||
var titleStr = "";
|
||||
var stringList = data.Split(new string[] { "data:" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach(var str in stringList)
|
||||
@@ -331,7 +323,7 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
|
||||
var titleList = titleStr.Split(new string[] { "\r", "\n", "\\n" }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
for (int i =0; i< titleList.Count; i++)
|
||||
for (int i = 0; i < titleList.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < 500; j++)
|
||||
if (titleList[i].StartsWith("" + j + "."))
|
||||
@@ -341,6 +333,14 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
if (titleList.Count() > 50)
|
||||
{
|
||||
if (chkWithTitle.Checked && !data.Contains(currentProd.product_name))
|
||||
{
|
||||
foreach (var row in rows)
|
||||
Invoke(new Action(() => { row.Cells["colOpResult"].Value = "标题不匹配"; }));
|
||||
currentProd = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (dbId.IsNullOrZero())
|
||||
dbId = 0;
|
||||
var url = BaseClass.BuildPDDObjString("product/mdy_db_product");
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace TemuKJD.ToolForms
|
||||
/// <summary>
|
||||
/// 是否是普通商品采集授权用户
|
||||
/// </summary>
|
||||
public bool IsAuthorityUser { get; set; } = false;
|
||||
public bool IsCollectAuthorityUser { get; set; } = false;
|
||||
|
||||
List<CefSharp.Cookie> lst1688cookie = null;
|
||||
public bool isGetProdLst = false;
|
||||
@@ -67,7 +67,7 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
private void GetJuShuitanProdForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if(IsAuthorityUser)
|
||||
if(IsCollectAuthorityUser)
|
||||
{
|
||||
this.ucTabControlMetro1.TabPages.RemoveAt(2);
|
||||
}
|
||||
@@ -628,7 +628,7 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(500, 1500));
|
||||
if (this.IsAuthorityUser)
|
||||
if (this.IsCollectAuthorityUser)
|
||||
Thread.Sleep(1000);
|
||||
|
||||
// 采集商品详情
|
||||
@@ -864,14 +864,14 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
|
||||
Thread.Sleep(25);
|
||||
if (this.IsAuthorityUser)
|
||||
if (this.IsCollectAuthorityUser)
|
||||
Thread.Sleep(1000);
|
||||
if (row.Index % 20 == 0)
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("1688_product_list_" + MainForm.ProcessCount, lst1688OneProductListInfo);
|
||||
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
if (IsAuthorityUser)
|
||||
if (IsCollectAuthorityUser)
|
||||
collectAuthorityTag = "-" + BaseClass.UserName;
|
||||
|
||||
bool isExist = false;
|
||||
@@ -932,7 +932,7 @@ namespace TemuKJD.ToolForms
|
||||
"&main_img=" + HttpUtility.UrlEncode(dbProd.main_img, Encoding.UTF8) +
|
||||
"&wx_safe_status=" + HttpUtility.UrlEncode("未校验", Encoding.UTF8) +
|
||||
"&product_get_type=" + HttpUtility.UrlEncode("1688厂家", Encoding.UTF8);
|
||||
if (IsAuthorityUser)
|
||||
if (IsCollectAuthorityUser)
|
||||
{
|
||||
data += "&add_user_name=" + BaseClass.UserName;
|
||||
data += "&group=用户" + BaseClass.UserName;
|
||||
@@ -1197,7 +1197,7 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
}
|
||||
|
||||
public static string Out1688ProdImportOne(bool isAuthorityUser, string filePath, string content)
|
||||
public static string Out1688ProdImportOne(bool isCollectAuthorityUser, string filePath, string content)
|
||||
{
|
||||
//DataGridViewRow row = null;
|
||||
//Invoke(new Action(() =>
|
||||
@@ -1226,7 +1226,7 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
if (isAuthorityUser)
|
||||
if (isCollectAuthorityUser)
|
||||
collectAuthorityTag = "-" + BaseClass.UserName;
|
||||
|
||||
bool isExist = false;
|
||||
@@ -1309,7 +1309,7 @@ namespace TemuKJD.ToolForms
|
||||
"&main_img=" + HttpUtility.UrlEncode(prodInfo.detail.image_url, Encoding.UTF8) +
|
||||
"&wx_safe_status=" + HttpUtility.UrlEncode("未校验", Encoding.UTF8) +
|
||||
"&product_get_type=" + HttpUtility.UrlEncode("1688外部数据", Encoding.UTF8);
|
||||
if (isAuthorityUser)
|
||||
if (isCollectAuthorityUser)
|
||||
{
|
||||
data += "&add_user_name=" + BaseClass.UserName;
|
||||
data += "&group=用户" + BaseClass.UserName;
|
||||
|
||||
Reference in new issue
Block a user