资质图上次传75% 手表上传

This commit is contained in:
wule committed 2026-08-11 02:19:09 +08:00
1 parent 35240505e3
commit a568c685ee
10 files changed
+306 -200

No files matched your search

+1
View File
@@ -192,6 +192,7 @@
<Compile Include="Model\DBModel\oms_wei_order.cs" /> <Compile Include="Model\DBModel\oms_wei_order.cs" />
<Compile Include="Model\DBModel\user_payment_record.cs" /> <Compile Include="Model\DBModel\user_payment_record.cs" />
<Compile Include="Model\DBModel\user_points_record_info.cs" /> <Compile Include="Model\DBModel\user_points_record_info.cs" />
<Compile Include="Model\DBModel\wx_qualification_image_info.cs" />
<Compile Include="Model\Param\CollectManage\FissionSettingParam.cs" /> <Compile Include="Model\Param\CollectManage\FissionSettingParam.cs" />
<Compile Include="Model\Param\OrderManage\FreightTemplateParam.cs" /> <Compile Include="Model\Param\OrderManage\FreightTemplateParam.cs" />
<Compile Include="Model\Param\DyProductManage\DyCategoryParam.cs" /> <Compile Include="Model\Param\DyProductManage\DyCategoryParam.cs" />
+1 -1
View File
@@ -31,7 +31,7 @@ namespace AllBase
/// <summary> /// <summary>
/// 版本ID /// 版本ID
/// </summary> /// </summary>
public static int VersionCount = 1272; public static int VersionCount = 1273;
public static string MainPath = "29wx"; public static string MainPath = "29wx";
//public static string MainPath = "29wx"; //public static string MainPath = "29wx";
//public static string MainPath = "29pdd"; //public static string MainPath = "29pdd";
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.DBModel
{
public class wx_qualification_image_info
{
public int id { get; set; }
public string cat_name { get; set; }
public string img_md5 { get; set; }
public string img_base64 { get; set; }
public string img_thumb_base64 { get; set; }
public string txt_margin { get; set; }
public DateTime add_time { get; set; }
public DateTime mdy_time { get; set; }
}
}
@@ -10,6 +10,7 @@ namespace KJD_Web.Model.WxModel
public int id { get; set; } public int id { get; set; }
public string img_md5 { get; set; } public string img_md5 { get; set; }
public string img_base64 { get; set; } public string img_base64 { get; set; }
public string img_thumb_base64 { get; set; }
public string txt_margin { get; set; } public string txt_margin { get; set; }
public DateTime add_time { get; set; } public DateTime add_time { get; set; }
public DateTime mdy_time { get; set; } public DateTime mdy_time { get; set; }
@@ -323,6 +323,18 @@ namespace KJD_Web
Context.Response.End(); Context.Response.End();
} }
[WebMethod]
public void wx_get_qualification_image()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new WXProductManage().WXGetQualificationImage(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod] [WebMethod]
public void e57_get_freight_template() public void e57_get_freight_template()
{ {
+28 -15
View File
@@ -55,6 +55,7 @@ namespace TemuKJD.ToolForms
this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox();
this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.chkWithTitle = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.btnBatchCreateFissionTitle = new DevComponents.DotNetBar.PanelEx(); this.btnBatchCreateFissionTitle = new DevComponents.DotNetBar.PanelEx();
this.pbLoading2 = new System.Windows.Forms.PictureBox(); this.pbLoading2 = new System.Windows.Forms.PictureBox();
this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx(); this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx();
@@ -82,7 +83,7 @@ namespace TemuKJD.ToolForms
this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn(); this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn();
this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn(); this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn();
this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn(); this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn();
this.chkWithTitle = new TemuKJD.UserComponent.UcCheckBox(this.components); this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
@@ -273,6 +274,7 @@ namespace TemuKJD.ToolForms
// //
// splitContainer3.Panel1 // splitContainer3.Panel1
// //
this.splitContainer3.Panel1.Controls.Add(this.label1);
this.splitContainer3.Panel1.Controls.Add(this.chkWithTitle); this.splitContainer3.Panel1.Controls.Add(this.chkWithTitle);
this.splitContainer3.Panel1.Controls.Add(this.btnBatchCreateFissionTitle); this.splitContainer3.Panel1.Controls.Add(this.btnBatchCreateFissionTitle);
this.splitContainer3.Panel1MinSize = 0; this.splitContainer3.Panel1MinSize = 0;
@@ -284,16 +286,28 @@ namespace TemuKJD.ToolForms
this.splitContainer3.Panel2.Controls.Add(this.dgvDbProduct); this.splitContainer3.Panel2.Controls.Add(this.dgvDbProduct);
this.splitContainer3.Panel2MinSize = 0; this.splitContainer3.Panel2MinSize = 0;
this.splitContainer3.Size = new System.Drawing.Size(357, 626); this.splitContainer3.Size = new System.Drawing.Size(357, 626);
this.splitContainer3.SplitterDistance = 94; this.splitContainer3.SplitterDistance = 112;
this.splitContainer3.TabIndex = 0; this.splitContainer3.TabIndex = 0;
// //
// chkWithTitle
//
this.chkWithTitle.AutoSize = true;
this.chkWithTitle.Checked = true;
this.chkWithTitle.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkWithTitle.Location = new System.Drawing.Point(11, 41);
this.chkWithTitle.Name = "chkWithTitle";
this.chkWithTitle.Size = new System.Drawing.Size(215, 21);
this.chkWithTitle.TabIndex = 1132;
this.chkWithTitle.Text = "提问时附带商品标题(防止数据不符)";
this.chkWithTitle.UseVisualStyleBackColor = true;
//
// btnBatchCreateFissionTitle // btnBatchCreateFissionTitle
// //
this.btnBatchCreateFissionTitle.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnBatchCreateFissionTitle.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnBatchCreateFissionTitle.Cursor = System.Windows.Forms.Cursors.Hand; this.btnBatchCreateFissionTitle.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnBatchCreateFissionTitle.DisabledBackColor = System.Drawing.Color.Empty; this.btnBatchCreateFissionTitle.DisabledBackColor = System.Drawing.Color.Empty;
this.btnBatchCreateFissionTitle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnBatchCreateFissionTitle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBatchCreateFissionTitle.Location = new System.Drawing.Point(21, 20); this.btnBatchCreateFissionTitle.Location = new System.Drawing.Point(11, 12);
this.btnBatchCreateFissionTitle.Name = "btnBatchCreateFissionTitle"; this.btnBatchCreateFissionTitle.Name = "btnBatchCreateFissionTitle";
this.btnBatchCreateFissionTitle.Size = new System.Drawing.Size(135, 23); this.btnBatchCreateFissionTitle.Size = new System.Drawing.Size(135, 23);
this.btnBatchCreateFissionTitle.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnBatchCreateFissionTitle.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -315,7 +329,7 @@ namespace TemuKJD.ToolForms
// //
this.pbLoading2.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoading2.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading2.Image = global::TemuKJD.Properties.Resources.loading_blue; this.pbLoading2.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading2.Location = new System.Drawing.Point(153, 241); this.pbLoading2.Location = new System.Drawing.Point(153, 232);
this.pbLoading2.Name = "pbLoading2"; this.pbLoading2.Name = "pbLoading2";
this.pbLoading2.Size = new System.Drawing.Size(50, 50); this.pbLoading2.Size = new System.Drawing.Size(50, 50);
this.pbLoading2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbLoading2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -373,7 +387,7 @@ namespace TemuKJD.ToolForms
this.dgvDbProduct.ReadOnly = true; this.dgvDbProduct.ReadOnly = true;
this.dgvDbProduct.RowHeadersWidth = 30; this.dgvDbProduct.RowHeadersWidth = 30;
this.dgvDbProduct.RowTemplate.Height = 23; this.dgvDbProduct.RowTemplate.Height = 23;
this.dgvDbProduct.Size = new System.Drawing.Size(357, 528); this.dgvDbProduct.Size = new System.Drawing.Size(357, 510);
this.dgvDbProduct.TabIndex = 10; this.dgvDbProduct.TabIndex = 10;
this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick); this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick);
// //
@@ -589,17 +603,15 @@ namespace TemuKJD.ToolForms
this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.col_select_product.Visible = false; this.col_select_product.Visible = false;
// //
// chkWithTitle // label1
// //
this.chkWithTitle.AutoSize = true; this.label1.AutoSize = true;
this.chkWithTitle.Checked = true; this.label1.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.chkWithTitle.CheckState = System.Windows.Forms.CheckState.Checked; this.label1.Location = new System.Drawing.Point(8, 69);
this.chkWithTitle.Location = new System.Drawing.Point(21, 53); this.label1.Name = "label1";
this.chkWithTitle.Name = "chkWithTitle"; this.label1.Size = new System.Drawing.Size(320, 34);
this.chkWithTitle.Size = new System.Drawing.Size(215, 21); this.label1.TabIndex = 1136;
this.chkWithTitle.TabIndex = 1132; this.label1.Text = "备注:至少需要生成30个以上标题(少于30程序执行错误),\r\n   建议生成50个以上标题,防止识别错误。";
this.chkWithTitle.Text = "提问时附带商品标题(防止数据不符)";
this.chkWithTitle.UseVisualStyleBackColor = true;
// //
// DouBaoTitleFissionCefForm // DouBaoTitleFissionCefForm
// //
@@ -685,5 +697,6 @@ namespace TemuKJD.ToolForms
private System.Windows.Forms.DataGridViewLinkColumn col_delete; private System.Windows.Forms.DataGridViewLinkColumn col_delete;
private System.Windows.Forms.DataGridViewLinkColumn col_select_product; private System.Windows.Forms.DataGridViewLinkColumn col_select_product;
private UserComponent.UcCheckBox chkWithTitle; private UserComponent.UcCheckBox chkWithTitle;
private System.Windows.Forms.Label label1;
} }
} }
@@ -41,11 +41,6 @@ namespace TemuKJD.WXForms.AdminForms
this.btnEmpty = new DevComponents.DotNetBar.PanelEx(); this.btnEmpty = new DevComponents.DotNetBar.PanelEx();
this.pbLoading = new System.Windows.Forms.PictureBox(); this.pbLoading = new System.Windows.Forms.PictureBox();
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colCat1Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colChangeImage = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.txtBottom = new System.Windows.Forms.TextBox(); this.txtBottom = new System.Windows.Forms.TextBox();
@@ -65,6 +60,13 @@ namespace TemuKJD.WXForms.AdminForms
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.panel3 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colCat1Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colImgMd5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colImg = new System.Windows.Forms.DataGridViewImageColumn();
this.colChangeImage = new System.Windows.Forms.DataGridViewLinkColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
@@ -229,6 +231,8 @@ namespace TemuKJD.WXForms.AdminForms
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect, this.colSelect,
this.colCat1Name, this.colCat1Name,
this.colImgMd5,
this.colImg,
this.colChangeImage, this.colChangeImage,
this.colDelete, this.colDelete,
this.colMsg}); this.colMsg});
@@ -244,44 +248,6 @@ namespace TemuKJD.WXForms.AdminForms
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
this.dgvShop.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvShop_CellMouseDown); this.dgvShop.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvShop_CellMouseDown);
// //
// colSelect
//
this.colSelect.FillWeight = 16F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colCat1Name
//
this.colCat1Name.FillWeight = 70F;
this.colCat1Name.HeaderText = "类目名称";
this.colCat1Name.Name = "colCat1Name";
this.colCat1Name.ReadOnly = true;
//
// colChangeImage
//
this.colChangeImage.FillWeight = 46F;
this.colChangeImage.HeaderText = "更改图片";
this.colChangeImage.Name = "colChangeImage";
this.colChangeImage.ReadOnly = true;
this.colChangeImage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colChangeImage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colDelete
//
this.colDelete.FillWeight = 46F;
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
//
// colMsg
//
this.colMsg.HeaderText = "操作结果";
this.colMsg.Name = "colMsg";
this.colMsg.ReadOnly = true;
//
// splitContainer2 // splitContainer2
// //
this.splitContainer2.BackColor = System.Drawing.Color.White; this.splitContainer2.BackColor = System.Drawing.Color.White;
@@ -540,6 +506,62 @@ namespace TemuKJD.WXForms.AdminForms
this.panel3.Size = new System.Drawing.Size(1271, 576); this.panel3.Size = new System.Drawing.Size(1271, 576);
this.panel3.TabIndex = 35; this.panel3.TabIndex = 35;
// //
// colSelect
//
this.colSelect.FillWeight = 16F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colCat1Name
//
this.colCat1Name.FillWeight = 70F;
this.colCat1Name.HeaderText = "类目名称";
this.colCat1Name.Name = "colCat1Name";
this.colCat1Name.ReadOnly = true;
//
// colImgMd5
//
this.colImgMd5.FillWeight = 50F;
this.colImgMd5.HeaderText = "图片码";
this.colImgMd5.Name = "colImgMd5";
this.colImgMd5.ReadOnly = true;
//
// colImg
//
this.colImg.FillWeight = 40F;
this.colImg.HeaderText = "图片";
this.colImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.colImg.Name = "colImg";
this.colImg.ReadOnly = true;
this.colImg.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colChangeImage
//
this.colChangeImage.FillWeight = 46F;
this.colChangeImage.HeaderText = "编辑图片";
this.colChangeImage.Name = "colChangeImage";
this.colChangeImage.ReadOnly = true;
this.colChangeImage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colChangeImage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colDelete
//
this.colDelete.FillWeight = 46F;
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
//
// colMsg
//
this.colMsg.HeaderText = "操作结果";
this.colMsg.Name = "colMsg";
this.colMsg.ReadOnly = true;
//
// WXAdminQualificationImageForm // WXAdminQualificationImageForm
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -594,11 +616,6 @@ namespace TemuKJD.WXForms.AdminForms
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.Panel panel4; private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.SplitContainer splitContainer3; private System.Windows.Forms.SplitContainer splitContainer3;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colCat1Name;
private System.Windows.Forms.DataGridViewLinkColumn colChangeImage;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.ComboBox comboBox1;
@@ -613,5 +630,12 @@ namespace TemuKJD.WXForms.AdminForms
private System.Windows.Forms.TextBox txtLeft; private System.Windows.Forms.TextBox txtLeft;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colCat1Name;
private System.Windows.Forms.DataGridViewTextBoxColumn colImgMd5;
private System.Windows.Forms.DataGridViewImageColumn colImg;
private System.Windows.Forms.DataGridViewLinkColumn colChangeImage;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
} }
} }
@@ -1,4 +1,5 @@
using AllBase; using AllBase;
using AllBase.Model.DBModel;
using AllBase.Model.Param.TemuProductManage; using AllBase.Model.Param.TemuProductManage;
using AllBase.Model.Result; using AllBase.Model.Result;
using NaiBa.Util; using NaiBa.Util;
@@ -22,6 +23,7 @@ using TemuKJD.BLL;
using TemuKJD.Extension; using TemuKJD.Extension;
using TemuKJD.WXForms.ShopForms; using TemuKJD.WXForms.ShopForms;
using Work; using Work;
using Work.BLL.Tools;
namespace TemuKJD.WXForms.AdminForms namespace TemuKJD.WXForms.AdminForms
{ {
@@ -33,7 +35,7 @@ namespace TemuKJD.WXForms.AdminForms
get { if (inst == null) inst = new WXAdminQualificationImageForm(); return inst; } get { if (inst == null) inst = new WXAdminQualificationImageForm(); return inst; }
set { inst = value; } set { inst = value; }
} }
public static ConcurrentList<ShopLoginInfo> lstAdminShopInfo { get; set; } = new ConcurrentList<ShopLoginInfo>(); public static ConcurrentList<wx_qualification_image_info> lstWxQualificationImageInfo { get; set; } = new ConcurrentList<wx_qualification_image_info>();
public WXAdminQualificationImageForm() public WXAdminQualificationImageForm()
{ {
@@ -73,59 +75,37 @@ namespace TemuKJD.WXForms.AdminForms
{ {
this.pbLoading.Visible = true; this.pbLoading.Visible = true;
this.dgvShop.Rows.Clear(); this.dgvShop.Rows.Clear();
lstAdminShopInfo.Clear(); lstWxQualificationImageInfo.Clear();
})); }));
} }
else else
{ {
this.pbLoading.Visible = true; this.pbLoading.Visible = true;
this.dgvShop.Rows.Clear(); this.dgvShop.Rows.Clear();
lstAdminShopInfo.Clear(); lstWxQualificationImageInfo.Clear();
} }
Task.Run(() => Task.Run(() =>
{ {
int pageCount; int pageCount;
decimal seconds = 0; decimal seconds = 0;
var list = AdminGetServerQualificationImageLst(out pageCount, out seconds, page, ucSplitPage1.PageSize); var list = AdminGetServerQualificationImageLst(out pageCount, out seconds, page, ucSplitPage1.PageSize);
lstAdminShopInfo.AddRange(list); lstWxQualificationImageInfo.AddRange(list);
this.ucSplitPage1.TotalPage = pageCount; this.ucSplitPage1.TotalPage = pageCount;
foreach (var shop in lstAdminShopInfo) foreach (var image in lstWxQualificationImageInfo)
{ {
Invoke(new Action(() => Invoke(new Action(() =>
{ {
int rowIndex = this.dgvShop.Rows.Add( int rowIndex = this.dgvShop.Rows.Add(
shopIdList.Contains(shop.ShopId + shop.UserName), false,
shop.LoginName, image.cat_name,
shop.ShopId, image.img_md5,
shop.ShopAccount, Base64ChangeImgUrl.Base64ToImage(image.img_thumb_base64),
shop.Notes,
shop.GroupName,
"-",
shop.AddProductRemaining,
"+",
//"±",
shop.Cookies,
shop.UserName,
shop.SubUserName,
shop.UploadAccount,
shop.BuyAccount,
shop.ChatAccount,
"",
"进入",
"检测",
string.IsNullOrWhiteSpace(shop.LoginStatus) ? "未登录" : shop.LoginStatus.Trim(),
string.IsNullOrWhiteSpace(shop.LoginStatus2) ? "国际版未登录" : shop.LoginStatus2.Trim(),
"购买",
"多重登录",
shop.ApiAuthStatus,
shop.BuyApiAuth.ApiAuthStatus,
"导入Cookie",
"复制Cookie",
"上传",
shop.OperateSubSaName,
"编辑", "编辑",
"删除"); "删除");
var row = dgvShop.Rows[rowIndex];
row.Height = 60;
})); }));
} }
@@ -165,6 +145,7 @@ namespace TemuKJD.WXForms.AdminForms
if (e.ColumnIndex < 0 || e.RowIndex < 0) if (e.ColumnIndex < 0 || e.RowIndex < 0)
return; return;
string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText; string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText;
var row = dgvShop.Rows[e.RowIndex];
switch (headerText) switch (headerText)
{ {
@@ -185,12 +166,13 @@ namespace TemuKJD.WXForms.AdminForms
//if (ShopBLL.AdminDelServerShop(shop)) //if (ShopBLL.AdminDelServerShop(shop))
// SearchImg(this.ucSplitPage1.CurrentPage); // SearchImg(this.ucSplitPage1.CurrentPage);
break; break;
case "更改图片": case "编辑图片":
IsOperate = true; var image = lstWxQualificationImageInfo.FirstOrDefault(i => i.img_md5 == row.Cells["colImgMd5"].Value.ParseToString());
if (image != null)
{ {
//UploadProduct(shop); image.img_base64.IsNullOrEmpty();
} }
IsOperate = false;
break; break;
case "": case "":
dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value; dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value;
@@ -215,32 +197,28 @@ namespace TemuKJD.WXForms.AdminForms
return shopNameList; return shopNameList;
} }
public List<ShopLoginInfo> AdminGetServerQualificationImageLst(out int pageCount, out decimal seconds, int page = 1, int pageSize = 50) public List<wx_qualification_image_info> AdminGetServerQualificationImageLst(out int pageCount, out decimal seconds, int page = 1, int pageSize = 50)
{ {
List<ShopLoginInfo> list = new List<ShopLoginInfo>(); List<wx_qualification_image_info> list = new List<wx_qualification_image_info>();
pageCount = 1; pageCount = 1;
seconds = 0; seconds = 0;
var url = BaseClass.BuildObjString("shop/admin_get_server_qualification_image_list"); var url = BaseClass.BuildObjString("product/wx_get_qualification_image");
var data = UserLogin.GetSignaturex() + var data = UserLogin.GetSignaturex() +
"&page=" + page + "&page=" + page +
"&page_size=" + pageSize + "&page_size=" + pageSize;
"&search_cat_name=" + txtCatName.Text.Trim(); data += "&is_detail=true";
if (BaseClass.SaLevel > 1)
data += "&operate_sub_sa_name=" + BaseClass.UserName;
var html = GetHtml.PostUtf8(url, data); var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) if (!html.Contains("\"code\":200"))
|| !html.Contains("shop_id") || !html.Contains("shop_account") || !html.Contains("login_pass"))
{
return list; return list;
}
int count = BaseRegex.GetIntJson(ref html, "count"); int count = BaseRegex.GetIntJson(ref html, "count");
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt(); pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
pageCount = Math.Max(pageCount, 1); pageCount = Math.Max(pageCount, 1);
seconds = BaseRegex.GetDecimalJson(ref html, "seconds"); seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
return ShopBLL.DeserializationShop(html); JObject jObj = JsonHelper.JObjectParse(html);
return JsonHelper.DeserializeJsonToList<wx_qualification_image_info>(jObj["data"].ParseToString());
} }
private void dgvShop_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) private void dgvShop_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
@@ -123,6 +123,12 @@
<metadata name="colCat1Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="colCat1Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="colImgMd5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colImg.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colChangeImage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="colChangeImage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@@ -2556,6 +2556,11 @@ namespace TemuKJD.WXForms.ProductForms
// 微信商品使用类目缓存 // 微信商品使用类目缓存
if (!dbProd.wx_cat_leaf.IsNullOrZero()) if (!dbProd.wx_cat_leaf.IsNullOrZero())
{ {
if (dbProd.wx_cat_3 == 7370)
dbProd.wx_cat_3 = 547591;
if (dbProd.wx_cat_leaf == 7370)
dbProd.wx_cat_leaf = 547591;
if (!dbProd.wx_cat_1.IsNullOrZero()) if (!dbProd.wx_cat_1.IsNullOrZero())
aiCateIdLst.Add(dbProd.wx_cat_1.ParseToLong()); aiCateIdLst.Add(dbProd.wx_cat_1.ParseToLong());
if (!dbProd.wx_cat_2.IsNullOrZero()) if (!dbProd.wx_cat_2.IsNullOrZero())
@@ -2649,6 +2654,13 @@ namespace TemuKJD.WXForms.ProductForms
cell.Value = "正在生成类目模板"; cell.Value = "正在生成类目模板";
})); }));
} }
if (aiCateIdLst.LastOrDefault() == 7370)
{
aiCateIdLst.RemoveAt(aiCateIdLst.Count - 1);
aiCateIdLst.Add(547591);
}
string getCateRst = WXUpload.getCategoryOnShelf(shop, aiCateIdLst); string getCateRst = WXUpload.getCategoryOnShelf(shop, aiCateIdLst);
if (!getCateRst.Contains("\"code\":0")) if (!getCateRst.Contains("\"code\":0"))
{ {
@@ -2675,8 +2687,11 @@ namespace TemuKJD.WXForms.ProductForms
} }
// 获取叶子类目id // 获取叶子类目id
long leafCatId = (upProdParam.product.info.category.LastOrDefault()?.catId).ParseToLong(); //哲学经典著作 long leafCatId = (upProdParam.product.info.category.LastOrDefault()?.catId).ParseToLong(); //哲学经典著作
var bound = GlobalConfig.WxCatBoundList.FirstOrDefault(b => b.leaf_id == leafCatId); var bound = GlobalConfig.WxCatBoundList.FirstOrDefault(b => b.leaf_id == leafCatId);
if (leafCatId == 547591)
bound = GlobalConfig.WxCatBoundList.FirstOrDefault(b => b.leaf_id == 7370);
if (bound == null) if (bound == null)
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"获取类目保证金失败\"}"; return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"获取类目保证金失败\"}";
var maxBount = txtFilterBoundMax.Text.Trim().ParseToInt(); var maxBount = txtFilterBoundMax.Text.Trim().ParseToInt();
@@ -2684,97 +2699,111 @@ namespace TemuKJD.WXForms.ProductForms
if (bound.cat_bound < minBount || bound.cat_bound > maxBount ) if (bound.cat_bound < minBount || bound.cat_bound > maxBount )
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目保证金(" + bound.cat_bound + ")超过过滤限制(" + minBount + "-" + maxBount + ")\"}"; return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目保证金(" + bound.cat_bound + ")超过过滤限制(" + minBount + "-" + maxBount + ")\"}";
// 检测是否有类目上传权限 var spBrandId = "";
var cateUpCheckRst = WXUpload.batchCheckCategoryRelation(shop, leafCatId); if (leafCatId == 547591)
//"{\"code\":0,\"list\":[{\"category_id\":\"1427\",\"result\":0,\"no_auth_reason_type\":0}]}"
//"{\"code\":0,\"list\":[{\"category_id\":\"7486\",\"result\":0,\"no_auth_reason_type\":0}]}"
if (!cateUpCheckRst.Contains("\"code\":0") && !cateUpCheckRst.Contains("\"success\":true"))
{ {
var error = BaseRegex.GetStringJson(ref cateUpCheckRst, "msg"); var rst = WXUpload.getMixBrand(shop, leafCatId.ToString());
if (string.IsNullOrEmpty(error)) // 先写死
error = cateUpCheckRst; spBrandId = 10914219.ToString();
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目校验错误 " + error + "\"}"; // 国表定向类目
upProdParam.product.info.brandId = spBrandId.ParseToLong();
} }
if (!cateUpCheckRst.Contains("\"result\":1")) else
{ {
if (aiCateIdLst.FirstOrDefault() == 10000215)
{
//@"{""categoryInfo"":{""categories"":[{""id"":10000215},{""id"":10000222},{""id"":7483}],""categoryDeposit"":""1000.00"",""isNewApplyCat"":true,""licenseGroupList"":[{""licenseGroupId"":""1"",""license"":{""licenseId"":""4"",""cosIdList"":[""1771897594802-oM5657FQAaKYlf2uP300NBgx9HYY-0581""],""licenseFieldList"":[{""key"":""audit_license_registration_no"",""value"":""YB23509020049441""},{""key"":""search_url"",""value"":""""}],""isReuse"":true}}],""ruleVersion"":5234,""certificate"":[]},""brandIdList"":[],""leafCategoryId"":7483,""reuse"":0,""applyType"":""normalApply""}";
var getCatDataRst = WXUpload.getSingleCategoryData(shop, leafCatId, aiCateIdLst);
if (!getCatDataRst.Contains("\"code\":0") && !getCatDataRst.Contains("\"success\":true"))
{
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请失败 查询类目资质文件失败" + "\"}";
}
WXCateAuthParam wxCateAuthParam = new WXCateAuthParam(); // 检测是否有类目上传权限
wxCateAuthParam.leafCategoryId = leafCatId; var cateUpCheckRst = WXUpload.batchCheckCategoryRelation(shop, leafCatId);
wxCateAuthParam.categoryInfo.categoryDeposit = bound.cat_bound.ToString("0.00"); //"{\"code\":0,\"list\":[{\"category_id\":\"1427\",\"result\":0,\"no_auth_reason_type\":0}]}"
wxCateAuthParam.categoryInfo.ruleVersion = BaseRegex.GetIntJson(ref getCatDataRst, "ruleVersion"); //"{\"code\":0,\"list\":[{\"category_id\":\"7486\",\"result\":0,\"no_auth_reason_type\":0}]}"
foreach (var cateId in aiCateIdLst) if (!cateUpCheckRst.Contains("\"code\":0") && !cateUpCheckRst.Contains("\"success\":true"))
{
wxCateAuthParam.categoryInfo.categories.Add(new WXCateId() { id = cateId });
}
try
{
if (!JsonHelper.JObjectParse(getCatDataRst)["reuseApplyData"].IsJTokenNullOrEmpty())
{
var jlicenseGroupList = JsonHelper.JObjectParse(getCatDataRst)["reuseApplyData"]["catInfo"]["licenseGroupList"];
var licenseGroupListStr = JsonHelper.SerializeObject(jlicenseGroupList);
wxCateAuthParam.categoryInfo.licenseGroupList = JsonHelper.DeserializeJsonToList<licenseGroup>(licenseGroupListStr);
}
else
{
var licenseGroup = new licenseGroup();
wxCateAuthParam.categoryInfo.licenseGroupList.Add(licenseGroup);
licenseGroup.license.licenseId = "4";
var cosIdList = "[" + BaseRegex.GetMatchRegexString(ref getCatDataRst, "\"cosIdList\":\\[([\\s\\S]*?)\\]") + "]";
licenseGroup.license.cosIdList = JsonHelper.DeserializeJsonToList<string>(cosIdList);
var licenseFieldList = "[" + BaseRegex.GetMatchRegexString(ref getCatDataRst, "\"licenseFieldList\":\\[([\\s\\S]*?)\\]") + "]";
licenseGroup.license.licenseFieldList = JsonHelper.DeserializeJsonToList<KeyValueParam>(licenseFieldList);
}
var authCateRst = WXUpload.wxCateAuth(shop, aiCateIdLst, wxCateAuthParam);
if (!authCateRst.Contains("\"code\":0") && !authCateRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref authCateRst, "msg");
if (string.IsNullOrEmpty(error))
error = BaseRegex.GetStringJson(ref authCateRst, "errmsg");
if (string.IsNullOrEmpty(error))
error = authCateRst;
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请失败 " + error + "\"}";
}
Thread.Sleep(Randomx.GetId(5000, 7000));
cateUpCheckRst = WXUpload.batchCheckCategoryRelation(shop, leafCatId);
if (!cateUpCheckRst.Contains("\"code\":0") && !cateUpCheckRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref cateUpCheckRst, "msg");
if (string.IsNullOrEmpty(error))
error = cateUpCheckRst;
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请校验错误 " + error + "\"}";
}
if (!cateUpCheckRst.Contains("\"result\":1"))
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请审核中 请稍后再试\"}";
}
catch
{
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请失败 复用资质文件失败,请重新提交资质文件" + "\"}";
}
//return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请失败 请手动申请资质类目" + "\"}";
}
else
{ {
Thread.Sleep(Randomx.GetId(1000, 2000)); var error = BaseRegex.GetStringJson(ref cateUpCheckRst, "msg");
var cateAuthorRst = WXUpload.addFinderCategoryV2(shop, leafCatId); if (string.IsNullOrEmpty(error))
if (!cateAuthorRst.Contains("\"code\":0") && !cateAuthorRst.Contains("\"success\":true")) error = cateUpCheckRst;
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目校验错误 " + error + "\"}";
}
if (!cateUpCheckRst.Contains("\"result\":1"))
{
if (aiCateIdLst.FirstOrDefault() == 10000215)
{ {
var error = BaseRegex.GetStringJson(ref cateAuthorRst, "msg"); //@"{""categoryInfo"":{""categories"":[{""id"":10000215},{""id"":10000222},{""id"":7483}],""categoryDeposit"":""1000.00"",""isNewApplyCat"":true,""licenseGroupList"":[{""licenseGroupId"":""1"",""license"":{""licenseId"":""4"",""cosIdList"":[""1771897594802-oM5657FQAaKYlf2uP300NBgx9HYY-0581""],""licenseFieldList"":[{""key"":""audit_license_registration_no"",""value"":""YB23509020049441""},{""key"":""search_url"",""value"":""""}],""isReuse"":true}}],""ruleVersion"":5234,""certificate"":[]},""brandIdList"":[],""leafCategoryId"":7483,""reuse"":0,""applyType"":""normalApply""}";
if (string.IsNullOrEmpty(error)) var getCatDataRst = WXUpload.getSingleCategoryData(shop, leafCatId, aiCateIdLst);
error = BaseRegex.GetStringJson(ref cateAuthorRst, "errmsg"); if (!getCatDataRst.Contains("\"code\":0") && !getCatDataRst.Contains("\"success\":true"))
if (string.IsNullOrEmpty(error)) {
error = cateAuthorRst; return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请失败 查询类目资质文件失败" + "\"}";
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请错误 " + error + "\"}"; }
WXCateAuthParam wxCateAuthParam = new WXCateAuthParam();
wxCateAuthParam.leafCategoryId = leafCatId;
wxCateAuthParam.categoryInfo.categoryDeposit = bound.cat_bound.ToString("0.00");
wxCateAuthParam.categoryInfo.ruleVersion = BaseRegex.GetIntJson(ref getCatDataRst, "ruleVersion");
foreach (var cateId in aiCateIdLst)
{
wxCateAuthParam.categoryInfo.categories.Add(new WXCateId() { id = cateId });
}
try
{
if (!JsonHelper.JObjectParse(getCatDataRst)["reuseApplyData"].IsJTokenNullOrEmpty())
{
var jlicenseGroupList = JsonHelper.JObjectParse(getCatDataRst)["reuseApplyData"]["catInfo"]["licenseGroupList"];
var licenseGroupListStr = JsonHelper.SerializeObject(jlicenseGroupList);
wxCateAuthParam.categoryInfo.licenseGroupList = JsonHelper.DeserializeJsonToList<licenseGroup>(licenseGroupListStr);
}
else
{
var licenseGroup = new licenseGroup();
wxCateAuthParam.categoryInfo.licenseGroupList.Add(licenseGroup);
licenseGroup.license.licenseId = "4";
var cosIdList = "[" + BaseRegex.GetMatchRegexString(ref getCatDataRst, "\"cosIdList\":\\[([\\s\\S]*?)\\]") + "]";
licenseGroup.license.cosIdList = JsonHelper.DeserializeJsonToList<string>(cosIdList);
var licenseFieldList = "[" + BaseRegex.GetMatchRegexString(ref getCatDataRst, "\"licenseFieldList\":\\[([\\s\\S]*?)\\]") + "]";
licenseGroup.license.licenseFieldList = JsonHelper.DeserializeJsonToList<KeyValueParam>(licenseFieldList);
}
var authCateRst = WXUpload.wxCateAuth(shop, aiCateIdLst, wxCateAuthParam);
if (!authCateRst.Contains("\"code\":0") && !authCateRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref authCateRst, "msg");
if (string.IsNullOrEmpty(error))
error = BaseRegex.GetStringJson(ref authCateRst, "errmsg");
if (string.IsNullOrEmpty(error))
error = authCateRst;
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请失败 " + error + "\"}";
}
Thread.Sleep(Randomx.GetId(5000, 7000));
cateUpCheckRst = WXUpload.batchCheckCategoryRelation(shop, leafCatId);
if (!cateUpCheckRst.Contains("\"code\":0") && !cateUpCheckRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref cateUpCheckRst, "msg");
if (string.IsNullOrEmpty(error))
error = cateUpCheckRst;
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请校验错误 " + error + "\"}";
}
if (!cateUpCheckRst.Contains("\"result\":1"))
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请审核中 请稍后再试\"}";
}
catch
{
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请失败 复用资质文件失败,请重新提交资质文件" + "\"}";
}
//return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请失败 请手动申请资质类目" + "\"}";
}
else
{
Thread.Sleep(Randomx.GetId(1000, 2000));
var cateAuthorRst = WXUpload.addFinderCategoryV2(shop, leafCatId);
if (!cateAuthorRst.Contains("\"code\":0") && !cateAuthorRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref cateAuthorRst, "msg");
if (string.IsNullOrEmpty(error))
error = BaseRegex.GetStringJson(ref cateAuthorRst, "errmsg");
if (string.IsNullOrEmpty(error))
error = cateAuthorRst;
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"类目申请错误 " + error + "\"}";
}
} }
} }
} }
#endregion #endregion
#region ai短标题 // ai获取短标题 #region ai短标题 // ai获取短标题
@@ -4116,7 +4145,19 @@ namespace TemuKJD.WXForms.ProductForms
//// } //// }
//// } //// }
////} ////}
//else // 坚果炒货类,系统返回的试规格/净含量但是要求填规格
if ((upProdParam.product.info?.category?.FirstOrDefault()?.name == "食品饮料" || prodInfo.detail?.cats?.FirstOrDefault() == "食品饮料") &&
(upProdParam.product.info?.category?.LastOrDefault()?.name == "坚果炒货" || upProdParam.product.info?.category?.LastOrDefault()?.name == "果干"))
{
if (!prodInfo.detail.sku.FirstOrDefault().spec.Any(s => s.parent_name == "规格"))
{
foreach (var sku in prodInfo.detail.sku)
{
sku.spec.FirstOrDefault().parent_name = "规格";
}
}
}
else
{ {
var leafCat = upProdParam.product.info.category.LastOrDefault(); var leafCat = upProdParam.product.info.category.LastOrDefault();
if (leafCat?.catInfo?.saleAttr?.attr != null) if (leafCat?.catInfo?.saleAttr?.attr != null)
@@ -4960,7 +5001,7 @@ namespace TemuKJD.WXForms.ProductForms
foreach (var propParam in upProdParam.product.info.param) foreach (var propParam in upProdParam.product.info.param)
{ {
if (propParam.categorys[0].name.Contains("食品名称")) if (propParam.categorys[0].name.Contains("食品名称") && !propParam.categorys[1].name.Contains("见包装") && !propParam.categorys[1].name.Contains("见外包装"))
foodName = "食品名称:" + propParam.categorys[1].name; foodName = "食品名称:" + propParam.categorys[1].name;
else if (propParam.categorys[0].name.Contains("生产企业名称") && !propParam.categorys[1].name.Contains("见包装") && !propParam.categorys[1].name.Contains("见外包装")) else if (propParam.categorys[0].name.Contains("生产企业名称") && !propParam.categorys[1].name.Contains("见包装") && !propParam.categorys[1].name.Contains("见外包装"))
companyName = "生产商名称:" + propParam.categorys[1].name; companyName = "生产商名称:" + propParam.categorys[1].name;
@@ -7068,11 +7109,21 @@ Content-Type: image/jpeg
return result; return result;
} }
public static string getCategoryOnShelf(ShopLoginInfo shop, List<long> catIdLst) public static string getCategoryOnShelf(ShopLoginInfo shop, List<long> catIdLst, string brandId = "2100000000")
{ {
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradecategory/cgi/product/getCategoryOnShelfV2?token=&lang=zh_CN"; string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradecategory/cgi/product/getCategoryOnShelfV2?token=&lang=zh_CN";
string referer = "https://store.weixin.qq.com/shop/goods/entry"; string referer = "https://store.weixin.qq.com/shop/goods/entry";
string body = @"{""catIdList"":[" + string.Join(",", catIdLst) + @"],""brandId"":2100000000}"; string body = @"{""catIdList"":[" + string.Join(",", catIdLst) + @"],""brandId"":" + brandId + "}";
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
return result;
}
public static string getMixBrand(ShopLoginInfo shop, string catId = "547591")
{
//{"code":0,"brandRequire":1,"bizuinBrandList":[{"brandId":"10914219","chName":"名圣","enName":"","classificationNo":"14","tradeMarkSymbol":1,"registerDetails":{"registrant":"广州哇晓商贸有限责任公司","registerNo":"88879184","startTime":"1786254874","endTime":"2098915200","isPermanent":false},"applicationDetails":{},"grantType":2,"grantDetails":{"grantCertifications":["1786181562555-oRVwX2XGcQYT_YI7RbfnMdcXF3Cs-1512"],"grantLevel":"1","startTime":"0","endTime":"1820332800","isPermanent":false,"brandOwnerType":2},"status":3,"createTime":"1786254883","updateTime":"1786359925","auditInfo":{"auditId":"11736892187","auditStatus":3,"auditTimestamp":1786359925,"submitTimestamp":1786254882},"version":1,"outsideShopType":0,"outsideShopNikename":"","isNewApply":1,"specialQualification":["1786181592374-oRVwX2XGcQYT_YI7RbfnMdcXF3Cs-3202"],"innerBrand":{"id":"10914219","name":"名圣","cnName":"名圣","enName":"","group":0,"certificateNumber":"88879184","status":0,"disableScene":0,"brandStoreName":"","brandLevel":1,"remark":"","brandLevelAuditStatus":2,"brandLevelAuditId":"11839403256"}},{"brandId":"10796790","chName":"嘉飞","enName":"","classificationNo":"21","tradeMarkSymbol":1,"registerDetails":{"registrant":"佛山曜叶科技有限公司","registerNo":"32799300","startTime":"1786019090","endTime":"1870732800","isPermanent":false},"applicationDetails":{},"grantType":2,"grantDetails":{"grantCertifications":["1786010853000-oRVwX2XGcQYT_YI7RbfnMdcXF3Cs-6420"],"grantLevel":"10001","startTime":"0","endTime":"1798560000","isPermanent":false,"brandOwnerType":2},"status":3,"createTime":"1786010877","updateTime":"1786019115","auditInfo":{"auditId":"11582110870","auditStatus":3,"auditTimestamp":1786019115,"submitTimestamp":1786019104},"version":3,"outsideShopType":0,"outsideShopNikename":"","isNewApply":0,"specialQualification":["1786010862808-oRVwX2XGcQYT_YI7RbfnMdcXF3Cs-7538"],"innerBrand":{"id":"10796790","name":"嘉飞","cnName":"嘉飞","enName":"","group":0,"certificateNumber":"32799300","status":0,"disableScene":0,"brandStoreName":"","brandLevel":1,"remark":"","brandLevelAuditStatus":2,"brandLevelAuditId":"8194702850"}}],"mixBrandList":[{"brandId":"10914219","chName":"名圣","enName":"","classificationNo":"14","tradeMarkSymbol":1,"registerDetails":{"registrant":"广州哇晓商贸有限责任公司","registerNo":"88879184","startTime":"1786254874","endTime":"2098915200","isPermanent":false},"applicationDetails":{},"grantType":2,"grantDetails":{"grantCertifications":["1786181562555-oRVwX2XGcQYT_YI7RbfnMdcXF3Cs-1512"],"grantLevel":"1","startTime":"0","endTime":"1820332800","isPermanent":false,"brandOwnerType":2},"status":3,"createTime":"1786254883","updateTime":"1786359925","auditInfo":{"auditId":"11736892187","auditStatus":3,"auditTimestamp":1786359925,"submitTimestamp":1786254882},"version":1,"outsideShopType":0,"outsideShopNikename":"","isNewApply":1,"specialQualification":["1786181592374-oRVwX2XGcQYT_YI7RbfnMdcXF3Cs-3202"],"innerBrand":{"id":"10914219","name":"名圣","cnName":"名圣","enName":"","group":0,"certificateNumber":"88879184","status":0,"disableScene":0,"brandStoreName":"","brandLevel":1,"remark":"","brandLevelAuditStatus":2,"brandLevelAuditId":"11839403256"}}],"categoryType":1}
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradecategory/cgi/getMixBrand?token=&lang=zh_CN";
string referer = "https://store.weixin.qq.com/shop/goods/entry";
string body = @"{""categoryId"":""" + catId + @"""}";
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
return result; return result;
} }