1微信店铺切换登录 20% 2过滤筛选备注改为全等于 3数据库数据拉回逻辑优化

This commit is contained in:
wule committed 2026-03-13 16:21:15 +08:00
1 parent dc83334c59
commit 860b4408ef
37 files changed
+2520 -274

No files matched your search

@@ -337,7 +337,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// cmbSpec1
//
this.cmbSpec1.DefaultText = "全部";
this.cmbSpec1.DropDownHeight = 1;
this.cmbSpec1.DropDownWidth = 1;
this.cmbSpec1.FormattingEnabled = true;
this.cmbSpec1.IntegralHeight = false;
this.cmbSpec1.Location = new System.Drawing.Point(3, 3);
this.cmbSpec1.Name = "cmbSpec1";
this.cmbSpec1.Size = new System.Drawing.Size(121, 25);
@@ -347,7 +350,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// cmbSpec2
//
this.cmbSpec2.DefaultText = "全部";
this.cmbSpec2.DropDownHeight = 1;
this.cmbSpec2.DropDownWidth = 1;
this.cmbSpec2.FormattingEnabled = true;
this.cmbSpec2.IntegralHeight = false;
this.cmbSpec2.Location = new System.Drawing.Point(132, 3);
this.cmbSpec2.Margin = new System.Windows.Forms.Padding(5, 3, 3, 3);
this.cmbSpec2.Name = "cmbSpec2";
@@ -687,7 +693,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private DevComponents.DotNetBar.PanelEx btnCancel;
private DevComponents.DotNetBar.PanelEx btnSaveSkuLst;
private UserComponent.DataGridViewEx dgvDbProduct;
private System.Windows.Forms.PictureBox pbLoading;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3;
@@ -721,9 +726,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private System.Windows.Forms.DataGridViewImageColumn colSkuImg;
private System.Windows.Forms.DataGridViewLinkColumn colEditSkuImg;
private System.Windows.Forms.DataGridViewTextBoxColumn colSkuSn;
private DevComponents.DotNetBar.PanelEx btnRestoreAll;
private System.Windows.Forms.Panel pnlCef;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel5;
public DevComponents.DotNetBar.PanelEx btnSaveSkuLst;
public DevComponents.DotNetBar.PanelEx btnRestoreAll;
}
}
@@ -65,13 +65,13 @@
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.btnOk);
this.panel2.Controls.Add(this.pnlSkuOption);
this.panel2.Controls.Add(this.label7);
this.panel2.Controls.Add(this.txtFissionWords);
this.panel2.Controls.Add(this.txtEndWords);
this.panel2.Controls.Add(this.label6);
this.panel2.Controls.Add(this.txtHeadWords);
this.panel2.Controls.Add(this.label5);
this.panel2.Controls.Add(this.btnEditDetail);
this.panel2.Controls.Add(this.txtProductName);
this.panel2.Controls.Add(this.txtSkcId);
this.panel2.Controls.Add(this.txtSpuId);
@@ -83,6 +83,7 @@
this.panel2.Controls.Add(this.pictureBox1);
this.panel2.Controls.Add(this.label8);
this.panel2.Controls.Add(this.txtNotes);
this.panel2.Controls.Add(this.pnlSkuOption);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
@@ -113,7 +114,6 @@
this.pnlSkuOption.Controls.Add(this.pictureBox2);
this.pnlSkuOption.Controls.Add(this.buttonEx1);
this.pnlSkuOption.Controls.Add(this.btnSelect);
this.pnlSkuOption.Controls.Add(this.btnEditDetail);
this.pnlSkuOption.Location = new System.Drawing.Point(10, 483);
this.pnlSkuOption.Name = "pnlSkuOption";
this.pnlSkuOption.Size = new System.Drawing.Size(417, 147);
@@ -134,7 +134,7 @@
this.btnBookImg.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnBookImg.DisabledBackColor = System.Drawing.Color.Empty;
this.btnBookImg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBookImg.Location = new System.Drawing.Point(332, 37);
this.btnBookImg.Location = new System.Drawing.Point(332, 5);
this.btnBookImg.Name = "btnBookImg";
this.btnBookImg.Size = new System.Drawing.Size(85, 26);
this.btnBookImg.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -202,7 +202,7 @@
this.btnEditDetail.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnEditDetail.DisabledBackColor = System.Drawing.Color.Empty;
this.btnEditDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnEditDetail.Location = new System.Drawing.Point(332, 5);
this.btnEditDetail.Location = new System.Drawing.Point(308, 616);
this.btnEditDetail.Name = "btnEditDetail";
this.btnEditDetail.Size = new System.Drawing.Size(85, 26);
this.btnEditDetail.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -16,6 +16,7 @@ using TemuKJD.ToolForms;
using Newtonsoft.Json.Linq;
using System.IO;
using Work.BLL.Tools;
using TemuKJD.BLL;
namespace TemuKJD.PDDForms.ProductSelectForms
{
@@ -59,6 +60,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.pictureBox2.ImageLocation = dbProd.sku_img_replace_url;
else if (!string.IsNullOrWhiteSpace(dbProd.sku_img_replace_base64))
this.pictureBox2.Image = Base64ChangeImgUrl.Base64ToImage(dbProd.sku_img_replace_base64); // Convert.FromBase64String(dbProd.sku_img_replace_base64);
if (dbProd.product_get_type_text == "厂商直采" || dbProd.product_get_type_text == "微信店采")
btnEditDetail.Text = "查看商品SKU";
}
}
@@ -237,7 +241,37 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void btnEditDetail_Click(object sender, EventArgs e)
{
bool canEdit = true;
//{"goodsId":"2032007952082477057","warehouseGoodsId":"171C2881E8C6491CA65728683483EDE9","spuCode":"987651321321","skus":[{"skuId":"2032007952837451777","warehouseSkuId":"6B710CE261B240C38B5245006F3622A3","skuCode":"20190311002"},{"skuId":"2032007953839890434","warehouseSkuId":"2FA14AAB600541CAA72DDE7697D8D27A","skuCode":"201607090622"}]}
if (dbProd.product_get_type_text == "厂商直采")
{
canEdit = false;
string convertRst = "";
var ob = new PDDProdFormConverter().JstPddProdToPddConvert(out convertRst, dbProd);
if (!string.IsNullOrEmpty(convertRst))
{
BaseMsgForm.ShowError("商品结构获取失败 " + convertRst);
return;
}
}
if (dbProd.product_get_type_text == "微信店采")
{
canEdit = false;
string convertRst = "";
var ob = new PDDProdFormConverter().WXProdToPddConvert(out convertRst, dbProd);
if (!string.IsNullOrEmpty(convertRst))
{
BaseMsgForm.ShowError("商品结构获取失败");
return;
}
}
PDDDBProdEditDetailForm editDetailForm = new PDDDBProdEditDetailForm(this.dbProd);
if (!canEdit)
{
editDetailForm.btnRestoreAll.Visible = false;
editDetailForm.btnSaveSkuLst.Visible = false;
}
editDetailForm.ShowDialog();
}
@@ -223,7 +223,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// dtpEnd
//
this.dtpEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.dtpEnd.Location = new System.Drawing.Point(1042, 80);
this.dtpEnd.Location = new System.Drawing.Point(1040, 87);
this.dtpEnd.Name = "dtpEnd";
this.dtpEnd.Size = new System.Drawing.Size(110, 23);
this.dtpEnd.TabIndex = 979;
@@ -231,7 +231,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// dtpStart
//
this.dtpStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.dtpStart.Location = new System.Drawing.Point(926, 80);
this.dtpStart.Location = new System.Drawing.Point(926, 87);
this.dtpStart.Name = "dtpStart";
this.dtpStart.Size = new System.Drawing.Size(110, 23);
this.dtpStart.TabIndex = 978;
@@ -240,7 +240,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.ucCheckBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ucCheckBox1.AutoSize = true;
this.ucCheckBox1.Location = new System.Drawing.Point(856, 82);
this.ucCheckBox1.Location = new System.Drawing.Point(856, 89);
this.ucCheckBox1.Name = "ucCheckBox1";
this.ucCheckBox1.Size = new System.Drawing.Size(75, 21);
this.ucCheckBox1.TabIndex = 977;
@@ -254,9 +254,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnUpdateReturnServerData.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnUpdateReturnServerData.DisabledBackColor = System.Drawing.Color.Empty;
this.btnUpdateReturnServerData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdateReturnServerData.Location = new System.Drawing.Point(759, 79);
this.btnUpdateReturnServerData.Location = new System.Drawing.Point(1040, 62);
this.btnUpdateReturnServerData.Name = "btnUpdateReturnServerData";
this.btnUpdateReturnServerData.Size = new System.Drawing.Size(85, 25);
this.btnUpdateReturnServerData.Size = new System.Drawing.Size(110, 25);
this.btnUpdateReturnServerData.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnUpdateReturnServerData.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnUpdateReturnServerData.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -269,7 +269,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnUpdateReturnServerData.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnUpdateReturnServerData.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnUpdateReturnServerData.TabIndex = 943;
this.btnUpdateReturnServerData.Text = "数据拉回";
this.btnUpdateReturnServerData.Text = "加密数据拉回";
this.btnUpdateReturnServerData.Click += new System.EventHandler(this.updateReturnServerData_Click);
//
// btnReturnSecretData
@@ -279,9 +279,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnReturnSecretData.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnReturnSecretData.DisabledBackColor = System.Drawing.Color.Empty;
this.btnReturnSecretData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReturnSecretData.Location = new System.Drawing.Point(671, 79);
this.btnReturnSecretData.Location = new System.Drawing.Point(926, 62);
this.btnReturnSecretData.Name = "btnReturnSecretData";
this.btnReturnSecretData.Size = new System.Drawing.Size(86, 25);
this.btnReturnSecretData.Size = new System.Drawing.Size(110, 25);
this.btnReturnSecretData.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnReturnSecretData.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnReturnSecretData.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -303,7 +303,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnStopStop.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStopStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStopStop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStopStop.Location = new System.Drawing.Point(672, 13);
this.btnStopStop.Location = new System.Drawing.Point(672, 23);
this.btnStopStop.Name = "btnStopStop";
this.btnStopStop.Size = new System.Drawing.Size(76, 25);
this.btnStopStop.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -329,7 +329,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnPull.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnPull.DisabledBackColor = System.Drawing.Color.Empty;
this.btnPull.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnPull.Location = new System.Drawing.Point(810, 47);
this.btnPull.Location = new System.Drawing.Point(810, 60);
this.btnPull.Name = "btnPull";
this.btnPull.Size = new System.Drawing.Size(34, 25);
this.btnPull.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -354,7 +354,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnPushToOutServer.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnPushToOutServer.DisabledBackColor = System.Drawing.Color.Empty;
this.btnPushToOutServer.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnPushToOutServer.Location = new System.Drawing.Point(750, 47);
this.btnPushToOutServer.Location = new System.Drawing.Point(750, 60);
this.btnPushToOutServer.Name = "btnPushToOutServer";
this.btnPushToOutServer.Size = new System.Drawing.Size(58, 25);
this.btnPushToOutServer.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -379,7 +379,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnGetProdWxCate.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnGetProdWxCate.DisabledBackColor = System.Drawing.Color.Empty;
this.btnGetProdWxCate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnGetProdWxCate.Location = new System.Drawing.Point(750, 13);
this.btnGetProdWxCate.Location = new System.Drawing.Point(750, 23);
this.btnGetProdWxCate.Name = "btnGetProdWxCate";
this.btnGetProdWxCate.Size = new System.Drawing.Size(94, 25);
this.btnGetProdWxCate.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -406,7 +406,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"安全商品",
"违规商品",
"未校验"});
this.cmbSetWxSafe.Location = new System.Drawing.Point(865, 41);
this.cmbSetWxSafe.Location = new System.Drawing.Point(865, 33);
this.cmbSetWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
this.cmbSetWxSafe.Name = "cmbSetWxSafe";
this.cmbSetWxSafe.Size = new System.Drawing.Size(85, 25);
@@ -419,7 +419,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnSetWxSafe.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSetWxSafe.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSetWxSafe.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSetWxSafe.Location = new System.Drawing.Point(952, 41);
this.btnSetWxSafe.Location = new System.Drawing.Point(952, 33);
this.btnSetWxSafe.Name = "btnSetWxSafe";
this.btnSetWxSafe.Size = new System.Drawing.Size(84, 25);
this.btnSetWxSafe.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -444,7 +444,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnImport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnImport.DisabledBackColor = System.Drawing.Color.Empty;
this.btnImport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnImport.Location = new System.Drawing.Point(1058, 41);
this.btnImport.Location = new System.Drawing.Point(1058, 33);
this.btnImport.Name = "btnImport";
this.btnImport.Size = new System.Drawing.Size(84, 25);
this.btnImport.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -724,6 +724,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.cmbSourceType.Items.AddRange(new object[] {
"",
"厂商直采",
"微信店采",
"母店采集",
"机会商品",
"以图搜品",
@@ -1075,7 +1076,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnDelSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnDelSelect.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDelSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDelSelect.Location = new System.Drawing.Point(1058, 7);
this.btnDelSelect.Location = new System.Drawing.Point(1058, 5);
this.btnDelSelect.Name = "btnDelSelect";
this.btnDelSelect.Size = new System.Drawing.Size(84, 25);
this.btnDelSelect.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -1097,7 +1098,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
//
this.cmbGroup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cmbGroup.FormattingEnabled = true;
this.cmbGroup.Location = new System.Drawing.Point(865, 7);
this.cmbGroup.Location = new System.Drawing.Point(865, 5);
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Size = new System.Drawing.Size(85, 25);
this.cmbGroup.TabIndex = 640;
@@ -1109,7 +1110,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnSetGroup.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSetGroup.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSetGroup.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSetGroup.Location = new System.Drawing.Point(952, 7);
this.btnSetGroup.Location = new System.Drawing.Point(952, 5);
this.btnSetGroup.Name = "btnSetGroup";
this.btnSetGroup.Size = new System.Drawing.Size(84, 25);
this.btnSetGroup.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -1144,7 +1145,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.chkPullAfterPush.AutoSize = true;
this.chkPullAfterPush.Checked = true;
this.chkPullAfterPush.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkPullAfterPush.Location = new System.Drawing.Point(672, 49);
this.chkPullAfterPush.Location = new System.Drawing.Point(672, 62);
this.chkPullAfterPush.Name = "chkPullAfterPush";
this.chkPullAfterPush.Size = new System.Drawing.Size(87, 21);
this.chkPullAfterPush.TabIndex = 874;
@@ -164,7 +164,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
// 获取Bitmap的Graphics对象
using (Graphics g = Graphics.FromImage(defaultBitmap))
{
// 清除整个Bitmap为蓝色
// 清除整个Bitmap为白色
g.Clear(Color.White);
}
foreach (var prod in lstTemuDbProduct)
@@ -1232,7 +1232,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var dbProd = PDDDBProdEditForm.GetPddProductDetail(prod.id.ParseToString());
var prodObj = JsonHelper.JObjectParse(dbProd.product_json);
List<string> mainImgLst3 = new List<string>();
if (!prodObj["jstProd"].IsJTokenNullOrEmpty())
if (dbProd.product_get_type_text == "厂商直采" && !prodObj["jstProd"].IsJTokenNullOrEmpty())
{
var jstProd = JsonHelper.DeserializeJsonToObject<JSTListProductInfo>(JsonHelper.SerializeObject(prodObj["jstProd"]));
mainImgLst3 = jstProd.itemMainImage.Take(3).ToList();
@@ -1345,7 +1345,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
}
if (dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null)
if (dbProd.product_get_type_text == "厂商直采" && dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null)
{
var row = dgvDbProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["col_spu_id"].Value.ParseToString() == dbProd.spu_id);
@@ -1511,9 +1511,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
{
// 原批量拉取,已废弃 "https://po.e57.cn/prod-api/api/sys-api/system/open/api/goods/list/get?page_size=10";
// 按spuCode(ext_code)拉取
url = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/goods/list/get";
// 作废
//url = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/goods/list/get";
//string body = "{\"spuCodes\":[\"" + dbProd.ext_code + "\"]}";
string body = "{\"spuCodes\":[\"" + dbProd.spu_id + "\"]}";
// warehouseGoodsId和spuCode一起拉回
url = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/goods/list/getNew";
string body = "{\"goodsApiNewItems\":[{\"warehouseGoodsId\":\"" + dbProd.spu_id + "\",\"spuCode\":\"" + dbProd.ext_code + "\"}]}";
var getRst = WXHttpResponseBLL.e57PostResponse(url, body, "");
if (getRst.Contains("\"code\":0"))
{
@@ -1521,8 +1526,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
{
var url3 = BaseClass.BuildPDDObjString("product/mdy_product");
string skuSecretJson = JsonHelper.SerializeObject(JsonHelper.JObjectParse(getRst)["data"].FirstOrDefault());
var prodDataObj = JsonHelper.JObjectParse(rst)["data"];
OutServerGoodsParam outGoodsParam = JsonHelper.DeserializeJsonToObject<OutServerGoodsParam>(JsonHelper.SerializeObject(prodDataObj));
if (outGoodsParam.skus.Any(s => !skuSecretJson.Contains(s.warehouseSkuId)))
continue;
if (skuSecretJson.Contains("warehouseGoodsId") && skuSecretJson.Contains("goodsId") &&
skuSecretJson.Contains("warehouseSkuId") && skuSecretJson.Contains("skuId"))
skuSecretJson.Contains("warehouseSkuId") && skuSecretJson.Contains("skuId") && skuSecretJson.Contains("skuCode"))
{
var data3 = Work.UserLogin.GetSignaturex() +
"&spu_id=" + dbProd.spu_id +
@@ -1628,16 +1639,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}));
// 旧的批量拉取
var spuCodes = string.Join("\",\"", dbProdTmp20Lst.Select(p => p.ext_code));
var spu_id = string.Join("\",\"", dbProdTmp20Lst.Select(p => p.spu_id));
//var spuCodes = string.Join("\",\"", dbProdTmp20Lst.Select(p => p.ext_code));
//var spu_id = string.Join("\",\"", dbProdTmp20Lst.Select(p => p.spu_id));
// 原批量拉取,已废弃 "https://po.e57.cn/prod-api/api/sys-api/system/open/api/goods/list/get?page_size=10";
// 按spuCode(ext_code)拉取
string url = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/goods/list/get?" + Randomx.GetId(100, 999);
string body = "{\"spuCodes\":[\"" + spuCodes + "\"]}";
//string url = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/goods/list/get?" + Randomx.GetId(100, 999);
//string body = "{\"spuCodes\":[\"" + spuCodes + "\"]}";
// 使用新的批量拉取
body = "{\"goodsApiNewItems\":[";
url = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/goods/list/getNew";
string body = "{\"goodsApiNewItems\":[";
string url = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/goods/list/getNew";
foreach (var dbProd in dbProdTmp20Lst)
{
body += "{\"warehouseGoodsId\":\"" + dbProd.spu_id + "\",\"spuCode\":\"" + dbProd.ext_code + "\"},";
@@ -1657,11 +1668,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var skuSecretJson = JsonHelper.SerializeObject(secretObj);
var warehouseGoodsId = BaseRegex.GetStringJson(ref skuSecretJson, "warehouseGoodsId");
var prod = dbProdTmp20Lst.FirstOrDefault(p => p.spu_id == warehouseGoodsId);
var dbProd = PDDDBProdEditForm.GetPddProductDetail(prod.id.ParseToString());
var rst = new WxProdFormConverter().JstPddConvertToWxOutServer(dbProd);
var prodDataObj = JsonHelper.JObjectParse(rst)["data"];
OutServerGoodsParam outGoodsParam = JsonHelper.DeserializeJsonToObject<OutServerGoodsParam>(JsonHelper.SerializeObject(prodDataObj));
if (prod != null)
{
if (outGoodsParam.skus.Any(s => !skuSecretJson.Contains(s.warehouseSkuId)))
continue;
var url2 = BaseClass.BuildPDDObjString("product/mdy_product");
if (skuSecretJson.Contains("warehouseGoodsId") && skuSecretJson.Contains("goodsId") &&
skuSecretJson.Contains("warehouseSkuId") && skuSecretJson.Contains("skuId"))
skuSecretJson.Contains("warehouseSkuId") && skuSecretJson.Contains("skuId") && skuSecretJson.Contains("skuCode"))
{
var data2 = Work.UserLogin.GetSignaturex() +
"&spu_id=" + prod.spu_id +
@@ -1672,7 +1690,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
html = GetHtml.PostUtf8(url2, data2);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
prod.send_to_out_server = 2;
}
else
{