1修复sku有特殊字符被截断的bug 2优化店铺进店/登录逻辑

This commit is contained in:
wule committed 2025-12-23 10:50:33 +08:00
1 parent 91b1ea7dbc
commit 358bb5490e
21 files changed
+304 -171

No files matched your search

-2
View File
@@ -160,8 +160,6 @@ namespace TemuKJD.BLL
+ "&shop_user_name=" + _shop.UserName;
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在"))
result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在"))
result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200"))
+41 -40
View File
@@ -64,9 +64,6 @@ namespace TemuKJD.KJDForms.AdminForms
this.btnRemainOK = new DevComponents.DotNetBar.PanelEx();
this.lblAddProdRemaining = new System.Windows.Forms.Label();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -97,6 +94,9 @@ namespace TemuKJD.KJDForms.AdminForms
this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -565,43 +565,6 @@ namespace TemuKJD.KJDForms.AdminForms
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
this.dgvShop.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvShop_CellMouseDown);
//
// chkAutoDrag
//
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAutoDrag.AutoSize = true;
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
this.chkAutoDrag.Location = new System.Drawing.Point(597, 0);
this.chkAutoDrag.Name = "chkAutoDrag";
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
this.chkAutoDrag.TabIndex = 3;
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
this.chkAutoDrag.UseVisualStyleBackColor = false;
this.chkAutoDrag.Visible = false;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = false;
this.ucSplitPage1.Location = new System.Drawing.Point(911, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(362, 25);
this.ucSplitPage1.TabIndex = 4;
this.ucSplitPage1.TotalPage = 1;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1273, 25);
this.statusBar.TabIndex = 1;
//
// colSelect
//
this.colSelect.FillWeight = 26F;
@@ -852,6 +815,44 @@ namespace TemuKJD.KJDForms.AdminForms
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
//
// chkAutoDrag
//
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.chkAutoDrag.AutoSize = true;
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
this.chkAutoDrag.Location = new System.Drawing.Point(597, 0);
this.chkAutoDrag.Name = "chkAutoDrag";
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
this.chkAutoDrag.TabIndex = 3;
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
this.chkAutoDrag.UseVisualStyleBackColor = false;
this.chkAutoDrag.Visible = false;
//
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
this.ucSplitPage1.IsShowPageSize = true;
this.ucSplitPage1.Location = new System.Drawing.Point(831, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.PageSize = 50;
this.ucSplitPage1.Size = new System.Drawing.Size(442, 25);
this.ucSplitPage1.TabIndex = 4;
this.ucSplitPage1.TotalPage = 1;
this.ucSplitPage1.Load += new System.EventHandler(this.ucSplitPage1_Load);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1273, 25);
this.statusBar.TabIndex = 1;
//
// AdminShopListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -20,6 +20,7 @@ using TemuKJD.Extension;
using TemuKJD.BaseForms;
using TemuKJD.KJDForms.ShopForms;
using Work;
using NaiBa.Util;
namespace TemuKJD.KJDForms.AdminForms
{
@@ -32,7 +33,7 @@ namespace TemuKJD.KJDForms.AdminForms
set { inst = value; }
}
public static List<ShopLoginInfo> lstAdminShopInfo { get; set; } = new List<ShopLoginInfo>();
public static ConcurrentList<ShopLoginInfo> lstAdminShopInfo { get; set; } = new ConcurrentList<ShopLoginInfo>();
public AdminShopListForm()
{
@@ -101,7 +102,7 @@ namespace TemuKJD.KJDForms.AdminForms
Task.Run(() =>
{
int pageCount;
var list = AdminGetServerShopLst(out pageCount, page);
var list = AdminGetServerShopLst(out pageCount, page, ucSplitPage1.PageSize) ;
lstAdminShopInfo.AddRange(list);
this.ucSplitPage1.TotalPage = pageCount;
@@ -299,8 +300,8 @@ namespace TemuKJD.KJDForms.AdminForms
case "编辑":
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtNotes.ReadOnly = true;
editForm.txtNotes.Enabled = false;
editForm.lblNotes.Visible = false;
editForm.txtNotes.Visible = false;
editForm.SaveCompleteWithDescribe += EditForm_SaveCompleteWithDescribe;
editForm.ShowDialog();
}
@@ -308,10 +309,20 @@ namespace TemuKJD.KJDForms.AdminForms
case "编辑备注":
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtChatAccount.ReadOnly = true;
editForm.txtChatAccount.Enabled = false;
editForm.txtShopPassword.ReadOnly = true;
editForm.txtShopPassword.Enabled = false;
editForm.txtShopPassword.Visible = false;
editForm.lblShopPassword.Visible = false;
editForm.txtChatAccount.ReadOnly = true;
editForm.txtChatAccount.Enabled = false;
editForm.txtChatAccount.Visible = false;
editForm.lblChatAccount.Visible = false;
editForm.lblNotes.Location = editForm.lblShopPassword.Location;
editForm.txtNotes.Location = editForm.txtShopPassword.Location;
editForm.ShowDialog();
if (editForm.HasChange)
{
@@ -1020,5 +1031,10 @@ namespace TemuKJD.KJDForms.AdminForms
{
this.pnlAddProdRemaining.Visible = false;
}
private void ucSplitPage1_Load(object sender, EventArgs e)
{
}
}
}
@@ -561,17 +561,41 @@ namespace TemuKJD.KJDForms.ProductForms
case "状态":
if (IsAdmin)
{
AdminShopLoginForm shopLoginForm = new AdminShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus2 == "国际版在线")
{
AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop);
adminLoginForm.openType = EnumOpenType.manage;
adminLoginForm.WindowState = FormWindowState.Maximized;
adminLoginForm.InitUrl = "https://agentseller.temu.com";
adminLoginForm.Show();
}
else
{
AdminShopLoginForm shopLoginForm = new AdminShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
}
}
else
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
ShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus2 == "国际版在线")
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://agentseller.temu.com";
shopLoginForm.Show();
}
else
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
RefreshShop();
}
}
break;
default:
@@ -198,10 +198,24 @@ namespace TemuKJD.KJDForms.ProductForms
}
break;
case "colLoginStatus":
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
RefreshShop();
{
ShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus2 == "国际版在线")
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://agentseller.temu.com";
shopLoginForm.Show();
}
else
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
RefreshShop();
}
}
break;
}
}
@@ -594,10 +594,22 @@ namespace TemuKJD.KJDForms.ProductForms
}
break;
case "colLoginStatus":
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
RefreshShop();
ShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus2 == "国际版在线")
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://agentseller.temu.com";
shopLoginForm.Show();
}
else
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
RefreshShop();
}
break;
}
}
+16 -5
View File
@@ -214,11 +214,22 @@ namespace TemuKJD.KJDForms.ProductForms
break;
case "colLoginStatus":
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
//shopLoginForm.IsAdsLogin = true;
shopLoginForm.ShowDialog();
RefreshShop();
ShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false);
if (shop.LoginStatus2 == "国际版在线")
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://agentseller.temu.com";
shopLoginForm.Show();
}
else
{
ShopLoginForm shopLoginForm = new ShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
RefreshShop();
}
}
break;
case "colAdsLoginStatus":
@@ -289,7 +289,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
data += "&get_select_count=true";
data += "&select_shop_id=" + shop.ShopId;
}
else if (BaseClass.SaLevel > 0) // 店铺非空管理状态允许查看后台采集和前端采集的所有商品
else if (BaseClass.SaLevel > 0 || IsClientJit) // 店铺非空管理状态允许查看后台采集和前端采集的所有商品
{
data += "&product_get_type=all";
}
@@ -517,8 +517,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
if (IsClientJit)
data += "&is_client_jit=true";
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -292,7 +292,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
Task.Run(() =>
{
int pageCount;
var list = GetSelectProductList(out pageCount, page, ucSplitPage1.PageSize);
decimal seconds;
var list = GetSelectProductList(out pageCount, out seconds, page, ucSplitPage1.PageSize);
lstAdminTemuDBProductSelect.AddRange(list);
this.ucSplitPage1.TotalPage = pageCount;
@@ -357,6 +358,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
Invoke(new Action(() =>
{
this.pbLoading.Visible = false;
if(ClientMode == EnumClientMode.ClientJit)
this.statusBar.lblTaskStatus.Text = "JIT上传查询完毕";
else
this.statusBar.lblTaskStatus.Text = "认领上传查询完毕";
#if DEBUG
this.statusBar.lblTaskStatus.Text += ",耗时:" + seconds;
#endif
}));
});
}
@@ -365,10 +373,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
}
public List<TemuDBProductSelect> GetSelectProductList(out int pageCount, int page = 1, int pageSize = 50)
public List<TemuDBProductSelect> GetSelectProductList(out int pageCount, out decimal seconds, int page = 1, int pageSize = 50)
{
List<TemuDBProductSelect> list = new List<TemuDBProductSelect>();
pageCount = 1;
seconds = 0;
var url = BaseClass.BuildObjString("product/admin_get_user_select_product_list");
if (ClientMode != EnumClientMode.Admin)
@@ -416,6 +425,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
return new List<TemuDBProductSelect>();
}
seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
int count = BaseRegex.GetIntJson(ref html, "count");
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
pageCount = Math.Max(pageCount, 1);
@@ -1025,8 +1035,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
@@ -168,7 +168,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
Task.Run(() =>
{
int pageCount;
var list = GetSelectProductList(out pageCount, page, ucSplitPage1.PageSize);
decimal seconds;
var list = GetSelectProductList(out pageCount, out seconds, page, ucSplitPage1.PageSize);
lstAdminTemuDBProductSelect.AddRange(list);
this.ucSplitPage1.TotalPage = pageCount;
@@ -225,6 +226,10 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
{
ShowDgvImg();
this.pbLoading.Visible = false;
this.statusBar.lblTaskStatus.Text = "库存上传查询完毕";
#if DEBUG
this.statusBar.lblTaskStatus.Text += ",耗时:" + seconds;
#endif
}));
});
}
@@ -283,10 +288,11 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
public List<TemuDBProductSelect> GetSelectProductList(out int pageCount, int page = 1, int pageSize = 50)
public List<TemuDBProductSelect> GetSelectProductList(out int pageCount, out decimal seconds, int page = 1, int pageSize = 50)
{
List<TemuDBProductSelect> list = new List<TemuDBProductSelect>();
pageCount = 1;
seconds = 0;
var url = BaseClass.BuildObjString("product_third/admin_get_user_select_product_list");
if (ClientMode != EnumClientMode.Admin)
@@ -332,6 +338,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
return new List<TemuDBProductSelect>();
}
seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
int count = BaseRegex.GetIntJson(ref html, "count");
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
pageCount = Math.Max(pageCount, 1);
@@ -56,7 +56,7 @@ namespace TemuKJD.KJDForms.ShopForms
/// </summary>
/// <param name="shop"></param>
/// <param name="isBack">后台静默执行</param>
public bool GetReturnPackage(ShopLoginInfo shop, bool isBack = false)
public bool GetReturnPackage(ShopLoginInfo shop, bool isBack = false, DateTime? backStartTime = null, DateTime? backEndTime = null)
{
bool isError = false;
@@ -82,8 +82,12 @@ namespace TemuKJD.KJDForms.ShopForms
if (isBack)
{
endTime = this.dtpEndDate.Value.Date.AddDays(1);
startTime = endTime.AddMonths(-1);
//startTime = endTime.AddMonths(-1);
startTime = endTime.AddDays(-20);
if (backEndTime != null)
backEndTime = backEndTime.Value;
if (backStartTime != null)
startTime = backStartTime.Value;
}
cancellationTokenSource = new CancellationTokenSource();
var t = Task.Run(() =>
+34 -34
View File
@@ -30,18 +30,18 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShopAddEditForm));
this.panel2 = new System.Windows.Forms.Panel();
this.label8 = new System.Windows.Forms.Label();
this.lblNotes = new System.Windows.Forms.Label();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label7 = new System.Windows.Forms.Label();
this.cmbGroup = new System.Windows.Forms.ComboBox();
this.txtBuyAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label6 = new System.Windows.Forms.Label();
this.txtChatAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label4 = new System.Windows.Forms.Label();
this.lblChatAccount = new System.Windows.Forms.Label();
this.txtUploadAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label3 = new System.Windows.Forms.Label();
this.txtShopPassword = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.lblShopPassword = new System.Windows.Forms.Label();
this.txtLoginName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
@@ -52,18 +52,18 @@
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.label8);
this.panel2.Controls.Add(this.lblNotes);
this.panel2.Controls.Add(this.txtNotes);
this.panel2.Controls.Add(this.label7);
this.panel2.Controls.Add(this.cmbGroup);
this.panel2.Controls.Add(this.txtBuyAccount);
this.panel2.Controls.Add(this.label6);
this.panel2.Controls.Add(this.txtChatAccount);
this.panel2.Controls.Add(this.label4);
this.panel2.Controls.Add(this.lblChatAccount);
this.panel2.Controls.Add(this.txtUploadAccount);
this.panel2.Controls.Add(this.label3);
this.panel2.Controls.Add(this.txtShopPassword);
this.panel2.Controls.Add(this.label2);
this.panel2.Controls.Add(this.lblShopPassword);
this.panel2.Controls.Add(this.txtLoginName);
this.panel2.Controls.Add(this.label1);
this.panel2.Controls.Add(this.label5);
@@ -71,18 +71,18 @@
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(295, 285);
this.panel2.Size = new System.Drawing.Size(295, 276);
this.panel2.TabIndex = 1;
this.panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.panel2_Paint);
//
// label8
// lblNotes
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(29, 135);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 17);
this.label8.TabIndex = 386;
this.label8.Text = " 备注";
this.lblNotes.AutoSize = true;
this.lblNotes.Location = new System.Drawing.Point(29, 136);
this.lblNotes.Name = "lblNotes";
this.lblNotes.Size = new System.Drawing.Size(56, 17);
this.lblNotes.TabIndex = 386;
this.lblNotes.Text = " 备注";
//
// txtNotes
//
@@ -124,7 +124,7 @@
"上货",
"数据",
"登录"});
this.cmbGroup.Location = new System.Drawing.Point(91, 257);
this.cmbGroup.Location = new System.Drawing.Point(91, 253);
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Size = new System.Drawing.Size(172, 25);
this.cmbGroup.TabIndex = 383;
@@ -183,14 +183,14 @@
this.txtChatAccount.Click += new System.EventHandler(this.txt_Click);
this.txtChatAccount.TextChanged += new System.EventHandler(this.txtChat_TextChanged);
//
// label4
// lblChatAccount
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(29, 102);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.TabIndex = 379;
this.label4.Text = " 子账户";
this.lblChatAccount.AutoSize = true;
this.lblChatAccount.Location = new System.Drawing.Point(29, 102);
this.lblChatAccount.Name = "lblChatAccount";
this.lblChatAccount.Size = new System.Drawing.Size(56, 17);
this.lblChatAccount.TabIndex = 379;
this.lblChatAccount.Text = " 子账户";
//
// txtUploadAccount
//
@@ -229,14 +229,14 @@
this.txtShopPassword.Size = new System.Drawing.Size(172, 23);
this.txtShopPassword.TabIndex = 338;
//
// label2
// lblShopPassword
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(29, 67);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 337;
this.label2.Text = "登录密码";
this.lblShopPassword.AutoSize = true;
this.lblShopPassword.Location = new System.Drawing.Point(29, 67);
this.lblShopPassword.Name = "lblShopPassword";
this.lblShopPassword.Size = new System.Drawing.Size(56, 17);
this.lblShopPassword.TabIndex = 337;
this.lblShopPassword.Text = "登录密码";
//
// txtLoginName
//
@@ -257,7 +257,7 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(29, 260);
this.label5.Location = new System.Drawing.Point(29, 256);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 377;
@@ -283,7 +283,7 @@
// ShopAddEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(297, 319);
this.ClientSize = new System.Drawing.Size(297, 310);
this.Controls.Add(this.panel2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@@ -302,7 +302,6 @@
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtLoginName;
private UserControls.ButtonEx btnOk;
private System.Windows.Forms.Label label5;
@@ -310,12 +309,13 @@
private System.Windows.Forms.Label label3;
private DevComponents.DotNetBar.Controls.TextBoxX txtBuyAccount;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cmbGroup;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
public System.Windows.Forms.TextBox txtShopPassword;
public DevComponents.DotNetBar.Controls.TextBoxX txtChatAccount;
public DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
public System.Windows.Forms.Label lblNotes;
public System.Windows.Forms.Label lblChatAccount;
public System.Windows.Forms.Label lblShopPassword;
}
}
+16 -8
View File
@@ -49,7 +49,8 @@ namespace TemuKJD.KJDForms.ShopForms
public static void UpdateShop()
{
// 获取本地店铺和服务端店铺。将服务端相关信息与本地店铺合并后暂时存在内存中(不保存敏感信息)。
GlobalConfig.ShopLoginList = new ConcurrentList<ShopLoginInfo>();
//GlobalConfig.ShopLoginList = new ConcurrentList<ShopLoginInfo>();
GlobalConfig.ShopLoginList.Clear();
// 获取服务端店铺
var serverShopList = ShopListForm.GetServerShop();
//var localShopList = NaiBa.Util.Helper.ConfigHelper.LoadConfig<ConcurrentList<ShopLoginInfo>>("dou_shop_login");
@@ -99,8 +100,6 @@ namespace TemuKJD.KJDForms.ShopForms
GlobalConfig.ShopLoginList.Add(localShop);
}
}
GlobalConfig.DouShopLoginOtherUserShopList = new ConcurrentList<ShopLoginInfo>();
GlobalConfig.DouShopLoginOtherUserShopList.AddRange(localShopList.Where(l => !GlobalConfig.ShopLoginList.Any(s => s.LoginName == l.LoginName)));
}
public static List<ShopLoginInfo> GetServerShop()
@@ -612,7 +611,7 @@ namespace TemuKJD.KJDForms.ShopForms
// 先从服务端取最新cookie
var serverCampanys = ShopBLL.AdminGetServerShopLstByIds(campanys.Select(c => c.ShopId).ToList());
var sss = string.Join(",", serverCampanys.Select(s => s.UserName + s.ShopAccount));
var sJoin = string.Join(",", serverCampanys.Select(s => s.UserName + s.ShopAccount));
var serverShop = serverCampanys.FirstOrDefault();
if (shop != null && serverShop != null)
{
@@ -981,8 +980,8 @@ namespace TemuKJD.KJDForms.ShopForms
case "编辑":
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtNotes.ReadOnly = true;
editForm.txtNotes.Enabled = false;
editForm.lblNotes.Visible = false;
editForm.txtNotes.Visible = false;
editForm.SaveCompleteWithDescribe += Sae_SaveComplete;
editForm.ShowDialog();
}
@@ -990,10 +989,19 @@ namespace TemuKJD.KJDForms.ShopForms
case "编辑备注":
{
ShopAddEditForm editForm = new ShopAddEditForm(shop);
editForm.txtChatAccount.ReadOnly = true;
editForm.txtChatAccount.Enabled = false;
editForm.txtShopPassword.ReadOnly = true;
editForm.txtShopPassword.Enabled = false;
editForm.txtShopPassword.Visible = false;
editForm.lblShopPassword.Visible = false;
editForm.txtChatAccount.ReadOnly = true;
editForm.txtChatAccount.Enabled = false;
editForm.txtChatAccount.Visible = false;
editForm.lblChatAccount.Visible = false;
editForm.lblNotes.Location = editForm.lblShopPassword.Location;
editForm.txtNotes.Location = editForm.txtShopPassword.Location;
editForm.ShowDialog();
if (editForm.HasChange)
{
@@ -875,10 +875,18 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
if (jArr.Count() == 0)
return list;
list = JsonHelper.DeserializeJsonToList<TemuDBProductPurchasePriceInfo>(jArr.ToString());
list = JsonHelper.DeserializeJsonToList<TemuDBProductPurchasePriceInfo>(JsonHelper.SerializeObject(jArr));
foreach (var pPrice in list)
{
pPrice.dbSkuPurchasePriceList = JsonHelper.DeserializeJsonToList<TemuDBSkuPurchasePriceInfo>(pPrice.sku_purchase_price_json);
//skc"19938266422",sku"3733016951"
//[{"productSkuId":90853786355,"className":"黑色","productSkuSpecList":null,"priceValue":2974,"purchasePriceValue":1100},{"productSkuId":18684743772,"className":"黑色
try
{
pPrice.dbSkuPurchasePriceList = JsonHelper.DeserializeJsonToList<TemuDBSkuPurchasePriceInfo>(pPrice.sku_purchase_price_json);
}
catch (Exception ex)
{
}
if (pPrice.dbSkuPurchasePriceList == null)
pPrice.dbSkuPurchasePriceList = new List<TemuDBSkuPurchasePriceInfo>();
else
@@ -122,13 +122,13 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
data += "&skc_id=" + purchasePriceItem.skc_id;
data += "&cat_id=" + purchasePriceItem.cat_id;
data += "&cat_name=" + purchasePriceItem.cat_name;
data += "&ext_code=" + purchasePriceItem.ext_code;
data += "&product_name=" + purchasePriceItem.product_name;
data += "&main_img=" + purchasePriceItem.main_img;
data += "&ext_code=" + GetHtml.UrlEncodeUtf8(purchasePriceItem.ext_code);
data += "&product_name=" + GetHtml.UrlEncodeUtf8(purchasePriceItem.product_name);
data += "&main_img=" + GetHtml.UrlEncodeUtf8(purchasePriceItem.main_img);
data += "&discount=" + purchasePriceItem.discount;
data += "&price_text=" + purchasePriceItem.price_text;
data += "&sku_purchase_price_json=" + purchasePriceItem.sku_purchase_price_json;
data += "&notes=" + purchasePriceItem.notes;
data += "&price_text=" + GetHtml.UrlEncodeUtf8(purchasePriceItem.price_text);
data += "&sku_purchase_price_json=" + GetHtml.UrlEncodeUtf8(purchasePriceItem.sku_purchase_price_json);
data += "&notes=" + GetHtml.UrlEncodeUtf8(purchasePriceItem.notes);
var html = GetHtml.PostUtf8(url, data);
//if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
// html = GetHtml.PostUtf8(url, data);
@@ -78,8 +78,6 @@ namespace TemuKJD.PDDForms.ShopForms
GlobalConfig.ShopLoginList.Add(localShop);
}
}
GlobalConfig.DouShopLoginOtherUserShopList = new ConcurrentList<ShopLoginInfo>();
GlobalConfig.DouShopLoginOtherUserShopList.AddRange(localShopList.Where(l => !GlobalConfig.ShopLoginList.Any(s => s.LoginName == l.LoginName)));
}
public static List<ShopLoginInfo> GetServerShop()
+18 -6
View File
@@ -22,6 +22,7 @@ using Work;
using Work.DouyinApiClass;
using AllBase.Model.Param.TemuProductManage;
using TemuKJD.KJDForms.ShopForms;
using TemuKJD.KJDForms.AdminForms;
namespace TemuKJD
{
@@ -84,7 +85,7 @@ namespace TemuKJD
while (!BaseClass.IsLoginSuccess)
Thread.Sleep(200);
KJDForms.ShopForms.ShopListForm.UpdateShop();
ShopListForm.UpdateShop();
IsShopInit = true;
}));
#endregion
@@ -126,8 +127,10 @@ namespace TemuKJD
while (true)
{
#if DEBUG
#else
//Thread.Sleep(20000);
//#if DEBUG
//#else
var url = BaseClass.BuildObjString("user/is_get_return_package");
var data = Work.UserLogin.GetSignaturex();
@@ -135,18 +138,23 @@ namespace TemuKJD
data += "&r2=" + r2;
data += "&c2=" + Work.UserLogin.Encryption(r2);
string rstHtml = GetHtml.PostUtf8(url, data);
var isGet = BaseRegex.GetStringJson(ref rstHtml, "is_get").ParseToBool();
var isGet = BaseRegex.GetStringJson(ref rstHtml, "is_get") != "false";
foreach (var shop in GlobalConfig.ShopLoginList)
//foreach (var shop in AdminShopListForm.lstAdminShopInfo)
{
if (!isGet)
break;
//var index = AdminShopListForm.lstAdminShopInfo.IndexOf(shop);
if (string.IsNullOrEmpty(shop.ShopId))
continue;
if (dicGetReturnPackDate.Keys.Contains(shop.ShopId) && dicGetReturnPackDate[shop.ShopId] == DateTime.Now.ToString("yyyyMMdd")) //今日已获取过
if (dicGetReturnPackDate.Keys.Contains(shop.ShopId) && dicGetReturnPackDate[shop.ShopId] == DateTime.Now.ToString("yyyyMMdd")) //今日已获取过,则只读今日
{
//retrunPackageForm.GetReturnPackage(shop, true, DateTime.Now.Date, DateTime.Now.Date.AddDays(1)); // 后台读取今日退货信息
continue;
}
try
{
@@ -161,11 +169,15 @@ namespace TemuKJD
{
}
}
#endif
//#endif
for (int i = 0; i < 360; i++)
{
Thread.Sleep(10000);
}
for (int i = 0; i < 180; i++)
{
Thread.Sleep(10000);
}
}
});
#endregion