diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index 2ad5324..ba5c057 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,7 +27,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 822;
+ public static int VersionCount = 826;
//public static int VersionCount = 613;
///
diff --git a/AllBase/Model/Result/ShopLoginInfo.cs b/AllBase/Model/Result/ShopLoginInfo.cs
index 86d3854..91ae9d5 100644
--- a/AllBase/Model/Result/ShopLoginInfo.cs
+++ b/AllBase/Model/Result/ShopLoginInfo.cs
@@ -194,6 +194,7 @@ namespace AllBase.Model.Result
public class AuthInfo
{
+ public string ShopId { get; set; } = "";
public string AccessToken { get; set; } = "";
public string RefreshToken { get; set; } = "";
public string AppKey { get; set; } = "";
diff --git a/AllBase/Randomx.cs b/AllBase/Randomx.cs
index 114f816..4ee1b18 100644
--- a/AllBase/Randomx.cs
+++ b/AllBase/Randomx.cs
@@ -9,6 +9,7 @@ namespace AllBase
{
public static string WordBase = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz";
public static string NumberBase = "0123456789";
+ public static string WordNumberBase = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz01234567890123456789";
public static string SignWordBase = ".`~^*_| -#$%&?+";//".`~^*_| -#$%&?";
public static int GetId(int max)
@@ -39,6 +40,15 @@ namespace AllBase
}
return s.ToString();
}
+ public static string GetWordNumber(int len)
+ {
+ StringBuilder s = new StringBuilder();
+ for (int i = 0; i < len; i++)
+ {
+ s.Append(WordNumberBase[new Random(Guid.NewGuid().GetHashCode()).Next(WordNumberBase.Length)]);
+ }
+ return s.ToString();
+ }
///
/// 获取新的属性名称
///
diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
index 054d5cb..4cb45de 100644
--- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
+++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
@@ -8,6 +8,8 @@ using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
+using System.Drawing;
+using System.IO;
using System.Linq;
using System.Web;
using System.Web.Security;
@@ -246,6 +248,10 @@ namespace KJD_Web.BLL.BXX
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
+ var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt();
+ if (version < 823)
+ return "{\"code\":1,\"msg\":\"当前版本过于陈旧,请立即升级新版\"}";
+
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'","\\'");
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
var search_spu = RegexUtils.GetStringQuery(ref inputData, "search_spu")?.Replace("'", "\\'");
@@ -276,7 +282,7 @@ namespace KJD_Web.BLL.BXX
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
- string sql = "select count(id) from bxx.product p where p.is_del=0";
+ string sql = "select count(*) from bxx.product p where p.is_del=0";
string where = "";
if (!string.IsNullOrEmpty(from_shop_id))
@@ -600,7 +606,7 @@ namespace KJD_Web.BLL.BXX
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
- string sql = "select count(id) from bxx.sku_img_replace s where 1=1";
+ string sql = "select count(*) from bxx.sku_img_replace s where 1=1";
string where = "";
if (!string.IsNullOrWhiteSpace(sku_img_replace_ids))
@@ -703,7 +709,7 @@ namespace KJD_Web.BLL.BXX
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
- string sql = "select count(id) from bxx.product p where p.is_del=0";
+ string sql = "select count(*) from bxx.product p where p.is_del=0";
string where = "";
if (!string.IsNullOrEmpty(in_ext_codes))
@@ -828,6 +834,8 @@ namespace KJD_Web.BLL.BXX
}
var data = JsonUtils.SerializerObjectToString(productLst);
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
+ if (product_get_type == "厂商直采" && count > 500)
+ count *= 3;
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
}
catch (Exception ex)
@@ -844,7 +852,7 @@ namespace KJD_Web.BLL.BXX
}
///
- /// 随机获取商品(无详情) 随机添加到上传列表所以不需要获取详情
+ /// 获取拼多多商品随机sku替换图
///
///
///
@@ -868,7 +876,7 @@ namespace KJD_Web.BLL.BXX
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
- string sql = "select count(id) from bxx.sku_img_replace s where 1=1";
+ string sql = "select count(*) from bxx.sku_img_replace s where 1=1";
string where = "";
if (!string.IsNullOrWhiteSpace(in_img_type) && !string.IsNullOrWhiteSpace(in_img_group))
@@ -1868,6 +1876,18 @@ namespace KJD_Web.BLL.BXX
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
+ string img_base64 = RegexUtils.GetStringQuery(ref inputData, "img_base64")?.Replace("'", "\\'");
+ if (!string.IsNullOrEmpty(img_base64))
+ {
+ return WxApiUploadImageBase64(inputData, img_base64);
+ }
+ bool is_file = RegexUtils.GetStringQuery(ref inputData, "is_file")?.Replace("'", "\\'").ToLower() == "true";
+ if (is_file)
+ {
+ return WxApiUploadImageFile(inputData);
+ }
+
+
string post_data = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "post_data"));
string token = RegexUtils.GetStringQuery(ref inputData, "token");
@@ -1877,6 +1897,133 @@ namespace KJD_Web.BLL.BXX
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
+
+ public string WxApiUploadImageFile(string inputData)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
+ string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
+ if (time1 != EncrypUtil.Encryption(time))
+ return "{\"code\":50000,\"msg\":\"校验失败\"}";
+
+ string token = RegexUtils.GetStringQuery(ref inputData, "token")?.Replace("'", "\\'");
+ string img_url = RegexUtils.GetStringQuery(ref inputData, "img_url")?.Replace("'", "\\'");
+ string random_code = RegexUtils.GetStringQuery(ref inputData, "random_code")?.Replace("'", "\\'");
+ int img_width = RegexUtils.GetStringQuery(ref inputData, "width").ParseToInt();
+ int img_height = RegexUtils.GetStringQuery(ref inputData, "height").ParseToInt();
+ bool is_keep_file = RegexUtils.GetStringQuery(ref inputData, "is_keep_file").ParseToBool();
+
+ string getImgError;
+ var image = HttpUtils.GetUrlImg(img_url.Replace("https://", "http://"), out getImgError);
+ if (!string.IsNullOrEmpty(getImgError) || image == null)
+ {
+ return "{\"code\":50001,\"msg\":\"获取图片失败:" + getImgError + "\"}";
+ }
+ try
+ {
+ if (img_width.IsNullOrZero() || img_height.IsNullOrZero())
+ {
+ img_width = image.Width;
+ img_height = image.Height;
+ }
+ var imageBg = new Bitmap(img_width, img_height);
+ using (Graphics g = Graphics.FromImage(imageBg))
+ {
+ g.DrawImage(image, new Rectangle(0, 0, imageBg.Width, imageBg.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel);
+ if (!string.IsNullOrEmpty(random_code) && random_code.ToLower() == "true")
+ {
+ g.FillRectangle(new SolidBrush(Color.FromArgb(RandomUtils.GetId(256), RandomUtils.GetId(256), RandomUtils.GetId(256))),
+ new Rectangle(RandomUtils.GetId(imageBg.Width - 30), RandomUtils.GetId(imageBg.Height - 30), 30, 30));
+ }
+ }
+
+ //string tempImgPath = Path.GetTempPath() + "\\" + RandomUtils.GetWordNumber(8).ToLower();
+ string tempImgPath = "C:\\tempImg\\" + RandomUtils.GetWordNumber(8).ToLower();
+ if (!Directory.Exists(tempImgPath))
+ Directory.CreateDirectory(tempImgPath);
+ string imgFullPath = tempImgPath + "\\" + EncrypUtil.GetMd5(img_url) + ".jpg";
+ imageBg.Save(imgFullPath, System.Drawing.Imaging.ImageFormat.Jpeg);
+
+ var apiUpImgFileRst = HttpUtils.WxApiUploadImgFile(imgFullPath, imageBg.Width, imageBg.Height, token);
+ if (string.IsNullOrEmpty(apiUpImgFileRst))
+ apiUpImgFileRst = "{\"code\":50002,\"msg\":\"图片传输超时\"}";
+
+ if (!is_keep_file)
+ {
+ try
+ {
+ // 删除文件夹及其所有内容
+ Directory.Delete(tempImgPath, true); // 第二个参数为true表示递归删除所有子文件夹和文件
+ }
+ catch (Exception ex)
+ {
+ }
+ }
+ return apiUpImgFileRst;
+ }
+ catch (Exception ex)
+ {
+ return "{\"code\":50001,\"msg\":\"上传图片失败:" + ex.Message + "\"}";
+ }
+
+ }
+ return "{\"code\":19999,\"msg\":\"输入为空\"}";
+ }
+
+ public string WxApiUploadImageBase64(string inputData, string imgBase64)
+ {
+ if (!string.IsNullOrEmpty(inputData))
+ {
+ var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
+ string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
+ if (time1 != EncrypUtil.Encryption(time))
+ return "{\"code\":50000,\"msg\":\"校验失败\"}";
+
+ string token = RegexUtils.GetStringQuery(ref inputData, "token")?.Replace("'", "\\'");
+ string img_url = RegexUtils.GetStringQuery(ref inputData, "img_url")?.Replace("'", "\\'");
+ bool is_keep_file = RegexUtils.GetStringQuery(ref inputData, "is_keep_file").ParseToBool();
+
+ try
+ {
+ byte[] imageBytes = Convert.FromBase64String(imgBase64);
+ using (MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length))
+ {
+ // 创建Image对象
+ Image imageBg = Image.FromStream(ms, true);
+
+ string tempImgPath = "C:\\tempImg\\" + RandomUtils.GetWordNumber(16).ToLower();
+ if (!Directory.Exists(tempImgPath))
+ Directory.CreateDirectory(tempImgPath);
+ string imgFullPath = tempImgPath + "\\" + EncrypUtil.GetMd5(img_url) + ".jpg";
+ imageBg.Save(imgFullPath, System.Drawing.Imaging.ImageFormat.Jpeg);
+
+ var apiUpImgFileRst = HttpUtils.WxApiUploadImgFile(imgFullPath, imageBg.Width, imageBg.Height, token);
+ if (string.IsNullOrEmpty(apiUpImgFileRst))
+ apiUpImgFileRst = "{\"code\":50002,\"msg\":\"图片传输超时\"}";
+
+ if (!is_keep_file)
+ {
+ try
+ {
+ // 删除文件夹及其所有内容
+ Directory.Delete(tempImgPath, true); // 第二个参数为true表示递归删除所有子文件夹和文件
+ }
+ catch (Exception ex)
+ {
+ }
+ }
+ return apiUpImgFileRst;
+ }
+ }
+ catch (Exception ex)
+ {
+ return "{\"code\":50001,\"msg\":\"上传图片失败:" + ex.Message + "\"}";
+ }
+
+ }
+ return "{\"code\":19999,\"msg\":\"输入为空\"}";
+ }
}
}
diff --git a/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs b/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs
index 3674e15..8c975a8 100644
--- a/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs
+++ b/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs
@@ -20,6 +20,9 @@ namespace KJD_Web.BLL.DYXD
{
var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'");
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
+ var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt();
+ if (version < 823)
+ return "{\"code\":1,\"msg\":\"当前版本过于陈旧,请立即升级新版\"}";
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
diff --git a/KJDService/KJD_WebService/BLL/KJD/ToolManage.cs b/KJDService/KJD_WebService/BLL/KJD/ToolManage.cs
index e13319b..ba1b975 100644
--- a/KJDService/KJD_WebService/BLL/KJD/ToolManage.cs
+++ b/KJDService/KJD_WebService/BLL/KJD/ToolManage.cs
@@ -88,84 +88,84 @@ namespace KJD_Web.BLL
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "";
- for (int i = 1; i <= 12; i++)
- {
+// for (int i = 1; i <= 12; i++)
+// {
- //sql = @"drop table if exists kjd_order.order_code_" + i + ";\r\n";
- sql = @"CREATE TABLE IF NOT EXISTS kjd_order.order_2026" + i.ToString("D2") + @" (
- `id` int NOT NULL AUTO_INCREMENT,
- `supplierId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '店铺Id',
- `supplierName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '店铺名称',
- `originalPurchaseOrderSn` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '备母货单号',
- `subPurchaseOrderSn` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '备货单号',
- `productName` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
- `category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
- `productId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品编号',
- `upProductId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '上家编号',
- `productSkcId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
- `productSkcPicture` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主图',
- `productSn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '货号',
- `status` int NOT NULL COMMENT '状态 1待发货 2已送货 7已入库 8已作废',
- `productSkuId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
- `extCode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'sku货号',
- `className` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'sku规格',
- `currencyType` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
- `supplierPrice` int NOT NULL COMMENT '申报价格',
- `costPrice` int DEFAULT NULL COMMENT '成本价',
- `deliveryFee` int DEFAULT NULL COMMENT '车队费',
- `markFee` int DEFAULT NULL COMMENT '贴标费',
- `purchaseQuantity` int NOT NULL COMMENT '备货件数',
- `deliverQuantity` int NOT NULL COMMENT '送货件数',
- `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数',
- `availableSaleDays` decimal(10, 0) DEFAULT NULL COMMENT '可售天数',
- `qcResult` int DEFAULT NULL COMMENT '抽检结果 1合格 2不合格',
- `thumbUrlList` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'sku图片',
- `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间',
- `deliverTime` bigint DEFAULT NULL COMMENT '发货时间',
- `receiveTime` bigint DEFAULT NULL COMMENT '收货时间',
- `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间',
- `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间',
- `deliveryOrderSn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '发货单号',
- `receiveWarehouseId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '实际收货仓库Id',
- `receiveWarehouseName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '实际收货仓库',
- `warehouseGroupId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '仓组Id',
- `jiaTongCode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '佳同码',
- `barCodeMd5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '商品条码MD5',
- `shippingMarkMd5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '箱唛文件MD5',
- `notes` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
- `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)',
- `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- UNIQUE KEY `index_subPurchaseOrderSn` (`subPurchaseOrderSn`) USING BTREE
-) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单推送表'";
+// //sql = @"drop table if exists kjd_order.order_code_" + i + ";\r\n";
+// sql = @"CREATE TABLE IF NOT EXISTS kjd_order.order_2026" + i.ToString("D2") + @" (
+// `id` int NOT NULL AUTO_INCREMENT,
+// `supplierId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '店铺Id',
+// `supplierName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '店铺名称',
+// `originalPurchaseOrderSn` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '备母货单号',
+// `subPurchaseOrderSn` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '备货单号',
+// `productName` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+// `category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+// `productId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品编号',
+// `upProductId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '上家编号',
+// `productSkcId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+// `productSkcPicture` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主图',
+// `productSn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '货号',
+// `status` int NOT NULL COMMENT '状态 1待发货 2已送货 7已入库 8已作废',
+// `productSkuId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+// `extCode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'sku货号',
+// `className` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'sku规格',
+// `currencyType` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+// `supplierPrice` int NOT NULL COMMENT '申报价格',
+// `costPrice` int DEFAULT NULL COMMENT '成本价',
+// `deliveryFee` int DEFAULT NULL COMMENT '车队费',
+// `markFee` int DEFAULT NULL COMMENT '贴标费',
+// `purchaseQuantity` int NOT NULL COMMENT '备货件数',
+// `deliverQuantity` int NOT NULL COMMENT '送货件数',
+// `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数',
+// `availableSaleDays` decimal(10, 0) DEFAULT NULL COMMENT '可售天数',
+// `qcResult` int DEFAULT NULL COMMENT '抽检结果 1合格 2不合格',
+// `thumbUrlList` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'sku图片',
+// `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间',
+// `deliverTime` bigint DEFAULT NULL COMMENT '发货时间',
+// `receiveTime` bigint DEFAULT NULL COMMENT '收货时间',
+// `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间',
+// `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间',
+// `deliveryOrderSn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '发货单号',
+// `receiveWarehouseId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '实际收货仓库Id',
+// `receiveWarehouseName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '实际收货仓库',
+// `warehouseGroupId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '仓组Id',
+// `jiaTongCode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '佳同码',
+// `barCodeMd5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '商品条码MD5',
+// `shippingMarkMd5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '箱唛文件MD5',
+// `notes` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
+// `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)',
+// `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+// `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+// PRIMARY KEY (`id`),
+// UNIQUE KEY `index_subPurchaseOrderSn` (`subPurchaseOrderSn`) USING BTREE
+//) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单推送表'";
- //sql = @"drop table if exists kjd_order.order_code_" + i + ";\r\n";
- sql = @"CREATE TABLE IF NOT EXISTS kjd_order.order_code_2026" + i.ToString("D2") + @" (
- `id` int unsigned NOT NULL AUTO_INCREMENT,
- `supplierId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
- `fileCodeMd5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
- `fileCodeBase64` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
- `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- UNIQUE KEY `index_fileCodeMd5` (`fileCodeMd5`) USING BTREE
-) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci";
+// //sql = @"drop table if exists kjd_order.order_code_" + i + ";\r\n";
+// sql = @"CREATE TABLE IF NOT EXISTS kjd_order.order_code_2026" + i.ToString("D2") + @" (
+// `id` int unsigned NOT NULL AUTO_INCREMENT,
+// `supplierId` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+// `fileCodeMd5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+// `fileCodeBase64` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+// `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+// `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+// PRIMARY KEY (`id`),
+// UNIQUE KEY `index_fileCodeMd5` (`fileCodeMd5`) USING BTREE
+//) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci";
- // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT 0 COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)',\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`";
- // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号',\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NOT NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMarkMd5`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`";
- // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号'\r\nAFTER\r\n `productSkuId`,\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NOT NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMarkMd5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`";
- // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `costPrice` int NULL COMMENT '成本价',\r\nADD\r\n COLUMN `deliveryFee` int NULL COMMENT '车队费',\r\nADD\r\n COLUMN `markFee` int NULL COMMENT '贴标费',\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `markFee`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NOT NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMarkMd5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`";
- // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `originalPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备母货单号'\r\nAFTER\r\n `supplierId`,\r\nMODIFY\r\n COLUMN `subPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备货单号'\r\nAFTER\r\n `originalPurchaseOrderSn`";
- // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`";
- // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `upProductId` varchar (25) NOT NULL COMMENT '上家编号',\r\nMODIFY\r\n COLUMN `productSkcId` varchar (25) NOT NULL\r\nAFTER\r\n `upProductId`,\r\nMODIFY\r\n COLUMN `productSkcPicture` varchar (250) NOT NULL COMMENT '主图'\r\nAFTER\r\n `productSkcId`,\r\nMODIFY\r\n COLUMN `productSn` varchar (50) NULL COMMENT '货号'\r\nAFTER\r\n `productSkcPicture`,\r\nMODIFY\r\n COLUMN `status` int NOT NULL COMMENT '状态 1待发货 2已送货 7已入库 8已作废'\r\nAFTER\r\n `productSn`,\r\nMODIFY\r\n COLUMN `productSkuId` varchar (25) NOT NULL\r\nAFTER\r\n `status`,\r\nMODIFY\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号'\r\nAFTER\r\n `productSkuId`,\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `costPrice` int NULL COMMENT '成本价'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliveryFee` int NULL COMMENT '车队费'\r\nAFTER\r\n `costPrice`,\r\nMODIFY\r\n COLUMN `markFee` int NULL COMMENT '贴标费'\r\nAFTER\r\n `deliveryFee`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `markFee`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMarkMd5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`";
- // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `upProductId` varchar (25) NULL COMMENT '上家编号'\r\nAFTER\r\n `productId`";
- // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `supplierName` varchar (50) NOT NULL COMMENT '店铺名称',\r\nMODIFY\r\n COLUMN `originalPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备母货单号'\r\nAFTER\r\n `supplierName`,\r\nMODIFY\r\n COLUMN `subPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备货单号'\r\nAFTER\r\n `originalPurchaseOrderSn`,\r\nMODIFY\r\n COLUMN `productName` varchar (1000) NOT NULL\r\nAFTER\r\n `subPurchaseOrderSn`,\r\nMODIFY\r\n COLUMN `category` varchar (50) NOT NULL\r\nAFTER\r\n `productName`,\r\nMODIFY\r\n COLUMN `productId` varchar (25) NOT NULL COMMENT '商品编号'\r\nAFTER\r\n `category`,\r\nMODIFY\r\n COLUMN `upProductId` varchar (25) NULL COMMENT '上家编号'\r\nAFTER\r\n `productId`,\r\nMODIFY\r\n COLUMN `productSkcId` varchar (25) NOT NULL\r\nAFTER\r\n `upProductId`,\r\nMODIFY\r\n COLUMN `productSkcPicture` varchar (250) NOT NULL COMMENT '主图'\r\nAFTER\r\n `productSkcId`,\r\nMODIFY\r\n COLUMN `productSn` varchar (50) NULL COMMENT '货号'\r\nAFTER\r\n `productSkcPicture`,\r\nMODIFY\r\n COLUMN `status` int NOT NULL COMMENT '状态 1待发货 2已送货 7已入库 8已作废'\r\nAFTER\r\n `productSn`,\r\nMODIFY\r\n COLUMN `productSkuId` varchar (25) NOT NULL\r\nAFTER\r\n `status`,\r\nMODIFY\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号'\r\nAFTER\r\n `productSkuId`,\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `costPrice` int NULL COMMENT '成本价'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliveryFee` int NULL COMMENT '车队费'\r\nAFTER\r\n `costPrice`,\r\nMODIFY\r\n COLUMN `markFee` int NULL COMMENT '贴标费'\r\nAFTER\r\n `deliveryFee`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `markFee`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMarkMd5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`";
+// // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT 0 COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)',\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`";
+// // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号',\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NOT NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMarkMd5`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`";
+// // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号'\r\nAFTER\r\n `productSkuId`,\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NOT NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMarkMd5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`";
+// // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `costPrice` int NULL COMMENT '成本价',\r\nADD\r\n COLUMN `deliveryFee` int NULL COMMENT '车队费',\r\nADD\r\n COLUMN `markFee` int NULL COMMENT '贴标费',\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `markFee`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NOT NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMarkMd5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`";
+// // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `originalPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备母货单号'\r\nAFTER\r\n `supplierId`,\r\nMODIFY\r\n COLUMN `subPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备货单号'\r\nAFTER\r\n `originalPurchaseOrderSn`";
+// // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`";
+// // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `upProductId` varchar (25) NOT NULL COMMENT '上家编号',\r\nMODIFY\r\n COLUMN `productSkcId` varchar (25) NOT NULL\r\nAFTER\r\n `upProductId`,\r\nMODIFY\r\n COLUMN `productSkcPicture` varchar (250) NOT NULL COMMENT '主图'\r\nAFTER\r\n `productSkcId`,\r\nMODIFY\r\n COLUMN `productSn` varchar (50) NULL COMMENT '货号'\r\nAFTER\r\n `productSkcPicture`,\r\nMODIFY\r\n COLUMN `status` int NOT NULL COMMENT '状态 1待发货 2已送货 7已入库 8已作废'\r\nAFTER\r\n `productSn`,\r\nMODIFY\r\n COLUMN `productSkuId` varchar (25) NOT NULL\r\nAFTER\r\n `status`,\r\nMODIFY\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号'\r\nAFTER\r\n `productSkuId`,\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `costPrice` int NULL COMMENT '成本价'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliveryFee` int NULL COMMENT '车队费'\r\nAFTER\r\n `costPrice`,\r\nMODIFY\r\n COLUMN `markFee` int NULL COMMENT '贴标费'\r\nAFTER\r\n `deliveryFee`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `markFee`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMarkMd5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`";
+// // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nMODIFY\r\n COLUMN `upProductId` varchar (25) NULL COMMENT '上家编号'\r\nAFTER\r\n `productId`";
+// // sql = "ALTER TABLE\r\n kjd_order.order_" + i + "\r\nADD\r\n COLUMN `supplierName` varchar (50) NOT NULL COMMENT '店铺名称',\r\nMODIFY\r\n COLUMN `originalPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备母货单号'\r\nAFTER\r\n `supplierName`,\r\nMODIFY\r\n COLUMN `subPurchaseOrderSn` varchar (25) NOT NULL COMMENT '备货单号'\r\nAFTER\r\n `originalPurchaseOrderSn`,\r\nMODIFY\r\n COLUMN `productName` varchar (1000) NOT NULL\r\nAFTER\r\n `subPurchaseOrderSn`,\r\nMODIFY\r\n COLUMN `category` varchar (50) NOT NULL\r\nAFTER\r\n `productName`,\r\nMODIFY\r\n COLUMN `productId` varchar (25) NOT NULL COMMENT '商品编号'\r\nAFTER\r\n `category`,\r\nMODIFY\r\n COLUMN `upProductId` varchar (25) NULL COMMENT '上家编号'\r\nAFTER\r\n `productId`,\r\nMODIFY\r\n COLUMN `productSkcId` varchar (25) NOT NULL\r\nAFTER\r\n `upProductId`,\r\nMODIFY\r\n COLUMN `productSkcPicture` varchar (250) NOT NULL COMMENT '主图'\r\nAFTER\r\n `productSkcId`,\r\nMODIFY\r\n COLUMN `productSn` varchar (50) NULL COMMENT '货号'\r\nAFTER\r\n `productSkcPicture`,\r\nMODIFY\r\n COLUMN `status` int NOT NULL COMMENT '状态 1待发货 2已送货 7已入库 8已作废'\r\nAFTER\r\n `productSn`,\r\nMODIFY\r\n COLUMN `productSkuId` varchar (25) NOT NULL\r\nAFTER\r\n `status`,\r\nMODIFY\r\n COLUMN `extCode` varchar (50) NOT NULL COMMENT 'sku货号'\r\nAFTER\r\n `productSkuId`,\r\nMODIFY\r\n COLUMN `className` varchar (100) NOT NULL COMMENT 'sku规格'\r\nAFTER\r\n `extCode`,\r\nMODIFY\r\n COLUMN `currencyType` varchar (10) NOT NULL\r\nAFTER\r\n `className`,\r\nMODIFY\r\n COLUMN `supplierPrice` int NOT NULL COMMENT '申报价格'\r\nAFTER\r\n `currencyType`,\r\nMODIFY\r\n COLUMN `costPrice` int NULL COMMENT '成本价'\r\nAFTER\r\n `supplierPrice`,\r\nMODIFY\r\n COLUMN `deliveryFee` int NULL COMMENT '车队费'\r\nAFTER\r\n `costPrice`,\r\nMODIFY\r\n COLUMN `markFee` int NULL COMMENT '贴标费'\r\nAFTER\r\n `deliveryFee`,\r\nMODIFY\r\n COLUMN `purchaseQuantity` int NOT NULL COMMENT '备货件数'\r\nAFTER\r\n `markFee`,\r\nMODIFY\r\n COLUMN `deliverQuantity` int NOT NULL COMMENT '送货件数'\r\nAFTER\r\n `purchaseQuantity`,\r\nMODIFY\r\n COLUMN `realReceiveAuthenticQuantity` int NOT NULL COMMENT '入库件数'\r\nAFTER\r\n `deliverQuantity`,\r\nMODIFY\r\n COLUMN `availableSaleDays` decimal (10, 0) NULL COMMENT '可售天数'\r\nAFTER\r\n `realReceiveAuthenticQuantity`,\r\nMODIFY\r\n COLUMN `qcResult` int NULL COMMENT '抽检结果 1合格 2不合格'\r\nAFTER\r\n `availableSaleDays`,\r\nMODIFY\r\n COLUMN `thumbUrlList` varchar (500) NULL COMMENT 'sku图片'\r\nAFTER\r\n `qcResult`,\r\nMODIFY\r\n COLUMN `purchaseTime` bigint NOT NULL COMMENT '备货单创建时间'\r\nAFTER\r\n `thumbUrlList`,\r\nMODIFY\r\n COLUMN `deliverTime` bigint NULL COMMENT '发货时间'\r\nAFTER\r\n `purchaseTime`,\r\nMODIFY\r\n COLUMN `receiveTime` bigint NULL COMMENT '收货时间'\r\nAFTER\r\n `deliverTime`,\r\nMODIFY\r\n COLUMN `expectLatestDeliverTimeOrDefault` bigint NOT NULL COMMENT '最迟发货时间'\r\nAFTER\r\n `receiveTime`,\r\nMODIFY\r\n COLUMN `expectLatestArrivalTimeOrDefault` bigint NOT NULL COMMENT '最迟到货时间'\r\nAFTER\r\n `expectLatestDeliverTimeOrDefault`,\r\nMODIFY\r\n COLUMN `deliveryOrderSn` varchar (50) NULL COMMENT '发货单号'\r\nAFTER\r\n `expectLatestArrivalTimeOrDefault`,\r\nMODIFY\r\n COLUMN `receiveWarehouseId` varchar (25) NULL COMMENT '实际收货仓库Id'\r\nAFTER\r\n `deliveryOrderSn`,\r\nMODIFY\r\n COLUMN `receiveWarehouseName` varchar (50) NULL COMMENT '实际收货仓库'\r\nAFTER\r\n `receiveWarehouseId`,\r\nMODIFY\r\n COLUMN `warehouseGroupId` varchar (25) NULL COMMENT '仓组Id'\r\nAFTER\r\n `receiveWarehouseName`,\r\nMODIFY\r\n COLUMN `jiaTongCode` varchar (50) NULL COMMENT '佳同码'\r\nAFTER\r\n `warehouseGroupId`,\r\nMODIFY\r\n COLUMN `barCodeMd5` varchar (32) NULL COMMENT '商品条码MD5'\r\nAFTER\r\n `jiaTongCode`,\r\nMODIFY\r\n COLUMN `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'\r\nAFTER\r\n `barCodeMd5`,\r\nMODIFY\r\n COLUMN `notes` varchar (50) NULL COMMENT '备注'\r\nAFTER\r\n `shippingMarkMd5`,\r\nMODIFY\r\n COLUMN `upLoadStatus` int NOT NULL DEFAULT '0' COMMENT '是否上传订单(上传后扣除用户授权金额,产生扣费记录)'\r\nAFTER\r\n `notes`,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `upLoadStatus`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`";
- // sql = "ALTER TABLE\r\n kjd_order.order_" + i + " CHANGE COLUMN `shippingMarkMd5` `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'";
- // sql = "ALTER TABLE\r\n kjd_order.order_code_" + i + " DROP COLUMN `subPurchaseOrderSn`,\r\n DROP COLUMN `jiaTongCode`,\r\n DROP COLUMN `shippingMarkMd5`,\r\n DROP COLUMN `shippingMarkBase64`,\r\n CHANGE COLUMN `barCodeMd5` `fileCodeMd5` varchar (32) NOT NULL,\r\n CHANGE COLUMN `barCodeBase64` `fileCodeBase64` longtext NOT NULL,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `fileCodeBase64`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`,\r\n DROP INDEX `index_subPurchaseOrderSn`,\r\nADD\r\n UNIQUE `index_fileCodeMd5` USING btree (`fileCodeMd5`)";
- var rst = mySql.ExecuteNonQuery(sql);
- }
+// // sql = "ALTER TABLE\r\n kjd_order.order_" + i + " CHANGE COLUMN `shippingMarkMd5` `shippingMarkMd5` varchar (32) NULL COMMENT '箱唛文件MD5'";
+// // sql = "ALTER TABLE\r\n kjd_order.order_code_" + i + " DROP COLUMN `subPurchaseOrderSn`,\r\n DROP COLUMN `jiaTongCode`,\r\n DROP COLUMN `shippingMarkMd5`,\r\n DROP COLUMN `shippingMarkBase64`,\r\n CHANGE COLUMN `barCodeMd5` `fileCodeMd5` varchar (32) NOT NULL,\r\n CHANGE COLUMN `barCodeBase64` `fileCodeBase64` longtext NOT NULL,\r\nMODIFY\r\n COLUMN `add_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP\r\nAFTER\r\n `fileCodeBase64`,\r\nMODIFY\r\n COLUMN `mdy_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\r\nAFTER\r\n `add_time`,\r\n DROP INDEX `index_subPurchaseOrderSn`,\r\nADD\r\n UNIQUE `index_fileCodeMd5` USING btree (`fileCodeMd5`)";
+// var rst = mySql.ExecuteNonQuery(sql);
+ //}
mySql.Close();
}
}
diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs
index 48d3e35..d4f512c 100644
--- a/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs
+++ b/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs
@@ -590,7 +590,7 @@ namespace KJD_Web.BLL.WXXD
string new_shop_id = RegexUtils.GetStringQuery(ref inputData, "new_shop_id");
string old_shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id");
string shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account");
- string group_name = RegexUtils.GetStringQuery(ref inputData, "group_name");
+ string group_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "group_name"));
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"));
string login_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status"));
diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs
index 33fabd1..4818011 100644
--- a/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs
+++ b/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs
@@ -20,6 +20,9 @@ namespace KJD_Web.BLL.WXXD
{
var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'");
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
+ var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt();
+ if (version < 823)
+ return "{\"code\":1,\"msg\":\"当前版本过于陈旧,请立即升级新版\"}";
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj b/KJDService/KJD_WebService/KJD_WebService.csproj
index d7301ac..56716f8 100644
--- a/KJDService/KJD_WebService/KJD_WebService.csproj
+++ b/KJDService/KJD_WebService/KJD_WebService.csproj
@@ -58,6 +58,7 @@
..\Dll\Newtonsoft.Json.dll
+
@@ -115,6 +116,7 @@
+
WXProductService.asmx
Component
diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj.user b/KJDService/KJD_WebService/KJD_WebService.csproj.user
index c789fae..4bcdc04 100644
--- a/KJDService/KJD_WebService/KJD_WebService.csproj.user
+++ b/KJDService/KJD_WebService/KJD_WebService.csproj.user
@@ -1,4 +1,4 @@
-
+
true
diff --git a/KJDService/KJD_WebService/Utils/HttpUtils.cs b/KJDService/KJD_WebService/Utils/HttpUtils.cs
index b2cea6e..1a1b678 100644
--- a/KJDService/KJD_WebService/Utils/HttpUtils.cs
+++ b/KJDService/KJD_WebService/Utils/HttpUtils.cs
@@ -1,10 +1,16 @@
-using System;
+using NaiBa.Util.Extension;
+using System;
using System.Collections.Generic;
+using System.Drawing;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
+using System.Net.Http;
+using System.Security.Cryptography;
using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
using System.Web;
namespace KJD_Web.Utils
@@ -22,7 +28,7 @@ namespace KJD_Web.Utils
request.KeepAlive = true;
request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0");
- request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36";
+ request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
request.ContentType = "application/json";
request.Accept = "*/*";
request.Referer = referer;
@@ -71,7 +77,7 @@ namespace KJD_Web.Utils
request.KeepAlive = true;
request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0");
- request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36";
+ request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
request.ContentType = "application/json";
request.Accept = "*/*";
request.Referer = referer;
@@ -121,7 +127,7 @@ namespace KJD_Web.Utils
request.KeepAlive = true;
request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0");
- request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36";
+ request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
request.ContentType = "application/json";
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"; //request.Accept = "*/*";
request.Referer = referer;
@@ -234,5 +240,140 @@ namespace KJD_Web.Utils
}
}
}
+ public static void WriteMultipartBodyToRequest(HttpWebRequest request, string body)
+ {
+ string[] multiparts = Regex.Split(body, @"");
+ byte[] bytes;
+ using (MemoryStream ms = new MemoryStream())
+ {
+ foreach (string part in multiparts)
+ {
+ if (File.Exists(part))
+ {
+ bytes = File.ReadAllBytes(part);
+ }
+ else
+ {
+ bytes = System.Text.Encoding.UTF8.GetBytes(part.Replace("\r\n", "\n").Replace("\r", "\n").Replace("\n", "\r\n"));
+ }
+
+ ms.Write(bytes, 0, bytes.Length);
+ }
+
+ request.ContentLength = ms.Length;
+ using (Stream stream = request.GetRequestStream())
+ {
+ ms.WriteTo(stream);
+ }
+ }
+ }
+
+ ///
+ /// 读取网络图片转为Img以在DataGridView中显示,用于HttpWebRequest直接读取可能403的情况
+ ///
+ ///
+ ///
+ ///
+ public static Image GetUrlImg(string imgUrl, out string rst)
+ {
+ rst = "";
+ //return LoadImage(imgUrl);
+ Image image = null;
+ HttpWebResponse response = null;
+ try
+ {
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(imgUrl);
+
+ request.KeepAlive = true;
+ request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0");
+ request.Headers.Add("Upgrade-Insecure-Requests", @"1");
+ request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
+ request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7";
+ request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate");
+ request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9");
+ //request.IfModifiedSince = DateTime.Parse("Fri, 18 Jul 2025 06:00:49 GMT"); // 没改动不更新,CS程序无缓存不使用
+
+ response = (HttpWebResponse)request.GetResponse();
+
+ using (Stream stream = response.GetResponseStream())
+ {
+ image = Image.FromStream(stream);
+ }
+ }
+ catch (WebException ex)
+ {
+ if (ex.Status == WebExceptionStatus.ProtocolError)
+ {
+ response = (HttpWebResponse)ex.Response;
+ rst = ReadResponse(response);
+ }
+ if (string.IsNullOrEmpty(rst))
+ rst = ex.Message;
+ }
+ catch (Exception e)
+ {
+ rst = e.Message;
+ }
+ if (response != null)
+ {
+ response.Close();
+ response.Dispose();
+ }
+ return image;
+ }
+
+ public static string WxApiUploadImgFile(string filePath, int width, int height, string accessToken)
+ {
+ string boundary = "----WebKitFormBoundaryeZuqpVO6jYOF5Y6S";
+ HttpWebResponse response = null;
+ string result;
+ try
+ {
+ string url = "https://api.weixin.qq.com/shop/ec/basics/img/upload?access_token=" + accessToken +
+ "&upload_type=0&resp_type=1&height=" + height + "&width=" + width;
+
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
+
+ request.KeepAlive = true;
+ request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0");
+ request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
+ request.ContentType = "multipart/form-data; boundary=" + boundary;
+ request.Accept = "*/*";
+ request.Referer = "";
+ request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate");
+ request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9");
+
+ request.Method = "POST";
+ request.ServicePoint.Expect100Continue = false;
+
+ string body = @"--" + boundary + @"
+Content-Disposition: form-data; name=""media""; filename=""" + Path.GetFileName(filePath) + @"""
+Content-Type: image/jpg
+
+" + filePath + @"
+--" + boundary + @"--
+";
+ WriteMultipartBodyToRequest(request, body);
+
+ response = (HttpWebResponse)request.GetResponse();
+ }
+ catch (WebException ex)
+ {
+ if (ex.Status == WebExceptionStatus.ProtocolError)
+ {
+ response = (HttpWebResponse)ex.Response;
+ result = ReadResponse(response);
+ return result;
+ }
+ else return ex.Message;
+ }
+ catch (Exception e)
+ {
+ if (response != null) response.Close();
+ return e.Message;
+ }
+ result = ReadResponse(response);
+ return result;
+ }
}
}
\ No newline at end of file
diff --git a/KJDService/KJD_WebService/Utils/RandomUtils.cs b/KJDService/KJD_WebService/Utils/RandomUtils.cs
new file mode 100644
index 0000000..917509a
--- /dev/null
+++ b/KJDService/KJD_WebService/Utils/RandomUtils.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web;
+
+namespace KJD_Web.Utils
+{
+ public class RandomUtils
+ {
+ public static string WordBase = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz";
+ public static string NumberBase = "0123456789";
+ public static string WordNumberBase = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz01234567890123456789";
+ public static string SignWordBase = ".`~^*_| -#$%&?+";//".`~^*_| -#$%&?";
+
+ public static int GetId(int max)
+ {
+ return new Random(Guid.NewGuid().GetHashCode()).Next(0, max);
+ }
+
+ public static int GetId(int min, int max)
+ {
+ return new Random(Guid.NewGuid().GetHashCode()).Next(min, max);
+ }
+
+ public static string GetWord(int len)
+ {
+ StringBuilder s = new StringBuilder();
+ for (int i = 0; i < len; i++)
+ {
+ s.Append(WordBase[new Random(Guid.NewGuid().GetHashCode()).Next(WordBase.Length)]);
+ }
+ return s.ToString();
+ }
+ public static string GetNumber(int len)
+ {
+ StringBuilder s = new StringBuilder();
+ for (int i = 0; i < len; i++)
+ {
+ s.Append(NumberBase[new Random(Guid.NewGuid().GetHashCode()).Next(NumberBase.Length)]);
+ }
+ return s.ToString();
+ }
+ public static string GetWordNumber(int len)
+ {
+ StringBuilder s = new StringBuilder();
+ for (int i = 0; i < len; i++)
+ {
+ s.Append(WordNumberBase[new Random(Guid.NewGuid().GetHashCode()).Next(WordNumberBase.Length)]);
+ }
+ return s.ToString();
+ }
+ ///
+ /// 获取新的属性名称
+ ///
+ ///
+ ///
+ public static string GetNewProp(bool begin, string name)
+ {
+ char w = SignWordBase[new Random(Guid.NewGuid().GetHashCode()).Next(SignWordBase.Length)];
+ char add = SignWordBase[new Random(Guid.NewGuid().GetHashCode()).Next(SignWordBase.Length)];
+ if (begin)
+ name += "" + w + add;
+ else
+ name = "" + add + w + "" + name;
+ return name;
+ }
+ }
+}
\ No newline at end of file
diff --git a/TEMUKJD/BLL/PDDProdFormConverter.cs b/TEMUKJD/BLL/PDDProdFormConverter.cs
index 525fa8a..e099485 100644
--- a/TEMUKJD/BLL/PDDProdFormConverter.cs
+++ b/TEMUKJD/BLL/PDDProdFormConverter.cs
@@ -651,6 +651,12 @@ namespace TemuKJD.BLL
shipment_limit_second_list = null,
sku69_code = "",
};
+ // 供应商价加价10%(最低1元)赚取差价
+ int addPrice = (skuInfo.multi_price * 0.1).ParseToInt();
+ if (addPrice < 100)
+ addPrice = 100;
+ skuInfo.multi_price += addPrice;
+ skuInfo.price += addPrice;
foreach (JObject jSpec in jSku["skus"])
{
skuInfo.spec.Add(new spec_item()
diff --git a/TEMUKJD/Extension/ControlExtension.cs b/TEMUKJD/Extension/ControlExtension.cs
new file mode 100644
index 0000000..5bdd2cc
--- /dev/null
+++ b/TEMUKJD/Extension/ControlExtension.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace TemuKJD.Extension
+{
+ public static class ControlExtension
+ {
+ public static Point GetRelativePosition(this Control control, Form form)
+ {
+ Point location = control.Location;
+ Control parent = control.Parent;
+ while (parent != null && parent != form)
+ {
+ location.X += parent.Location.X;
+ location.Y += parent.Location.Y;
+ parent = parent.Parent;
+ }
+ return location;
+ }
+ public static Point GetRelativePosition(this Control control)
+ {
+ Point location = control.Location;
+ Control parent = control.Parent;
+ while (parent != null && !(parent is Form))
+ {
+ location.X += parent.Location.X;
+ location.Y += parent.Location.Y;
+ parent = parent.Parent;
+ }
+ return location;
+ }
+ }
+}
diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj
index 911581d..07a0600 100644
--- a/TEMUKJD/KJD.csproj
+++ b/TEMUKJD/KJD.csproj
@@ -136,6 +136,7 @@
ChangeForm.cs
+
Form
diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs
index 93b72bd..be70cfa 100644
--- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs
+++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs
@@ -29,8 +29,6 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
@@ -40,6 +38,8 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProductThirdSelectListManageForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.numMaxWaitSecond = new System.Windows.Forms.NumericUpDown();
@@ -118,16 +118,6 @@
this.chkUseGlobalFissionSetting = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkNoSubSa = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
- this.pbLoading = new System.Windows.Forms.PictureBox();
- this.panel2 = new System.Windows.Forms.Panel();
- this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
- this.dgvMapDraftIds = new TemuKJD.UserComponent.DataGridViewEx();
- this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
- this.colMapId = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.colMapShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.colMapDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
- this.colToPorductPage = new System.Windows.Forms.DataGridViewLinkColumn();
- this.colToDraftPage = new System.Windows.Forms.DataGridViewLinkColumn();
this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -156,6 +146,16 @@
this.colEditNotes = new System.Windows.Forms.DataGridViewLinkColumn();
this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.pbLoading = new System.Windows.Forms.PictureBox();
+ this.panel2 = new System.Windows.Forms.Panel();
+ this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
+ this.dgvMapDraftIds = new TemuKJD.UserComponent.DataGridViewEx();
+ this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+ this.colMapId = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.colMapShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.colMapDraftId = new System.Windows.Forms.DataGridViewLinkColumn();
+ this.colToPorductPage = new System.Windows.Forms.DataGridViewLinkColumn();
+ this.colToDraftPage = new System.Windows.Forms.DataGridViewLinkColumn();
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -183,10 +183,10 @@
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvMapDraftIds)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
@@ -1127,7 +1127,7 @@
this.cmbSearchYear.Items.AddRange(new object[] {
"2025",
"2026"});
- this.cmbSearchYear.Location = new System.Drawing.Point(1017, 8);
+ this.cmbSearchYear.Location = new System.Drawing.Point(1017, 11);
this.cmbSearchYear.Margin = new System.Windows.Forms.Padding(0);
this.cmbSearchYear.Name = "cmbSearchYear";
this.cmbSearchYear.Size = new System.Drawing.Size(55, 25);
@@ -1142,7 +1142,7 @@
"全部",
"重上",
"已买"});
- this.cmbUserNotes.Location = new System.Drawing.Point(927, 8);
+ this.cmbUserNotes.Location = new System.Drawing.Point(927, 11);
this.cmbUserNotes.Margin = new System.Windows.Forms.Padding(0);
this.cmbUserNotes.Name = "cmbUserNotes";
this.cmbUserNotes.Size = new System.Drawing.Size(52, 25);
@@ -1159,7 +1159,7 @@
"核价成功",
"核价成功(重复)",
"重复"});
- this.cmbNotes.Location = new System.Drawing.Point(813, 8);
+ this.cmbNotes.Location = new System.Drawing.Point(813, 11);
this.cmbNotes.Margin = new System.Windows.Forms.Padding(0);
this.cmbNotes.Name = "cmbNotes";
this.cmbNotes.Size = new System.Drawing.Size(52, 25);
@@ -1186,7 +1186,7 @@
"已上传",
"草稿箱",
"全部"});
- this.cmbStatus.Location = new System.Drawing.Point(723, 8);
+ this.cmbStatus.Location = new System.Drawing.Point(723, 11);
this.cmbStatus.Margin = new System.Windows.Forms.Padding(0);
this.cmbStatus.Name = "cmbStatus";
this.cmbStatus.Size = new System.Drawing.Size(52, 25);
@@ -1405,141 +1405,6 @@
this.splitContainer2.SplitterDistance = 485;
this.splitContainer2.TabIndex = 0;
//
- // pbLoading
- //
- this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
- this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
- this.pbLoading.Location = new System.Drawing.Point(734, 215);
- this.pbLoading.Name = "pbLoading";
- this.pbLoading.Size = new System.Drawing.Size(50, 50);
- this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.pbLoading.TabIndex = 7;
- this.pbLoading.TabStop = false;
- //
- // panel2
- //
- this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top;
- this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.panel2.Controls.Add(this.panelEx1);
- this.panel2.Controls.Add(this.dgvMapDraftIds);
- this.panel2.Location = new System.Drawing.Point(661, 69);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(196, 341);
- this.panel2.TabIndex = 191;
- this.panel2.Visible = false;
- //
- // panelEx1
- //
- this.panelEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
- this.panelEx1.Cursor = System.Windows.Forms.Cursors.Hand;
- this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
- this.panelEx1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.panelEx1.Location = new System.Drawing.Point(151, 313);
- this.panelEx1.Name = "panelEx1";
- this.panelEx1.Size = new System.Drawing.Size(42, 24);
- this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
- this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- this.panelEx1.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
- this.panelEx1.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
- this.panelEx1.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
- this.panelEx1.Style.ForeColor.Color = System.Drawing.Color.White;
- this.panelEx1.Style.GradientAngle = 90;
- this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
- this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
- this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
- this.panelEx1.TabIndex = 453;
- this.panelEx1.Text = "关闭";
- this.panelEx1.Click += new System.EventHandler(this.btnCloseDgvMapDraftIds_Click);
- //
- // dgvMapDraftIds
- //
- this.dgvMapDraftIds.AllowUserToAddRows = false;
- this.dgvMapDraftIds.AllowUserToDeleteRows = false;
- dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke;
- this.dgvMapDraftIds.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
- this.dgvMapDraftIds.AutoRowNumber = true;
- this.dgvMapDraftIds.BackgroundColor = System.Drawing.Color.White;
- this.dgvMapDraftIds.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
- dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.dgvMapDraftIds.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
- this.dgvMapDraftIds.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- this.dgvMapDraftIds.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
- this.dataGridViewCheckBoxColumn1,
- this.colMapId,
- this.colMapShopId,
- this.colMapDraftId,
- this.colToPorductPage,
- this.colToDraftPage});
- this.dgvMapDraftIds.Location = new System.Drawing.Point(1, 1);
- this.dgvMapDraftIds.Name = "dgvMapDraftIds";
- this.dgvMapDraftIds.ReadOnly = true;
- this.dgvMapDraftIds.RowHeadersWidth = 40;
- this.dgvMapDraftIds.RowTemplate.Height = 23;
- this.dgvMapDraftIds.Size = new System.Drawing.Size(192, 310);
- this.dgvMapDraftIds.TabIndex = 192;
- this.dgvMapDraftIds.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDraftIds_CellContentClick);
- //
- // dataGridViewCheckBoxColumn1
- //
- this.dataGridViewCheckBoxColumn1.HeaderText = "选择";
- this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
- this.dataGridViewCheckBoxColumn1.ReadOnly = true;
- this.dataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
- this.dataGridViewCheckBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
- this.dataGridViewCheckBoxColumn1.Visible = false;
- this.dataGridViewCheckBoxColumn1.Width = 30;
- //
- // colMapId
- //
- this.colMapId.HeaderText = "映射Id";
- this.colMapId.Name = "colMapId";
- this.colMapId.ReadOnly = true;
- this.colMapId.Visible = false;
- this.colMapId.Width = 125;
- //
- // colMapShopId
- //
- this.colMapShopId.HeaderText = "映射店铺Id";
- this.colMapShopId.Name = "colMapShopId";
- this.colMapShopId.ReadOnly = true;
- this.colMapShopId.Visible = false;
- this.colMapShopId.Width = 120;
- //
- // colMapDraftId
- //
- this.colMapDraftId.HeaderText = "已上传商品ID";
- this.colMapDraftId.Name = "colMapDraftId";
- this.colMapDraftId.ReadOnly = true;
- this.colMapDraftId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
- this.colMapDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
- this.colMapDraftId.Width = 120;
- //
- // colToPorductPage
- //
- this.colToPorductPage.HeaderText = "访问商品页";
- this.colToPorductPage.Name = "colToPorductPage";
- this.colToPorductPage.ReadOnly = true;
- this.colToPorductPage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
- this.colToPorductPage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
- this.colToPorductPage.Visible = false;
- this.colToPorductPage.Width = 62;
- //
- // colToDraftPage
- //
- this.colToDraftPage.HeaderText = "访问草稿页";
- this.colToDraftPage.Name = "colToDraftPage";
- this.colToDraftPage.ReadOnly = true;
- this.colToDraftPage.Visible = false;
- this.colToDraftPage.Width = 38;
- //
// dgvSelectProduct
//
this.dgvSelectProduct.AllowUserToAddRows = false;
@@ -1818,6 +1683,141 @@
this.colOpResult.ReadOnly = true;
this.colOpResult.Width = 150;
//
+ // pbLoading
+ //
+ this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
+ this.pbLoading.Location = new System.Drawing.Point(734, 215);
+ this.pbLoading.Name = "pbLoading";
+ this.pbLoading.Size = new System.Drawing.Size(50, 50);
+ this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.pbLoading.TabIndex = 7;
+ this.pbLoading.TabStop = false;
+ //
+ // panel2
+ //
+ this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top;
+ this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panel2.Controls.Add(this.panelEx1);
+ this.panel2.Controls.Add(this.dgvMapDraftIds);
+ this.panel2.Location = new System.Drawing.Point(661, 69);
+ this.panel2.Name = "panel2";
+ this.panel2.Size = new System.Drawing.Size(196, 341);
+ this.panel2.TabIndex = 191;
+ this.panel2.Visible = false;
+ //
+ // panelEx1
+ //
+ this.panelEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.panelEx1.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
+ this.panelEx1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.panelEx1.Location = new System.Drawing.Point(151, 313);
+ this.panelEx1.Name = "panelEx1";
+ this.panelEx1.Size = new System.Drawing.Size(42, 24);
+ this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
+ this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ this.panelEx1.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+ this.panelEx1.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+ this.panelEx1.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
+ this.panelEx1.Style.ForeColor.Color = System.Drawing.Color.White;
+ this.panelEx1.Style.GradientAngle = 90;
+ this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
+ this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
+ this.panelEx1.TabIndex = 453;
+ this.panelEx1.Text = "关闭";
+ this.panelEx1.Click += new System.EventHandler(this.btnCloseDgvMapDraftIds_Click);
+ //
+ // dgvMapDraftIds
+ //
+ this.dgvMapDraftIds.AllowUserToAddRows = false;
+ this.dgvMapDraftIds.AllowUserToDeleteRows = false;
+ dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.dgvMapDraftIds.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
+ this.dgvMapDraftIds.AutoRowNumber = true;
+ this.dgvMapDraftIds.BackgroundColor = System.Drawing.Color.White;
+ this.dgvMapDraftIds.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
+ dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
+ dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dgvMapDraftIds.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
+ this.dgvMapDraftIds.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dgvMapDraftIds.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.dataGridViewCheckBoxColumn1,
+ this.colMapId,
+ this.colMapShopId,
+ this.colMapDraftId,
+ this.colToPorductPage,
+ this.colToDraftPage});
+ this.dgvMapDraftIds.Location = new System.Drawing.Point(1, 1);
+ this.dgvMapDraftIds.Name = "dgvMapDraftIds";
+ this.dgvMapDraftIds.ReadOnly = true;
+ this.dgvMapDraftIds.RowHeadersWidth = 40;
+ this.dgvMapDraftIds.RowTemplate.Height = 23;
+ this.dgvMapDraftIds.Size = new System.Drawing.Size(192, 310);
+ this.dgvMapDraftIds.TabIndex = 192;
+ this.dgvMapDraftIds.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDraftIds_CellContentClick);
+ //
+ // dataGridViewCheckBoxColumn1
+ //
+ this.dataGridViewCheckBoxColumn1.HeaderText = "选择";
+ this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
+ this.dataGridViewCheckBoxColumn1.ReadOnly = true;
+ this.dataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+ this.dataGridViewCheckBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+ this.dataGridViewCheckBoxColumn1.Visible = false;
+ this.dataGridViewCheckBoxColumn1.Width = 30;
+ //
+ // colMapId
+ //
+ this.colMapId.HeaderText = "映射Id";
+ this.colMapId.Name = "colMapId";
+ this.colMapId.ReadOnly = true;
+ this.colMapId.Visible = false;
+ this.colMapId.Width = 125;
+ //
+ // colMapShopId
+ //
+ this.colMapShopId.HeaderText = "映射店铺Id";
+ this.colMapShopId.Name = "colMapShopId";
+ this.colMapShopId.ReadOnly = true;
+ this.colMapShopId.Visible = false;
+ this.colMapShopId.Width = 120;
+ //
+ // colMapDraftId
+ //
+ this.colMapDraftId.HeaderText = "已上传商品ID";
+ this.colMapDraftId.Name = "colMapDraftId";
+ this.colMapDraftId.ReadOnly = true;
+ this.colMapDraftId.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+ this.colMapDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+ this.colMapDraftId.Width = 120;
+ //
+ // colToPorductPage
+ //
+ this.colToPorductPage.HeaderText = "访问商品页";
+ this.colToPorductPage.Name = "colToPorductPage";
+ this.colToPorductPage.ReadOnly = true;
+ this.colToPorductPage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+ this.colToPorductPage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+ this.colToPorductPage.Visible = false;
+ this.colToPorductPage.Width = 62;
+ //
+ // colToDraftPage
+ //
+ this.colToDraftPage.HeaderText = "访问草稿页";
+ this.colToDraftPage.Name = "colToDraftPage";
+ this.colToDraftPage.ReadOnly = true;
+ this.colToDraftPage.Visible = false;
+ this.colToDraftPage.Width = 38;
+ //
// ucSplitPage1
//
this.ucSplitPage1.CurrentPage = 1;
@@ -1884,10 +1884,10 @@
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvMapDraftIds)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit();
this.ResumeLayout(false);
}
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.Designer.cs
index 89a7649..341555c 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.Designer.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.Designer.cs
@@ -54,20 +54,18 @@
this.label8 = new System.Windows.Forms.Label();
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnOk = new TemuKJD.UserControls.ButtonEx();
+ this.pnlSkuOption = new System.Windows.Forms.Panel();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ this.pnlSkuOption.SuspendLayout();
this.SuspendLayout();
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
- this.panel2.Controls.Add(this.btnBookImg);
- this.panel2.Controls.Add(this.btnEditDetail);
- this.panel2.Controls.Add(this.btnSelect);
- this.panel2.Controls.Add(this.buttonEx1);
- this.panel2.Controls.Add(this.pictureBox2);
- this.panel2.Controls.Add(this.label9);
+ 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);
@@ -85,7 +83,6 @@
this.panel2.Controls.Add(this.pictureBox1);
this.panel2.Controls.Add(this.label8);
this.panel2.Controls.Add(this.txtNotes);
- this.panel2.Controls.Add(this.btnOk);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
@@ -98,7 +95,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(341, 523);
+ this.btnBookImg.Location = new System.Drawing.Point(332, 37);
this.btnBookImg.Name = "btnBookImg";
this.btnBookImg.Size = new System.Drawing.Size(85, 26);
this.btnBookImg.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -123,7 +120,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(341, 491);
+ this.btnEditDetail.Location = new System.Drawing.Point(332, 5);
this.btnEditDetail.Name = "btnEditDetail";
this.btnEditDetail.Size = new System.Drawing.Size(85, 26);
this.btnEditDetail.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -143,13 +140,12 @@
//
// btnSelect
//
- this.btnSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSelect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSelect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSelect.ForeColor = System.Drawing.Color.White;
- this.btnSelect.Location = new System.Drawing.Point(90, 491);
+ this.btnSelect.Location = new System.Drawing.Point(79, 5);
this.btnSelect.Margin = new System.Windows.Forms.Padding(2);
this.btnSelect.Name = "btnSelect";
this.btnSelect.Size = new System.Drawing.Size(70, 26);
@@ -160,13 +156,12 @@
//
// buttonEx1
//
- this.buttonEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonEx1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.buttonEx1.Cursor = System.Windows.Forms.Cursors.Hand;
this.buttonEx1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonEx1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.buttonEx1.ForeColor = System.Drawing.Color.White;
- this.buttonEx1.Location = new System.Drawing.Point(90, 600);
+ this.buttonEx1.Location = new System.Drawing.Point(79, 114);
this.buttonEx1.Margin = new System.Windows.Forms.Padding(2);
this.buttonEx1.Name = "buttonEx1";
this.buttonEx1.Size = new System.Drawing.Size(70, 26);
@@ -178,8 +173,7 @@
//
// pictureBox2
//
- this.pictureBox2.Anchor = System.Windows.Forms.AnchorStyles.Top;
- this.pictureBox2.Location = new System.Drawing.Point(165, 491);
+ this.pictureBox2.Location = new System.Drawing.Point(154, 5);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(136, 136);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -190,7 +184,7 @@
// label9
//
this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(19, 496);
+ this.label9.Location = new System.Drawing.Point(8, 10);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(68, 17);
this.label9.TabIndex = 404;
@@ -387,7 +381,7 @@
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOk.ForeColor = System.Drawing.Color.White;
- this.btnOk.Location = new System.Drawing.Point(387, 601);
+ this.btnOk.Location = new System.Drawing.Point(400, 616);
this.btnOk.Margin = new System.Windows.Forms.Padding(2);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(55, 26);
@@ -396,6 +390,19 @@
this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
+ // pnlSkuOption
+ //
+ this.pnlSkuOption.Controls.Add(this.label9);
+ this.pnlSkuOption.Controls.Add(this.btnBookImg);
+ 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);
+ this.pnlSkuOption.TabIndex = 661;
+ //
// PDDDBProdEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -412,6 +419,8 @@
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ this.pnlSkuOption.ResumeLayout(false);
+ this.pnlSkuOption.PerformLayout();
this.ResumeLayout(false);
}
@@ -443,5 +452,6 @@
private UserControls.ButtonEx btnSelect;
private DevComponents.DotNetBar.PanelEx btnEditDetail;
private DevComponents.DotNetBar.PanelEx btnBookImg;
+ public System.Windows.Forms.Panel pnlSkuOption;
}
}
\ No newline at end of file
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs
index ca99498..cb3bc06 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs
@@ -64,8 +64,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void btnOk_Click(object sender, EventArgs e)
{
- //var url = BaseClass.BuildObjString("product/mdy_product_notes");
- var url = BaseClass.BuildObjString("product/mdy_db_product");
+ //var url = BaseClass.BuildPDDObjString("product/mdy_product_notes");
+ var url = BaseClass.BuildPDDObjString("product/mdy_db_product");
var data = UserLogin.GetSignaturex() +
"&db_id=" + dbProd.id + "¬es=" + this.txtNotes.Text.Trim();
data += "&product_name=" + this.txtProductName.Text.Trim();
@@ -172,7 +172,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
string img_md5 = BaseClass.GetMd5(imgBase64);
- var url = BaseClass.BuildObjString("product/add_sku_img_replace");
+ var url = BaseClass.BuildPDDObjString("product/add_sku_img_replace");
var data = UserLogin.GetSignaturex() +
"&product_db_id=" + dbProd.id;
data += "&img_base64=" + imgBase64;
@@ -213,7 +213,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
imgListForm.ShowDialog();
if (imgListForm.SelectDbImgId > 0)
{
- var url = BaseClass.BuildObjString("product/mdy_prod_sku_img_replace_id");
+ var url = BaseClass.BuildPDDObjString("product/mdy_prod_sku_img_replace_id");
var data = UserLogin.GetSignaturex() +
"&product_db_id=" + dbProd.id;
data += "&img_db_id=" + imgListForm.SelectDbImgId;
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs
index f5484b9..6896db3 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs
@@ -780,6 +780,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.cmbWxSafe.FormattingEnabled = true;
this.cmbWxSafe.Items.AddRange(new object[] {
"",
+ "安全+未校验",
"安全商品",
"违规商品",
"未校验"});
@@ -788,6 +789,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.cmbWxSafe.Name = "cmbWxSafe";
this.cmbWxSafe.Size = new System.Drawing.Size(37, 25);
this.cmbWxSafe.TabIndex = 676;
+ this.cmbWxSafe.Text = "安全+未校验";
//
// lblWxSafe
//
diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
index f2200a5..b78a254 100644
--- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
+++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs
@@ -90,7 +90,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
}
if (BaseClass.MainPath != "binxixi")
{
- this.dgvDbProduct.Columns["col_edit"].Visible = false;
+ //this.dgvDbProduct.Columns["col_edit"].Visible = false;
}
btnSelect.Visible = false;
@@ -315,7 +315,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
"&search_ext_code=" + txtExtCode.Text.Trim() +
"&search_group=" + cmbGroupFilter.Text.Trim() +
"&search_prod_name=" + txtProdName.Text.Trim() +
- "&wx_safe_status=" + cmbWxSafe.Text.Trim() +
+ "&wx_safe_status=" + cmbWxSafe.Text.Trim().Replace("安全+未校验", "安全商品,未校验") +
"&special_prod_type=" + cmbSpProdType.Text.Trim();
if (!string.IsNullOrEmpty(cmbWxCat.Text))
{
@@ -408,7 +408,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.cmbGroupFilter.Text = "";
this.cmbSort.Text = "入库时间";
this.cmbSourceType.Text = "";
- this.cmbWxSafe.Text = "";
+ this.cmbWxSafe.Text = "安全+未校验";
this.cmbSpProdType.Text = "";
this.cmbWxCat.Text = "";
this.cmbExportToOutServer.Text = "";
@@ -432,6 +432,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
case "详情":
case "编辑/详情":
PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct);
+ if (BaseClass.MainPath != "binxixi")
+ editForm.pnlSkuOption.Visible = false;
editForm.ShowDialog();
dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes;
dgvDbProduct.Rows[e.RowIndex].Cells["col_ext_code"].Value = dbProduct.ext_code;
@@ -1064,18 +1066,68 @@ namespace TemuKJD.PDDForms.ProductSelectForms
var dbProd = PDDDBProdEditForm.GetPddProductDetail(prod.id.ParseToString());
var prodObj = JsonHelper.JObjectParse(dbProd.product_json);
- List mainImgLst = new List();
+ List mainImgLst3 = new List();
if (!prodObj["jstProd"].IsJTokenNullOrEmpty())
{
var jstProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prodObj["jstProd"]));
- mainImgLst = jstProd.itemMainImage.Take(3).ToList();
- foreach (var img in mainImgLst)
+ mainImgLst3 = jstProd.itemMainImage.Take(3).ToList();
+ bool is404 = false;
+ foreach (var img in mainImgLst3)
{
+ // 盗链识别
var urlImg = BaseClass.BuildPDDObjString("product/wx_api_upload_image");
var upDate = UserLogin.GetSignaturex();
upDate += "&token=" + token.accessToken;
upDate += "&post_data=" + GetHtml.UrlEncodeUtf8("{\"img_url\":\"" + img + "\"}");
var upDateRst = GetHtml.PostUtf8(urlImg, upDate);
+
+ for (int i = 0; i < 20 && upDateRst.Contains("access_token expired"); i++)
+ {
+ token.mdyTime = DateTime.Now.AddDays(-100);
+ token = new WxApiBLL().GetRandomWxToken();
+ upDateRst = GetHtml.PostUtf8(urlImg, upDate);
+ }
+
+ if (upDateRst.Contains("原图url打开返回404"))
+ {
+ string in_db_ids = dbProd.id.ParseToString();
+ var url = BaseClass.BuildPDDObjString("product/mdy_db_product");
+ var data = UserLogin.GetSignaturex() +
+ "&in_db_ids=" + in_db_ids + "&wx_safe_status=违规商品";
+ if (dbProd.notes.IsNullOrEmpty())
+ data += "¬es=商品图片链接失效";
+ var html = GetHtml.PostUtf8(url, data);
+ if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
+ html = GetHtml.PostUtf8(url, data);
+ }
+ // 上传图片识别
+ if (upDateRst.Contains("图片格式不合法"))
+ {
+ string errMsg = "";
+ var imgBase64 = WXForms.ProductForms.WXDBProdUploadForm.GetImgBase64ForApi(out errMsg, img, false, false);
+ if (!string.IsNullOrEmpty(errMsg))
+ {
+ //break;
+ }
+
+ urlImg = BaseClass.BuildPDDObjString("product/wx_api_upload_image");
+ upDate = UserLogin.GetSignaturex();
+ upDate += "&token=" + token.accessToken;
+ //upDate += "&is_file=true";
+ //if (needAddRandomBlock || wantAddRandomBlock)
+ // upDate += "&random_code=true";
+ upDate += "&img_url=" + img;
+ upDate += "&img_base64=" + imgBase64;
+
+ upDateRst = GetHtml.PostUtf8(urlImg, upDate);
+ for (int i = 0; i < 20 && upDateRst.Contains("access_token expired"); i++)
+ {
+ token.mdyTime = DateTime.Now.AddDays(-100);
+ token = new WxApiBLL().GetRandomWxToken();
+ upDateRst = GetHtml.PostUtf8(urlImg, upDate);
+ }
+ }
+
var upImgUrl = BaseRegex.GetStringJson(ref upDateRst, "img_url");
(obj["head_imgs"] as JArray).Add(upImgUrl);
}
@@ -1156,6 +1208,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
if (row != null)
{
string catName = dbProd.cat_name;
+ string mainCatName = dbProd.main_cat_name ?? prod.main_cat_id;
if (dbProd.wx_cat_leaf != null)
{
var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString())?.name;
@@ -1180,16 +1233,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms
catName = catN + " >> " + catName;
}
}
- if (prod.wx_cat_1 != null)
+ if (dbProd.wx_cat_1 != null)
{
var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_1.ParseToString())?.name;
if (!string.IsNullOrEmpty(catN))
{
catName = catN + " >> " + catName;
+ mainCatName = catN;
}
}
Invoke(new Action(() =>
{
+ row.Cells["colMainCate"].Value = mainCatName;
row.Cells["col_cat_name"].Value = catName;
}));
}
diff --git a/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs b/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs
index b112d48..c90b267 100644
--- a/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs
+++ b/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs
@@ -114,7 +114,7 @@ namespace TemuKJD.ToolForms
this.splitContainer2.Panel1.Controls.Add(this.btnNext);
this.splitContainer2.Panel1.Controls.Add(this.btnPrev);
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
- this.splitContainer2.Size = new System.Drawing.Size(1390, 440);
+ this.splitContainer2.Size = new System.Drawing.Size(1390, 434);
this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.TabIndex = 6;
//
@@ -153,7 +153,7 @@ namespace TemuKJD.ToolForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
- this.pbLoading.Location = new System.Drawing.Point(673, 194);
+ this.pbLoading.Location = new System.Drawing.Point(673, 195);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -197,7 +197,7 @@ namespace TemuKJD.ToolForms
this.dgvProduct.Name = "dgvProduct";
this.dgvProduct.ReadOnly = true;
this.dgvProduct.RowTemplate.Height = 23;
- this.dgvProduct.Size = new System.Drawing.Size(1390, 433);
+ this.dgvProduct.Size = new System.Drawing.Size(1390, 434);
this.dgvProduct.TabIndex = 7;
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
//
@@ -333,7 +333,7 @@ namespace TemuKJD.ToolForms
this.splitContainer1.Panel2.Controls.Add(this.btnImportCookie);
this.splitContainer1.Panel2.Controls.Add(this.label2);
this.splitContainer1.Size = new System.Drawing.Size(1404, 561);
- this.splitContainer1.SplitterDistance = 469;
+ this.splitContainer1.SplitterDistance = 470;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
@@ -348,7 +348,7 @@ namespace TemuKJD.ToolForms
this.ucTabControlMetro1.Name = "ucTabControlMetro1";
this.ucTabControlMetro1.SelectedIndex = 0;
this.ucTabControlMetro1.ShowCloseButton = false;
- this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 469);
+ this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 470);
this.ucTabControlMetro1.TabIndex = 462;
this.ucTabControlMetro1.TabSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucTabControlMetro1.TabSelectTextColor = System.Drawing.Color.Gray;
@@ -360,7 +360,7 @@ namespace TemuKJD.ToolForms
this.tabPage1.Location = new System.Drawing.Point(4, 26);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage1.Size = new System.Drawing.Size(1396, 446);
+ this.tabPage1.Size = new System.Drawing.Size(1396, 440);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "商品页面";
this.tabPage1.UseVisualStyleBackColor = true;
@@ -372,7 +372,7 @@ namespace TemuKJD.ToolForms
this.tabPage2.Location = new System.Drawing.Point(4, 26);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage2.Size = new System.Drawing.Size(1396, 439);
+ this.tabPage2.Size = new System.Drawing.Size(1396, 440);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "采集列表";
this.tabPage2.UseVisualStyleBackColor = true;
diff --git a/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs b/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs
index 9394300..74ea3bb 100644
--- a/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs
+++ b/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs
@@ -9,6 +9,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
+using TemuKJD.Extension;
namespace TemuKJD.UserComponent
{
@@ -46,19 +47,32 @@ namespace TemuKJD.UserComponent
ControlStyles.AllPaintingInWmPaint, true);
UpdateStyles();
+ this.Text = DefaultText;
+ this.DropDownWidth = 1;
+ this.DropDownHeight = 1;
this.DropDown += UcComboBoxMutiSelect_DropDown;
- //this.DropDownClosed += UcComboBoxMutiSelect_DropDownClosed;
+ this.DropDownClosed += UcComboBoxMutiSelect_DropDownClosed;
}
private void UcComboBoxMutiSelect_DropDownClosed(object sender, EventArgs e)
{
if (checkedListBox != null)
- checkedListBox.Visible = false;
+ {
+ var parentForm = this.FindForm();
+ Point mousePosition = parentForm.PointToClient(Cursor.Position);
+ Point relativeLocation = checkedListBox.GetRelativePosition();
+
+ if (mousePosition.X < relativeLocation.X || mousePosition.X > relativeLocation.X + checkedListBox.Width ||
+ mousePosition.Y < relativeLocation.Y || mousePosition.Y > relativeLocation.Y + checkedListBox.Height)
+ {
+ checkedListBox.Visible = false;
+ }
+ }
}
private void UcComboBoxMutiSelect_DropDown(object sender, EventArgs e)
{
- this.DropDownHeight = 1;
+ var parentForm = this.FindForm();
if (checkedListBox == null)
{
@@ -69,21 +83,9 @@ namespace TemuKJD.UserComponent
checkedListBox.MouseLeave += checkedListBox_MouseLeave;
checkedListBox.MouseEnter += CheckedListBox_MouseEnter;
checkedListBox.MouseMove += CheckedListBox_MouseMove;
- //checkedListBox.MouseUp += new MouseEventHandler(this.checkedListBox_MouseUp);
+ //checkedListBox.MouseUp += new MouseEventHandler(checkedListBox_MouseUp);
- Point point = new Point();
- point.X = this.Left;
- point.Y = this.Top + this.Height;
- var parentForm = this.Parent;
- while (!(parentForm is Form))
- {
- point.X += parentForm.Left;
- point.Y += parentForm.Top;
- parentForm = parentForm.Parent;
- }
parentForm.Controls.Add(checkedListBox);
- checkedListBox.Location = point;
- checkedListBox.Size = new Size(Math.Max(80, this.Width), 100);
}
string str1 = string.Join(",", this.Items.Cast