子账户显示昵称 客服加入批量登录 客服登录后页面不刷新问题修复

This commit is contained in:
wule committed 2026-03-21 13:49:01 +08:00
1 parent b502c6a2ed
commit 8e919b0bd7
22 files changed
+869 -217

No files matched your search

@@ -1358,6 +1358,16 @@ namespace TemuKJD.WXForms.ProductForms
}
#endregion
#region 1688格式转换
if (dbProd.product_get_type_text == "1688厂家")
{
string convertRst = "";
var ob = new PDDProdFormConverter()._1688ClientToPddConvert(out convertRst, dbProd);
if (!string.IsNullOrEmpty(convertRst))
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品查询错误 " + convertRst + "\"}";
}
#endregion
#region 将产品数据初始化成微信小店支持的参数
JObject prodJObj = new JObject();
try
@@ -3692,7 +3702,8 @@ namespace TemuKJD.WXForms.ProductForms
var error = BaseRegex.GetStringJson(ref uploadDraftRst, "msg");
if (string.IsNullOrEmpty(error))
error = uploadDraftRst;
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"草稿保存失败 " + error + "\"}";
var draftId = BaseRegex.GetStringJson(ref uploadDraftRst, "productId").ParseToLong();
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"草稿保存失败 " + GetHtml.UrlEncodeUtf8(error) + "\"}";
}
if (cell != null)
{
+36 -33
View File
@@ -32,13 +32,13 @@ namespace TemuKJD.WXForms.ProductForms
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.label5 = new System.Windows.Forms.Label();
@@ -640,19 +640,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle15.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle15;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle16;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -670,6 +670,7 @@ namespace TemuKJD.WXForms.ProductForms
this.colMessage});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.MultiSelectCheckBox = false;
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 25;
@@ -790,19 +791,19 @@ namespace TemuKJD.WXForms.ProductForms
//
this.dgvTalent.AllowUserToAddRows = false;
this.dgvTalent.AllowUserToDeleteRows = false;
dataGridViewCellStyle17.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvTalent.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle17;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvTalent.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvTalent.AutoRowNumber = true;
this.dgvTalent.BackgroundColor = System.Drawing.Color.White;
this.dgvTalent.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvTalent.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle18;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvTalent.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dgvTalent.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvTalent.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -825,6 +826,7 @@ namespace TemuKJD.WXForms.ProductForms
this.colOpResult});
this.dgvTalent.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvTalent.Location = new System.Drawing.Point(0, 0);
this.dgvTalent.MultiSelectCheckBox = true;
this.dgvTalent.Name = "dgvTalent";
this.dgvTalent.ReadOnly = true;
this.dgvTalent.RowTemplate.Height = 23;
@@ -851,8 +853,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colSupplierName
//
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle19;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
this.colSupplierName.Frozen = true;
this.colSupplierName.HeaderText = "店铺名称";
this.colSupplierName.Name = "colSupplierName";
@@ -900,8 +902,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colNickname
//
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colNickname.DefaultCellStyle = dataGridViewCellStyle20;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colNickname.DefaultCellStyle = dataGridViewCellStyle6;
this.colNickname.HeaderText = "达人昵称";
this.colNickname.Name = "colNickname";
this.colNickname.ReadOnly = true;
@@ -914,8 +916,8 @@ namespace TemuKJD.WXForms.ProductForms
//
// colCatScore
//
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colCatScore.DefaultCellStyle = dataGridViewCellStyle21;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colCatScore.DefaultCellStyle = dataGridViewCellStyle7;
this.colCatScore.HeaderText = "类目/评分";
this.colCatScore.Name = "colCatScore";
this.colCatScore.ReadOnly = true;
@@ -1099,6 +1101,7 @@ namespace TemuKJD.WXForms.ProductForms
this.chkReUse.TabIndex = 865;
this.chkReUse.Text = "多店复用达人搜索结果";
this.chkReUse.UseVisualStyleBackColor = true;
this.chkReUse.Visible = false;
//
// btnStop2
//
@@ -44,7 +44,7 @@ namespace TemuKJD.WXForms.ProductForms
public ConcurrentList<AuthInfo> lstShopAuthInfo = new ConcurrentList<AuthInfo>();
public ConcurrentList<WXShopTokenInfo> lstWXShopTokenInfo = new ConcurrentList<WXShopTokenInfo>();
public Dictionary<string, bool> dicCheckedShopId = new Dictionary<string, bool>();
//public Dictionary<string, bool> dicCheckedShopId = new Dictionary<string, bool>();
public Dictionary<string, WxShopUploadInfo> dicShopUpload = new Dictionary<string, WxShopUploadInfo>();
WXAddFinderParam wxAddFinderParam = new WXAddFinderParam();
@@ -78,9 +78,9 @@ namespace TemuKJD.WXForms.ProductForms
lstWXShopTokenInfo = new ConcurrentList<WXShopTokenInfo>();
// 选中信息
dicCheckedShopId = NaiBa.Util.Helper.ConfigHelper.LoadConfig<Dictionary<string, bool>>("wx_checked_shop_dic");
if (dicCheckedShopId == null)
dicCheckedShopId = new Dictionary<string, bool>();
//dicCheckedShopId = NaiBa.Util.Helper.ConfigHelper.LoadConfig<Dictionary<string, bool>>("wx_checked_shop_dic");
//if (dicCheckedShopId == null)
// dicCheckedShopId = new Dictionary<string, bool>();
// 上货信息
dicShopUpload = NaiBa.Util.Helper.ConfigHelper.LoadConfig<Dictionary<string, WxShopUploadInfo>>("wx_shop_upload_info");
@@ -298,11 +298,11 @@ namespace TemuKJD.WXForms.ProductForms
}
}
foreach (var r in dgvShop.Rows.Cast<DataGridViewRow>())
{
dicCheckedShopId[r.Cells["colShopId"].Value.ParseToString()] = r.Cells["colSelect"].Value.ParseToBool();
}
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_checked_shop_dic", dicCheckedShopId);
//foreach (var r in dgvShop.Rows.Cast<DataGridViewRow>())
//{
// dicCheckedShopId[r.Cells["colShopId"].Value.ParseToString()] = r.Cells["colSelect"].Value.ParseToBool();
//}
//NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_checked_shop_dic", dicCheckedShopId);
}
private void btnRefreshShop_Click(object sender, EventArgs e)
@@ -344,6 +344,7 @@ namespace TemuKJD.WXForms.ProductForms
{
cmbFilterShopNotes.Items.Add(note);
}
pbLoadingShop.Visible = false;
}
private void BindShop(ShopLoginInfo shopEntity, List<string> selectShopId = null, string msg = "")
@@ -360,7 +361,7 @@ namespace TemuKJD.WXForms.ProductForms
if (row == null)
{
this.dgvShop.Rows.Add(
dicCheckedShopId.Keys.Contains(shopEntity.ShopId) && dicCheckedShopId[shopEntity.ShopId] == true,
dgvShop.Rows.Count == 0 ? true : (selectShopId.Contains(shopEntity.ShopId) && canUse),
shopEntity.LoginName,
shopEntity.ShopId,
shopEntity.ShopAccount,
@@ -427,6 +428,14 @@ namespace TemuKJD.WXForms.ProductForms
string shopAccount = dgvShop.Rows[e.RowIndex].Cells["colShopName"].Value.ToString();
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId.ToString());
var row = dgvShop.Rows[e.RowIndex];
foreach(DataGridViewRow r in dgvShop.Rows)
{
if (r == row)
continue;
if (r.Cells["colSelect"].Value.ParseToBool() == true)
r.Cells["colSelect"].Value = false;
}
row.Cells["colSelect"].Value = true;
if (currentShop != shop)
{
@@ -458,24 +467,24 @@ namespace TemuKJD.WXForms.ProductForms
switch (columnName)
{
case "colSelect":
//if (row.Cells["colCanUse"].Value.ParseToBool())
{
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged;
if (dgvShop.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
chkSelectAll.Checked = true;
else
chkSelectAll.Checked = false;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
}
//else
////if (row.Cells["colCanUse"].Value.ParseToBool())
//{
// //BaseMsgForm.ShowInfo("店铺未登录!");
//}
// row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
dicCheckedShopId[row.Cells["colShopId"].Value.ParseToString()] = row.Cells["colSelect"].Value.ParseToBool();
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_checked_shop_dic", dicCheckedShopId);
// chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged;
// if (dgvShop.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
// chkSelectAll.Checked = true;
// else
// chkSelectAll.Checked = false;
// chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
//}
////else
////{
//// //BaseMsgForm.ShowInfo("店铺未登录!");
////}
//dicCheckedShopId[row.Cells["colShopId"].Value.ParseToString()] = row.Cells["colSelect"].Value.ParseToBool();
//NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_checked_shop_dic", dicCheckedShopId);
break;
case "colLoginStatus":
{
@@ -574,15 +583,26 @@ namespace TemuKJD.WXForms.ProductForms
private void btnSearchTalent_Click(object sender, EventArgs e)
{
var shopIdLst = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
if (shopIdLst.Count <= 0)
//var shopIdLst = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
// => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
//if (shopIdLst.Count <= 0)
//{
// BaseMsgForm.ShowError("未勾选店铺!");
// return;
//}
if (currentShop == null)
{
BaseMsgForm.ShowError("未勾选店铺!");
BaseMsgForm.ShowError("当前店铺为空!");
return;
}
btnSearchTalent.Enabled = false;
pbLoading.Visible = true;
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
cancellationTokenSource = new CancellationTokenSource();
dgvTalent.Rows.Clear();
Task.Run(() =>
@@ -653,7 +673,9 @@ namespace TemuKJD.WXForms.ProductForms
WXShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() => { BindShop(shop, new List<string>() { shop.ShopId }, "店铺掉线"); }));
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
Invoke(new Action(() => { BindShop(shop, selectIds, "店铺掉线"); }));
}
if (shopRow != null)
@@ -669,13 +691,14 @@ namespace TemuKJD.WXForms.ProductForms
try
{
var talentObj = JsonHelper.JObjectParse(getFinderTalentRst)["list"];
lstWXFinderTalentInfo = JsonHelper.DeserializeJsonToList<WXFinderTalentInfo>(JsonHelper.SerializeObject(talentObj));
var wxFinderTalentInfo = JsonHelper.DeserializeJsonToList<WXFinderTalentInfo>(JsonHelper.SerializeObject(talentObj));
if (page == 1 || 1 == 1)
{
var totalNum = BaseRegex.GetIntJson(ref getFinderTalentRst, "totalNum");
totalPage = Math.Ceiling(1m * totalNum / pageSize).ParseToInt();
}
foreach (var finderTalent in lstWXFinderTalentInfo)
lstWXFinderTalentInfo.AddRange(wxFinderTalentInfo);
foreach (var finderTalent in wxFinderTalentInfo)
{
Invoke(new Action(() =>
{
@@ -918,9 +941,9 @@ namespace TemuKJD.WXForms.ProductForms
BaseMsgForm.ShowError("联系人不能为空");
return;
}
if (wxAddFinderParam.WxNumber.IsNullOrEmpty() || !wxAddFinderParam.WxNumber.StartsWith("wx") || wxAddFinderParam.WxNumber.Length < 6)
if (wxAddFinderParam.WxNumber.IsNullOrEmpty() || wxAddFinderParam.WxNumber.Length < 6)
{
BaseMsgForm.ShowError("请确定微信号不为空,且必须以wx开头,最少六个字符");
BaseMsgForm.ShowError("请确定微信号不为空,最少六个字符");
return;
}
if (wxAddFinderParam.Mobile.IsNullOrEmpty() || wxAddFinderParam.Mobile.ParseToLong().ToString().Length != 11)
@@ -942,6 +965,15 @@ namespace TemuKJD.WXForms.ProductForms
pbLoading.Visible = true;
string prodIds = txtProductIds.Text.Trim();
this.btnAddFinder.Enabled = false;
Task.Run(() => {
Thread.Sleep(5000);
Invoke(new Action(() => { this.btnAddFinder.Enabled = true; }));
});
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
if (string.IsNullOrEmpty(prodIds))
@@ -984,13 +1016,16 @@ namespace TemuKJD.WXForms.ProductForms
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "达人邀约 第 " + num + " 条,共 " + selectRows.Count + " 条";
row.Cells["colOpResult"].Value = "";
}));
if (this.cancellationTokenSource.IsCancellationRequested)
break;
var shopId = selectRows.FirstOrDefault().Cells["colSupplierId"].Value.ParseToString();
var shopId = row.Cells["colSupplierId"].Value.ParseToString();
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (chkReUse.Visible && chkReUse.Checked)
shop = currentShop;
var talentAppid = selectRows.FirstOrDefault().Cells["colTalentAppid"].Value.ParseToString();
var talentAppid = row.Cells["colTalentAppid"].Value.ParseToString();
var talent = this.lstWXFinderTalentInfo.FirstOrDefault(t => t.talentAppid == talentAppid);
if (shop!=null && talent != null)
@@ -998,7 +1033,8 @@ namespace TemuKJD.WXForms.ProductForms
List<string> prodIdLst = prodIds.Split(new string[] { ",", ",", ";", ";", " " }, StringSplitOptions.RemoveEmptyEntries).ToList();
var finderUsername = talent.accountList.FirstOrDefault(a => !a.finderUsername.IsNullOrEmpty())?.finderUsername;
var promotionInvitationRst = WXFinderSquareBLL.createPromotionInvitation(shop, prodIdLst, finderUsername, talent.talentAppid,
wxAddFinderParam.ContactPerson, wxAddFinderParam.WxNumber, wxAddFinderParam.Mobile, wxAddFinderParam.Explain);
wxAddFinderParam.ContactPerson, wxAddFinderParam.WxNumber, wxAddFinderParam.Mobile,
wxAddFinderParam.Explain.Replace("\r", "").Replace("\n", ""));
Thread.Sleep(Randomx.GetId(3000, 5000));
if (!promotionInvitationRst.ParseToString().Contains("\"code\":0"))
@@ -1009,7 +1045,9 @@ namespace TemuKJD.WXForms.ProductForms
if (promotionInvitationRst.ParseToString().Contains("biz magic invalid"))
{
shop.LoginStatus = "未登录";
Invoke(new Action(() => { BindShop(shop, new List<string>() { shop.ShopId }, "店铺掉线"); }));
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(r
=> r.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
Invoke(new Action(() => { BindShop(shop, selectIds, "店铺掉线"); }));
error = "店铺掉线";
}
Invoke(new Action(() =>
@@ -1035,7 +1073,7 @@ namespace TemuKJD.WXForms.ProductForms
this.statusBar.lblTaskStatus.Text += "达人邀约操作结束";
BaseMsgForm.ShowInfo("达人邀约操作结束");
}));
});
}, cancellationTokenSource.Token);
}
public string GetFinderProdList(ShopLoginInfo shop, WXFinderTalentInfo finderTalent)
@@ -1067,7 +1105,9 @@ namespace TemuKJD.WXForms.ProductForms
if (getFinderProdRst.Contains("biz magic invalid"))
{
shop.LoginStatus = "未登录";
Invoke(new Action(() => { BindShop(shop, new List<string>() { shop.ShopId }, "店铺掉线"); }));
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(r
=> r.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
Invoke(new Action(() => { BindShop(shop, selectIds, "店铺掉线"); }));
return "{\"success\":false,\"msg\":\"查询达人商品列表失败,店铺掉线\"}";
}
var error = BaseRegex.GetStringJson(ref getFinderProdRst, "msg");
@@ -1118,7 +1158,9 @@ namespace TemuKJD.WXForms.ProductForms
if (getProdRst.Contains("biz magic invalid"))
{
shop.LoginStatus = "未登录";
Invoke(new Action(() => { BindShop(shop, new List<string>() { shop.ShopId }, "店铺掉线"); }));
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(r
=> r.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
Invoke(new Action(() => { BindShop(shop, selectIds, "店铺掉线"); }));
return "{\"success\":false,\"msg\":\"查询达人商品列表2失败,店铺掉线\"}";
}
var error = BaseRegex.GetStringJson(ref getProdRst, "msg");