1店铺登录逻辑优化 2备货单查询显示

This commit is contained in:
wule committed 2025-07-01 18:58:51 +08:00
1 parent 89eb9ce9d4
commit 862ad088f5
216 files changed
+3481 -1543

No files matched your search

@@ -3,9 +3,9 @@ using AllBase.Helper;
using AllBase.Model.Param.UploadManage;
using AllBase.Model.Result;
using DevComponents.DotNetBar;
using LittleRabbit.Extension;
using LittleRabbit.LittleRabbitForms.BaseForms;
using LittleRabbit.LittleRabbitForms.ToolForms;
using TemuKJD.Extension;
using TemuKJD.KJDForms.BaseForms;
using TemuKJD.KJDForms.ToolForms;
using NaiBa.Util;
using NaiBa.Util.Extension;
using Newtonsoft.Json;
@@ -29,7 +29,7 @@ using Work.CollectClass;
using Work.DouyinApiClass;
using Work.GoodDetail;
namespace LittleRabbit.LittleRabbitForms.UploadForms
namespace TemuKJD.KJDForms.UploadForms
{
public partial class UploadProductForm : Form
{
@@ -137,10 +137,10 @@ namespace LittleRabbit.LittleRabbitForms.UploadForms
}
public void LoadShops()
{
for (int i = 0; i < GlobalConfig.DouShopLoginList.Count; i++)
for (int i = 0; i < GlobalConfig.ShopLoginList.Count; i++)
{
var shop = GlobalConfig.DouShopLoginList[i];
dgvShop.Rows.Add(false, shop.ShopAccountId, shop.ShopAccount, 0, shop.LoginStatus);
var shop = GlobalConfig.ShopLoginList[i];
dgvShop.Rows.Add(false, shop.ShopId, shop.ShopAccount, 0, shop.LoginStatus);
}
}
public void RefreshIeForm()
@@ -284,7 +284,7 @@ namespace LittleRabbit.LittleRabbitForms.UploadForms
UploadProductBLL.phone = txtPhone.Text;
foreach (var shop in GlobalConfig.DouShopLoginList)
foreach (var shop in GlobalConfig.ShopLoginList)
{
shop.CanUpload = shop.LoginStatus == "登录成功" && shop.ApiAuthStatus == "授权成功";
}
@@ -311,10 +311,10 @@ namespace LittleRabbit.LittleRabbitForms.UploadForms
}
}
List<Thread> ts = new List<Thread>();
for (int i = 0; i < GlobalConfig.DouShopLoginList.Count; i++)
for (int i = 0; i < GlobalConfig.ShopLoginList.Count; i++)
{
var shop = GlobalConfig.DouShopLoginList[i];
if (!UploadProductBLL.ids.Any(id => id == shop.ShopAccountId) || shop.ApiAuthStatus != "授权成功")
var shop = GlobalConfig.ShopLoginList[i];
if (!UploadProductBLL.ids.Any(id => id == shop.ShopId) || shop.ApiAuthStatus != "授权成功")
continue;
if (UploadProductBLL.isMultiUpload)
Threadx.ThreadListWait(ref ts, new Thread(GetMulti), UploadProductBLL.ShopThreadCount, shop);
@@ -418,7 +418,7 @@ namespace LittleRabbit.LittleRabbitForms.UploadForms
if (p?.Message == "提交成功")
{
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colShopName"]?.Value?.ToString() == p.ShopName);
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccount == p.ShopName);
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopAccount == p.ShopName);
if (shop != null && row != null)
{
row.Cells["colUploadCount"].Value = shop.UploadCount;
@@ -585,7 +585,7 @@ namespace LittleRabbit.LittleRabbitForms.UploadForms
//string name = dgvShop.Columns[e.ColumnIndex].HeaderText;
string colId = dgvShop.Columns[e.ColumnIndex].Name;
long shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToLong();
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId.ToString());
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId.ToString());
if (colId == "colSelect")
{
bool canUse = shop?.ApiAuthStatus == "授权成功" && shop?.LoginStatus == "登录成功";
@@ -1185,7 +1185,7 @@ namespace LittleRabbit.LittleRabbitForms.UploadForms
/// </summary>
public long GetBrandList()
{
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccount == "开箱小店");
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopAccount == "开箱小店");
DouyinApi api = new DouyinApi(shop);
api.JsonData = new Dictionary<string, string>();
api.JsonData.Add("product_id", "3522394014194236398");
@@ -1409,7 +1409,7 @@ namespace LittleRabbit.LittleRabbitForms.UploadForms
//修改库存
private void button7_Click(object sender, EventArgs e)
{
var shop = GlobalConfig.DouShopLoginList[0];
var shop = GlobalConfig.ShopLoginList[0];
DouyinApi api = new DouyinApi(shop);
api.JsonData = new Dictionary<string, string>();
api.JsonData.Add("product_id", "3492731930347180135");
@@ -1445,7 +1445,7 @@ namespace LittleRabbit.LittleRabbitForms.UploadForms
//修改价格
private void button8_Click(object sender, EventArgs e)
{
var shop = GlobalConfig.DouShopLoginList[0];
var shop = GlobalConfig.ShopLoginList[0];
DouyinApi api = new DouyinApi(shop);
api.JsonData = new Dictionary<string, string>();
api.JsonData.Add("product_id", "3492731930347180135");
@@ -1820,7 +1820,7 @@ namespace LittleRabbit.LittleRabbitForms.UploadForms
{
var url = "https://fxg.jinritemai.com/ffa/g/size-chart/manage";
var shopName = dgvProduct.Rows[e.RowIndex].Cells["shopNameColumn"].Value.ToString();
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccount == shopName);
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopAccount == shopName);
if (shop != null)
{
var cookieStrArr = shop.Cookies.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
@@ -1939,7 +1939,7 @@ namespace LittleRabbit.LittleRabbitForms.UploadForms
}
private static string HttpPostDataImage(string url, string referer, byte[] file)
{
var shop = GlobalConfig.DouShopLoginList.Where(s => s.LoginStatus == "登录成功").FirstOrDefault();
var shop = GlobalConfig.ShopLoginList.Where(s => s.LoginStatus == "登录成功").FirstOrDefault();
if (shop == null)
return "";
string responseContent = "";