微店模拟接口 其他一些功能优化
This commit is contained in:
1 parent
dc6f981a34
commit
cafdbbd95d
20 files changed
+2343
-103
No files matched your search
@@ -206,6 +206,7 @@
|
||||
<Compile Include="Model\Param\ToolsManage\ADSLAccountParam.cs" />
|
||||
<Compile Include="Model\Param\ToolsManage\ProductMappingExportInfo.cs" />
|
||||
<Compile Include="Model\Param\ToolsManage\ProductMappingImportParam.cs" />
|
||||
<Compile Include="Model\Param\VDianManage\VDianParam.cs" />
|
||||
<Compile Include="Model\Param\WXParam\WXCateAuthParam.cs" />
|
||||
<Compile Include="Model\Param\WXParam\WXCoupon.cs" />
|
||||
<Compile Include="Model\Result\1688\_1688ClientProductInfo.cs" />
|
||||
@@ -217,6 +218,7 @@
|
||||
<Compile Include="Model\Result\PDDResult\PDDActivityResult\ActivityListProdInfo.cs" />
|
||||
<Compile Include="Model\Result\PDDResult\PDDActivityResult\ActEnrollV3GoodsRuleInfo.cs" />
|
||||
<Compile Include="Model\Result\PDDResult\PddBuyerOrderInfoLite.cs" />
|
||||
<Compile Include="Model\Result\VDianShopLoginInfo.cs" />
|
||||
<Compile Include="Model\Result\WXResult\WXAddressInfo.cs" />
|
||||
<Compile Include="Model\Result\WXResult\WXClientProductInfoLite.cs" />
|
||||
<Compile Include="Model\Result\WXResult\WXFinderTalentInfo.cs" />
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace AllBase
|
||||
/// <summary>
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
public static int VersionCount = 970;
|
||||
public static int VersionCount = 976;
|
||||
//public static int VersionCount = 613;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -2044,5 +2044,10 @@ Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom
|
||||
{
|
||||
return new Regex(@"\\u([0-9A-F]{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled).Replace(source, x => Convert.ToChar(Convert.ToUInt16(x.Result("$1"), 16)).ToString());
|
||||
}
|
||||
|
||||
public static string ReadResponse(HttpWebResponse response, Encoding encoding = null)
|
||||
{
|
||||
return GetProxyHtml.ReadResponse(response, encoding);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -760,7 +760,7 @@ namespace AllBase
|
||||
}
|
||||
return webProxy;
|
||||
}
|
||||
public static string ReadResponse(HttpWebResponse response)
|
||||
public static string ReadResponse(HttpWebResponse response, Encoding encoding = null)
|
||||
{
|
||||
using (Stream responseStream = response.GetResponseStream())
|
||||
{
|
||||
@@ -773,8 +773,8 @@ namespace AllBase
|
||||
{
|
||||
streamToRead = new DeflateStream(streamToRead, CompressionMode.Decompress);
|
||||
}
|
||||
|
||||
using (StreamReader streamReader = new StreamReader(streamToRead, Encoding.UTF8))
|
||||
if (encoding == null) encoding = Encoding.UTF8;
|
||||
using (StreamReader streamReader = new StreamReader(streamToRead, encoding))
|
||||
{
|
||||
return streamReader.ReadToEnd();
|
||||
}
|
||||
|
||||
@@ -88,5 +88,10 @@ namespace AllBase.Model.Param.ToolsManage
|
||||
/// 转换成功来源 未知,Api,模拟,缓存等 统计用
|
||||
/// </summary>
|
||||
public string MappingResourceType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 转换重试次数
|
||||
/// </summary>
|
||||
public int retryTimes { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,298 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AllBase.Model.Param.VDianManage
|
||||
{
|
||||
|
||||
public class VDianParam
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class VDianItemAddParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 偏远地区是否包邮:1包邮,0不包邮只有在free_delivery为1时候有效,否则不包邮
|
||||
/// </summary>
|
||||
public byte remote_free_delivery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品描述
|
||||
/// </summary>
|
||||
public string item_comment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品编号
|
||||
/// </summary>
|
||||
public string merchant_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// status=1或不传为在架商品,status=2为下架商品,4表示下架和在架商品
|
||||
/// </summary>
|
||||
public byte status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品图片
|
||||
/// </summary>
|
||||
public List<string> bigImgs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品图片描述
|
||||
/// </summary>
|
||||
public List<string> titles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存
|
||||
/// </summary>
|
||||
public int stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否包邮:0不包邮,1包邮
|
||||
/// </summary>
|
||||
public byte free_delivery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品采购价(单位:分)
|
||||
/// </summary>
|
||||
public int purchase_fee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品详情
|
||||
/// </summary>
|
||||
public List<VDianItemDetail> item_detail_list { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品sku
|
||||
/// </summary>
|
||||
public List<VDianSku> sku { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品属性图片列表
|
||||
/// </summary>
|
||||
public List<VDianAttrValuePic> attr_list { get; set; }
|
||||
|
||||
public List<VDianParam.VDianAttr> attrList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 价格
|
||||
/// </summary>
|
||||
public string price { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品描述
|
||||
/// </summary>
|
||||
public string item_name { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 微店接口参数定义
|
||||
/// public={"access_token": "xxxxx", "version": "1.4", "method": "vdian.item.add", "format": "json","auth_userid":"923284842"}
|
||||
/// </summary>
|
||||
public class VDianPublicParam
|
||||
{
|
||||
public string access_token { get; set; }
|
||||
public const string version = "1.4";
|
||||
public string method { get; set; } // "method": "vdian.item.add"
|
||||
public const string format = "json";
|
||||
public string auth_userid { get; set; } // "auth_userid": "923284842"
|
||||
}
|
||||
|
||||
public class VDianItemDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// type =1 文字模块,type =2 图片
|
||||
/// </summary>
|
||||
public byte type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品图片URL
|
||||
/// </summary>
|
||||
public string url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 详情文本(type=1填写此字段)
|
||||
/// </summary>
|
||||
public string text { get; set; }
|
||||
}
|
||||
|
||||
public class VDianSku
|
||||
{
|
||||
/// <summary>
|
||||
/// sku采购价格(单位:分)
|
||||
/// </summary>
|
||||
//public int purchaseFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sku编码
|
||||
/// </summary>
|
||||
//public string sku_merchant_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sku图片
|
||||
/// </summary>
|
||||
public string img { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sku库存
|
||||
/// </summary>
|
||||
public int stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sku价格
|
||||
/// </summary>
|
||||
public string price { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sku标题
|
||||
/// </summary>
|
||||
public string title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sku对应的属性id列表
|
||||
/// </summary>
|
||||
public List<string> attr_ids { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sku特殊编码
|
||||
/// </summary>
|
||||
public string sku_merchant_code { get; set; }
|
||||
}
|
||||
|
||||
public class VDianProductBase
|
||||
{
|
||||
public VDianProductBase()
|
||||
{
|
||||
price = "";
|
||||
isPointPrice = 0;
|
||||
vpoint_limit_count = "";
|
||||
pointPrice = new PointPrice();
|
||||
point_price_range = 3;
|
||||
stock = "";
|
||||
weight = "";
|
||||
merchantCode = "";
|
||||
catePropList = new List<string>();
|
||||
expressFeeTemplateId = 0;
|
||||
freeDelivery = 0;
|
||||
remoteFreeDelivery = 0;
|
||||
isWeightTemplate = 0;
|
||||
cateIds = "";
|
||||
purchase_limit = false;
|
||||
purchase_limit_num = "";
|
||||
isNeedIdNo = "";
|
||||
isHiddenSetting = false;
|
||||
itemStatus = 1;
|
||||
areaTemplateId = "";
|
||||
areaTemplateFlag = 0;
|
||||
isFutureSold = false;
|
||||
futureSoldTime = "";
|
||||
submitWithLimitWords = false;
|
||||
submitWithSensitiveWord = false;
|
||||
isCheckQualification = true;
|
||||
}
|
||||
|
||||
public string shopId { get; set; }
|
||||
public string shopName { get; set; }
|
||||
public string itemId { get; set; }
|
||||
public List<VDianBigImg> imgs { get; set; }
|
||||
public string itemName { get; set; }
|
||||
public string price { get; set; }
|
||||
public int isPointPrice { get; set; }
|
||||
public string vpoint_limit_count { get; set; }
|
||||
public PointPrice pointPrice { get; set; }
|
||||
public int point_price_range { get; set; }
|
||||
public string stock { get; set; }
|
||||
public string weight { get; set; }
|
||||
public string merchantCode { get; set; }
|
||||
public long bgCateId { get; set; }
|
||||
public List<string> catePropList { get; set; }
|
||||
public string tmpDetailId { get; set; }
|
||||
public List<VDianAttr> attrList { get; set; }
|
||||
public List<VDianSkuProp> sku { get; set; }
|
||||
public int expressFeeTemplateId { get; set; }
|
||||
public int freeDelivery { get; set; }
|
||||
public int remoteFreeDelivery { get; set; }
|
||||
public int isWeightTemplate { get; set; }
|
||||
public string cateIds { get; set; }
|
||||
public bool purchase_limit { get; set; }
|
||||
public string purchase_limit_num { get; set; }
|
||||
public string isNeedIdNo { get; set; }
|
||||
public bool isHiddenSetting { get; set; }
|
||||
public int itemStatus { get; set; }
|
||||
public string areaTemplateId { get; set; }
|
||||
public int areaTemplateFlag { get; set; }
|
||||
public bool isFutureSold { get; set; }
|
||||
public string futureSoldTime { get; set; }
|
||||
public bool submitWithLimitWords { get; set; }
|
||||
public bool submitWithSensitiveWord { get; set; }
|
||||
public bool isCheckQualification { get; set; }
|
||||
}
|
||||
|
||||
public class VDianBigImg
|
||||
{
|
||||
public string url { get; set; }
|
||||
public string title { get; set; }
|
||||
}
|
||||
|
||||
public class PointPrice
|
||||
{
|
||||
public string price { get { return _price; } set { _price = value; } }
|
||||
public string point { get { return _point; } set { _point = value; } }
|
||||
string _point = "";
|
||||
string _price = "";
|
||||
}
|
||||
|
||||
public class VDianAttr
|
||||
{
|
||||
public string attr_title { get; set; }
|
||||
public List<VDianAttrValue> attr_values { get; set; }
|
||||
}
|
||||
|
||||
public class VDianAttrValue
|
||||
{
|
||||
public long attr_id { get; set; }
|
||||
public string attr_value { get; set; }
|
||||
public string attr_title { get; set; }
|
||||
}
|
||||
|
||||
public class VDianAttrValuePic
|
||||
{
|
||||
public long attr_id { get; set; }
|
||||
public List<string> attr_values { get; set; }
|
||||
public string attr_title { get; set; }
|
||||
public string img { get; set; }
|
||||
}
|
||||
|
||||
public class VDianSkuProp
|
||||
{
|
||||
public List<long> attrIds { get; set; }
|
||||
public string price { get; set; }
|
||||
public string stock { get; set; }
|
||||
public string merchantCode { get; set; } = "";
|
||||
}
|
||||
|
||||
// 微店佣金
|
||||
public class VDianCommission
|
||||
{
|
||||
public string itemIds { get; set; }
|
||||
public bool isDownPrice { get; set; }
|
||||
public bool isUpPrice { get; set; }
|
||||
public int priceUpLimit { get; set; }
|
||||
public VDianCommissionRate commissionRate { get; set; }
|
||||
public string specifyRetailSellerIds { get; set; }
|
||||
public string specifyCommissionRate { get; set; }
|
||||
}
|
||||
|
||||
// 微店佣金级别
|
||||
public class VDianCommissionRate
|
||||
{
|
||||
public string L1 { get; set; }
|
||||
public string L2 { get; set; }
|
||||
public string L3 { get; set; }
|
||||
public string L4 { get; set; }
|
||||
public string L5 { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AllBase.Model.Result
|
||||
{
|
||||
public class VDianShopLoginInfo
|
||||
{
|
||||
public string ShopName { get; set; }
|
||||
public string ShopId { get; set; }
|
||||
public string Cookies { get; set; }
|
||||
public string Wdtoken { get; set; }
|
||||
/// <summary>
|
||||
/// 店铺登录状态 1为登录成功 2为掉线
|
||||
/// </summary>
|
||||
public int LoginStatus { get; set; }
|
||||
public string Phone { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string UpGoodAuth { get; set; }
|
||||
/// <summary>
|
||||
/// 主体认证
|
||||
/// </summary>
|
||||
public string MainAuth { get; set; }
|
||||
public string ApiAuth { get; set; }
|
||||
//public string WdApiToken { get; set; }
|
||||
public string Api2Auth { get; set; }
|
||||
public string WdApi2Token { get; set; }
|
||||
public string WdApi2RefreshToken { get; set; }
|
||||
public List<VDianApiToken> LstWdApiToken { get; set; }
|
||||
public VDianApiToken MultiImgApiToken { get; set; }
|
||||
public VDianApiToken MultiAttrApiToken { get; set; }
|
||||
public VDianApiToken MultiProductApiToken { get; set; }
|
||||
/// <summary>
|
||||
/// 是否开通分成推广金
|
||||
/// </summary>
|
||||
//public string IsCPSable { get; set; }
|
||||
}
|
||||
|
||||
public class VDianApiToken
|
||||
{
|
||||
/// <summary>
|
||||
/// Token对应的AppKey
|
||||
/// </summary>
|
||||
public VDianAppKey AppKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// AccessToken值
|
||||
/// </summary>
|
||||
public string ApiAccessToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最后刷新日期,发现不是当日,立即刷新一次
|
||||
/// </summary>
|
||||
public string LastRefreshDate { get; set; }
|
||||
|
||||
public string RefreshToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否已过期或者未授权
|
||||
/// </summary>
|
||||
public string ApiAuth { get; set; }
|
||||
}
|
||||
|
||||
public class VDianAppKey
|
||||
{
|
||||
/// <summary>
|
||||
/// 微店的AppKey
|
||||
/// </summary>
|
||||
public string AppKey { get; set; }
|
||||
/// <summary>
|
||||
/// 上货是否达到数量上限,未达上限为ok,达到上限为error
|
||||
/// </summary>
|
||||
public string Status { get; set; }
|
||||
/// <summary>
|
||||
/// 图片上传数量限制,未达上限为ok,达到上限为error
|
||||
/// </summary>
|
||||
public string ImgsCountStatus { get; set; }
|
||||
/// <summary>
|
||||
/// 上货数量限制,未达上限为ok,达到上限为error
|
||||
/// </summary>
|
||||
public string GoodsCountStatus { get; set; }
|
||||
/// <summary>
|
||||
/// 上传属性数量限制,未达上限为ok,达到上限为error
|
||||
/// </summary>
|
||||
public string PropCountStatus { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -40,7 +40,7 @@ namespace AllBase
|
||||
}
|
||||
return s.ToString();
|
||||
}
|
||||
public static string GetWordNumber(int len)
|
||||
public static string GetWordWithNumber(int len)
|
||||
{
|
||||
StringBuilder s = new StringBuilder();
|
||||
for (int i = 0; i < len; i++)
|
||||
|
||||
@@ -250,6 +250,11 @@ namespace KJD_Web.BLL.BXX
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 违规商品
|
||||
/// </summary>
|
||||
/// <param name="inputData"></param>
|
||||
/// <returns></returns>
|
||||
public string MdyViolationProd(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
@@ -334,6 +339,11 @@ namespace KJD_Web.BLL.BXX
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取商品SpuId(快速查询)
|
||||
/// </summary>
|
||||
/// <param name="inputData"></param>
|
||||
/// <returns></returns>
|
||||
public string GetProductSpuIdLst(string inputData)
|
||||
{
|
||||
var timeCalc = DateTime.Now;
|
||||
@@ -409,6 +419,12 @@ namespace KJD_Web.BLL.BXX
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询商品列表
|
||||
/// </summary>
|
||||
/// <param name="inputData"></param>
|
||||
/// <param name="isDetail"></param>
|
||||
/// <returns></returns>
|
||||
public string GetProductList(string inputData, bool isDetail = false)
|
||||
{
|
||||
var timeCalc = DateTime.Now;
|
||||
@@ -509,7 +525,15 @@ namespace KJD_Web.BLL.BXX
|
||||
if (!string.IsNullOrWhiteSpace(search_ext_code))
|
||||
where += " and p.ext_code like '%" + search_ext_code + "%'";
|
||||
if (!string.IsNullOrWhiteSpace(search_prod_name))
|
||||
where += " and p.product_name like '%" + search_prod_name + "%'";
|
||||
{
|
||||
var searchProdNameWords = search_prod_name.Split(new string[] { ",", ",", ";", ";", " ", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var multi_search_prod_name = "";
|
||||
foreach (var word in searchProdNameWords)
|
||||
{
|
||||
multi_search_prod_name += " or p.product_name like '%" + word + "%'";
|
||||
}
|
||||
where += " and (" + multi_search_prod_name.Substring(4) + ")";
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(search_group))
|
||||
where += " and p.group like '%" + search_group + "%'";
|
||||
if (!string.IsNullOrWhiteSpace(search_notes))
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TemuKJD.BLL.VDian
|
||||
{
|
||||
public class MappingVDianApiBLL
|
||||
{
|
||||
public static string GetFormattedImgFileName(string oldName)
|
||||
{
|
||||
if (oldName == null)
|
||||
return "";
|
||||
var imgStr = oldName;
|
||||
if (imgStr.EndsWith(".src"))
|
||||
imgStr = imgStr.Substring(0, imgStr.Length - 4);
|
||||
if (imgStr.Contains("@"))
|
||||
imgStr = imgStr.Substring(0, imgStr.LastIndexOf("@")); //omsproductionimg.yangkeduo.com/images/2017-12-06/c5286b86a0ef6a982dcabbdf517a7d55.jpeg@750w_1l_50Q.src
|
||||
if (imgStr.Contains("?") && !imgStr.ToLower().EndsWith(".jpg") && !imgStr.ToLower().EndsWith(".jpeg") && !imgStr.ToLower().EndsWith(".bmp")
|
||||
&& !imgStr.ToLower().EndsWith(".png") && !imgStr.ToLower().EndsWith(".ss2") && !imgStr.ToLower().EndsWith(".gif"))
|
||||
imgStr = imgStr.Substring(0, imgStr.LastIndexOf("?"));
|
||||
if (!imgStr.StartsWith("http"))
|
||||
imgStr = "https://" + imgStr.TrimStart('/');
|
||||
if (!imgStr.ToLower().EndsWith(".jpg") && !imgStr.ToLower().EndsWith(".jpeg") && !imgStr.ToLower().EndsWith(".png") && !imgStr.ToLower().EndsWith(".bmp")
|
||||
&& !imgStr.ToLower().EndsWith(".ss2") && !imgStr.ToLower().EndsWith(".gif"))
|
||||
{
|
||||
if (imgStr.Contains("gw.alicdn.com"))
|
||||
return imgStr;
|
||||
return "";
|
||||
}
|
||||
return imgStr;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -129,6 +129,8 @@
|
||||
<Compile Include="BLL\PDDProdFormConverter.cs" />
|
||||
<Compile Include="BLL\ProductSelectBLL.cs" />
|
||||
<Compile Include="BLL\Tools\DownloadBLL.cs" />
|
||||
<Compile Include="BLL\VDian\MappingVDianApiBLL.cs" />
|
||||
<Compile Include="BLL\VDian\MappingVDianBLL.cs" />
|
||||
<Compile Include="BLL\WxApiBLL.cs" />
|
||||
<Compile Include="BLL\YkdHttpResponseBLL.cs" />
|
||||
<Compile Include="BLL\WXHttpResponseBLL.cs" />
|
||||
@@ -1793,9 +1795,7 @@
|
||||
<Name>Work</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="WeiDianForms\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.6.2">
|
||||
<Visible>False</Visible>
|
||||
|
||||
@@ -379,7 +379,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
|
||||
List<string> fileNameLst = new List<string>();
|
||||
|
||||
string tempImgPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordNumber(8).ToLower();
|
||||
string tempImgPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordWithNumber(8).ToLower();
|
||||
if (!Directory.Exists(tempImgPath))
|
||||
Directory.CreateDirectory(tempImgPath);
|
||||
var imgUrlLst = this.txtImgUrl.Text.Split(new string[] { "\r", "\n", ";", " " }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
@@ -30,15 +30,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = 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();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.btnSelectNotGetDetail = new DevComponents.DotNetBar.PanelEx();
|
||||
this.cmbFilterType = new System.Windows.Forms.ComboBox();
|
||||
this.btnFilter = new DevComponents.DotNetBar.PanelEx();
|
||||
this.txtFilter = new System.Windows.Forms.TextBox();
|
||||
@@ -105,7 +106,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.chk = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage();
|
||||
this.btnSelectNotGetDetail = new DevComponents.DotNetBar.PanelEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -197,17 +197,42 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.ucGroupBoxEx1.TabStop = false;
|
||||
this.ucGroupBoxEx1.Text = "操作";
|
||||
//
|
||||
// btnSelectNotGetDetail
|
||||
//
|
||||
this.btnSelectNotGetDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSelectNotGetDetail.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnSelectNotGetDetail.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSelectNotGetDetail.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSelectNotGetDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSelectNotGetDetail.Location = new System.Drawing.Point(1125, 30);
|
||||
this.btnSelectNotGetDetail.Name = "btnSelectNotGetDetail";
|
||||
this.btnSelectNotGetDetail.Size = new System.Drawing.Size(153, 25);
|
||||
this.btnSelectNotGetDetail.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSelectNotGetDetail.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSelectNotGetDetail.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSelectNotGetDetail.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnSelectNotGetDetail.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnSelectNotGetDetail.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnSelectNotGetDetail.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnSelectNotGetDetail.Style.GradientAngle = 90;
|
||||
this.btnSelectNotGetDetail.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSelectNotGetDetail.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSelectNotGetDetail.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSelectNotGetDetail.TabIndex = 790;
|
||||
this.btnSelectNotGetDetail.Text = "一键勾选未采集详情商品";
|
||||
this.btnSelectNotGetDetail.Click += new System.EventHandler(this.btnSelectNotGetDetail_Click);
|
||||
//
|
||||
// cmbFilterType
|
||||
//
|
||||
this.cmbFilterType.FormattingEnabled = true;
|
||||
this.cmbFilterType.Items.AddRange(new object[] {
|
||||
"过滤所有字段",
|
||||
"过滤标题+SKU",
|
||||
"过滤标题"});
|
||||
this.cmbFilterType.Location = new System.Drawing.Point(987, 58);
|
||||
this.cmbFilterType.Name = "cmbFilterType";
|
||||
this.cmbFilterType.Size = new System.Drawing.Size(102, 25);
|
||||
this.cmbFilterType.Size = new System.Drawing.Size(108, 25);
|
||||
this.cmbFilterType.TabIndex = 1012;
|
||||
this.cmbFilterType.Text = "过滤所有字段";
|
||||
this.cmbFilterType.Text = "过滤标题+SKU";
|
||||
//
|
||||
// btnFilter
|
||||
//
|
||||
@@ -217,7 +242,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnFilter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnFilter.Location = new System.Drawing.Point(987, 30);
|
||||
this.btnFilter.Name = "btnFilter";
|
||||
this.btnFilter.Size = new System.Drawing.Size(102, 25);
|
||||
this.btnFilter.Size = new System.Drawing.Size(108, 25);
|
||||
this.btnFilter.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnFilter.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnFilter.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
@@ -761,19 +786,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.dgvShop.AllowUserToAddRows = false;
|
||||
this.dgvShop.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle15.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle15;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvShop.AutoRowNumber = true;
|
||||
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle16;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colSelect,
|
||||
@@ -894,20 +919,20 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.dgvChanceProduct.AllowUserToAddRows = false;
|
||||
this.dgvChanceProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle17.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvChanceProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle17;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvChanceProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dgvChanceProduct.AutoRowNumber = true;
|
||||
this.dgvChanceProduct.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dgvChanceProduct.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvChanceProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvChanceProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle18;
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvChanceProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.dgvChanceProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvChanceProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colCheck,
|
||||
@@ -966,8 +991,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// colGoodsName
|
||||
//
|
||||
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle19;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.colGoodsName.FillWeight = 120F;
|
||||
this.colGoodsName.HeaderText = "商品名称";
|
||||
this.colGoodsName.Name = "colGoodsName";
|
||||
@@ -988,8 +1013,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// colPrice
|
||||
//
|
||||
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colPrice.DefaultCellStyle = dataGridViewCellStyle20;
|
||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colPrice.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.colPrice.FillWeight = 70F;
|
||||
this.colPrice.HeaderText = "价格";
|
||||
this.colPrice.Name = "colPrice";
|
||||
@@ -1004,8 +1029,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// colMsg
|
||||
//
|
||||
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colMsg.DefaultCellStyle = dataGridViewCellStyle21;
|
||||
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colMsg.DefaultCellStyle = dataGridViewCellStyle7;
|
||||
this.colMsg.FillWeight = 200F;
|
||||
this.colMsg.HeaderText = "操作结果";
|
||||
this.colMsg.Name = "colMsg";
|
||||
@@ -1051,31 +1076,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
this.ucSplitPage1.PageChange += new System.Action<object>(this.ucSplitPage1_PageChange);
|
||||
//
|
||||
// btnSelectNotGetDetail
|
||||
//
|
||||
this.btnSelectNotGetDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSelectNotGetDetail.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnSelectNotGetDetail.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSelectNotGetDetail.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSelectNotGetDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSelectNotGetDetail.Location = new System.Drawing.Point(1125, 30);
|
||||
this.btnSelectNotGetDetail.Name = "btnSelectNotGetDetail";
|
||||
this.btnSelectNotGetDetail.Size = new System.Drawing.Size(153, 25);
|
||||
this.btnSelectNotGetDetail.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSelectNotGetDetail.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSelectNotGetDetail.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSelectNotGetDetail.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnSelectNotGetDetail.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnSelectNotGetDetail.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnSelectNotGetDetail.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnSelectNotGetDetail.Style.GradientAngle = 90;
|
||||
this.btnSelectNotGetDetail.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSelectNotGetDetail.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSelectNotGetDetail.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSelectNotGetDetail.TabIndex = 790;
|
||||
this.btnSelectNotGetDetail.Text = "一键勾选未采集详情商品";
|
||||
this.btnSelectNotGetDetail.Click += new System.EventHandler(this.btnSelectNotGetDetail_Click);
|
||||
//
|
||||
// PDDGetChanceProdForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
|
||||
@@ -1026,23 +1026,79 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
|
||||
private void btnFilter_Click(object sender, EventArgs e)
|
||||
{
|
||||
var filters = txtFilter.Text.Trim().Split(new string[] { ",", ",", " ", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var filters = txtFilter.Text.Trim().Split(new string[] { ",", ",", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
// 含敏感词商品
|
||||
List<ChanceProductResult> filterChanceProdLst = null;
|
||||
List<ChanceProductResult> filterChanceProdLst = new List<ChanceProductResult>();
|
||||
if (cmbFilterType.Text.Trim() == "过滤标题")
|
||||
filterChanceProdLst = lstChanceProductResult.Where(p => filters
|
||||
.Any(f => (p?.dbProduct?.product_name).ParseToString().Contains(f) || (p?.keywords).ParseToString().Contains(f))).ToList();
|
||||
{
|
||||
foreach(var chance in lstChanceProductResult)
|
||||
{
|
||||
if (filters.Any(f => chance.keywords.Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
if (filters.Any(f => (chance?.dbProduct?.product_name).ParseToString().Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
var prodInfo = JsonHelper.DeserializeJsonToObjectNullable<PDDProductInfo>(chance?.dbProduct?.product_json);
|
||||
if (prodInfo == null)
|
||||
continue;
|
||||
try
|
||||
{
|
||||
if (filters.Any(f => prodInfo.detail.tiny_name.ParseToString().Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
if (filters.Any(f => prodInfo.detail.goods_desc.ParseToString().Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
if (filters.Any(f => prodInfo.detail.share_desc.ParseToString().Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
filterChanceProdLst = lstChanceProductResult.Where(p => filters.Any(f => JsonHelper.SerializeObject(p).Contains(f))).ToList();
|
||||
{
|
||||
foreach (var chance in lstChanceProductResult)
|
||||
{
|
||||
if (filters.Any(f => chance.keywords.Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
if (filters.Any(f => (chance?.dbProduct?.product_name).ParseToString().Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
var prodInfo = JsonHelper.DeserializeJsonToObjectNullable<PDDProductInfo>(chance?.dbProduct?.product_json);
|
||||
if (prodInfo == null)
|
||||
continue;
|
||||
try
|
||||
{
|
||||
if (filters.Any(f => prodInfo.detail.tiny_name.ParseToString().Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
if (filters.Any(f => prodInfo.detail.goods_desc.ParseToString().Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
if (filters.Any(f => prodInfo.detail.share_desc.ParseToString().Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
foreach (var skuInfo in prodInfo.detail.sku)
|
||||
{
|
||||
foreach(var specInfo in skuInfo.spec)
|
||||
{
|
||||
if (filters.Any(f => specInfo.spec_name.ParseToString().Contains(f)))
|
||||
filterChanceProdLst.Add(chance);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var chanceProd in filterChanceProdLst)
|
||||
{
|
||||
var row = dgvChanceProduct.Rows.Cast<DataGridViewRow>().ToList().FirstOrDefault(r => r.Cells["colChanceId"].Value.ParseToString() == chanceProd.chance_id);
|
||||
lstChanceProductResult.Remove(chanceProd);
|
||||
dgvChanceProduct.Rows.Remove(row);
|
||||
|
||||
var row = dgvChanceProduct.Rows.Cast<DataGridViewRow>().ToList().FirstOrDefault(r => r.Cells["colChanceId"].Value.ParseToString() == chanceProd.chance_id);
|
||||
if (row != null)
|
||||
dgvChanceProduct.Rows.Remove(row);
|
||||
}
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_chance_product_list_" + MainForm.ProcessCount, lstChanceProductResult);
|
||||
//NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_chance_product_list_" + MainForm.ProcessCount, lstChanceProductResult);
|
||||
}
|
||||
|
||||
private void btnSelectNotGetDetail_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -1988,7 +1988,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------
|
||||
// ai识别类目暂存主图位置
|
||||
int imgId = 0;
|
||||
string tempImgPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordNumber(8).ToLower();
|
||||
string tempImgPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordWithNumber(8).ToLower();
|
||||
List<string> tempImgFullPathLst = new List<string>();
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------
|
||||
// 生成ai识别类目所需图片
|
||||
@@ -3391,7 +3391,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!prodInfo.detail.sku.Any(s => s.quantity.ParseToInt() > 0))
|
||||
if (dbProd.product_get_type_text == "厂商直采" && !prodInfo.detail.sku.Any(s => s.quantity.ParseToInt() > 0))
|
||||
{
|
||||
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"源商品库存为0\"}";
|
||||
}
|
||||
@@ -3440,7 +3440,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
skuParam.skuKey.productKey.outProductId = upProdParam.product.info.spuCode;
|
||||
// 库存
|
||||
skuParam.productSkuInfo.stockInfo = new stockInfoParam() { stockNum = defaultAddPriceRule.StockNum };
|
||||
if (skuInfo.quantity.ParseToInt() == 0)
|
||||
// 厂商直采上家库存为0则按0上架
|
||||
if (dbProd.product_get_type_text == "厂商直采" && skuInfo.quantity.ParseToInt() == 0)
|
||||
skuParam.productSkuInfo.stockInfo.stockNum = 0;
|
||||
skuParam.productSkuInfo.saleParam = new List<saleParamParam>();
|
||||
foreach (var specInfo in skuInfo.spec)
|
||||
@@ -3961,7 +3962,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
// 提交免审修改(实际生效接口)
|
||||
var listingAuditFreeRst = WXUpload.listingAuditFree(shop, productJson, upProdParam.product.productKey.productId, time1, time2);
|
||||
|
||||
string tempBlobPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordNumber(8).ToLower();
|
||||
string tempBlobPath = Path.GetTempPath().Trim('\\') + "\\" + Randomx.GetWordWithNumber(8).ToLower();
|
||||
if (!Directory.Exists(tempBlobPath))
|
||||
Directory.CreateDirectory(tempBlobPath);
|
||||
string blobFullPath = tempBlobPath + "\\blob"; // C:\Users\Administrator\AppData\Local\Temp\3mer3k21\blob
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
dtpEndTime.Value = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
|
||||
dgvBuyer.AddSelectorColumn("colSelect");
|
||||
|
||||
InitCef();
|
||||
|
||||
lstPddBuyerOrderInfoLite = NaiBa.Util.Helper.ConfigHelper.LoadConfig<ConcurrentList<PddBuyerOrderInfoLite>> ("pdd_buyer_order");
|
||||
if (lstPddBuyerOrderInfoLite == null)
|
||||
@@ -267,6 +268,11 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
order = this.lstPddBuyerOrderInfoLite.FirstOrDefault(or => or.order_sn == o.order_sn);
|
||||
if (JsonHelper.SerializeObject(order) != JsonHelper.SerializeObject(o))
|
||||
{
|
||||
if(order.order_status_prompt.Contains("待发货") && !o.order_status_prompt.Contains("待发货"))
|
||||
{
|
||||
order.sendStatus = "";
|
||||
}
|
||||
|
||||
//order = JsonHelper.DeserializeJsonToObject<PddBuyerOrderInfoLite>(JsonHelper.SerializeObject(o));
|
||||
order.activity_type = o.activity_type;
|
||||
order.discount_amount = o.discount_amount;
|
||||
@@ -490,16 +496,9 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
|
||||
try
|
||||
{
|
||||
if (cefWebBrowser == null)
|
||||
while (cefWebBrowser == null || !cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
InitCef();
|
||||
}));
|
||||
while (!cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid)
|
||||
{
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
|
||||
CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null));
|
||||
@@ -875,7 +874,7 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
case "发送":
|
||||
Task.Run(() =>
|
||||
{
|
||||
SendOrderE57(order);
|
||||
SendOrderE57(order, true);
|
||||
});
|
||||
break;
|
||||
case "图片":
|
||||
@@ -891,8 +890,11 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
}
|
||||
}
|
||||
|
||||
public void SendOrderE57(PddBuyerOrderInfoLite order)
|
||||
public void SendOrderE57(PddBuyerOrderInfoLite order, bool resetSendStatus = false)
|
||||
{
|
||||
if (resetSendStatus)
|
||||
order.sendStatus = "";
|
||||
|
||||
if (order.sendStatus == "已发送")
|
||||
{
|
||||
return;
|
||||
|
||||
+21
-3
@@ -86,6 +86,7 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
this.btnPrev = new DevComponents.DotNetBar.PanelEx();
|
||||
this.txtAddress = new System.Windows.Forms.TextBox();
|
||||
this.pnlTalk = new System.Windows.Forms.Panel();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.lblAutoReplyStatus = new System.Windows.Forms.Label();
|
||||
this.chkShowAutoReplyNum = new System.Windows.Forms.CheckBox();
|
||||
this.chkShowShopStatistics = new System.Windows.Forms.CheckBox();
|
||||
@@ -136,7 +137,7 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
// lblVersionName
|
||||
//
|
||||
this.lblVersionName.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lblVersionName.Location = new System.Drawing.Point(32229, 33);
|
||||
this.lblVersionName.Location = new System.Drawing.Point(32767, 33);
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
@@ -951,6 +952,7 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
//
|
||||
// pnlTalk
|
||||
//
|
||||
this.pnlTalk.Controls.Add(this.textBox1);
|
||||
this.pnlTalk.Controls.Add(this.lblAutoReplyStatus);
|
||||
this.pnlTalk.Controls.Add(this.chkShowAutoReplyNum);
|
||||
this.pnlTalk.Controls.Add(this.chkShowShopStatistics);
|
||||
@@ -962,16 +964,31 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
this.pnlTalk.Size = new System.Drawing.Size(985, 544);
|
||||
this.pnlTalk.TabIndex = 1;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox1.Location = new System.Drawing.Point(356, 61);
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.textBox1.Size = new System.Drawing.Size(555, 422);
|
||||
this.textBox1.TabIndex = 208;
|
||||
this.textBox1.Visible = false;
|
||||
//
|
||||
// lblAutoReplyStatus
|
||||
//
|
||||
this.lblAutoReplyStatus.AutoSize = true;
|
||||
this.lblAutoReplyStatus.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.lblAutoReplyStatus.Location = new System.Drawing.Point(0, 527);
|
||||
this.lblAutoReplyStatus.Name = "lblAutoReplyStatus";
|
||||
this.lblAutoReplyStatus.Size = new System.Drawing.Size(43, 17);
|
||||
this.lblAutoReplyStatus.Size = new System.Drawing.Size(116, 17);
|
||||
this.lblAutoReplyStatus.TabIndex = 207;
|
||||
this.lblAutoReplyStatus.Text = "label5";
|
||||
this.lblAutoReplyStatus.Text = "lblAutoReplyStatus";
|
||||
this.lblAutoReplyStatus.Visible = false;
|
||||
this.lblAutoReplyStatus.Click += new System.EventHandler(this.lblAutoReplyStatus_Click);
|
||||
this.lblAutoReplyStatus.DoubleClick += new System.EventHandler(this.lblAutoReplyStatus_DoubleClick);
|
||||
//
|
||||
// chkShowAutoReplyNum
|
||||
//
|
||||
@@ -1242,5 +1259,6 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
private System.Windows.Forms.Label lblProgress;
|
||||
private System.Windows.Forms.TabPage tabPage3;
|
||||
private System.Windows.Forms.Label lblAutoReplyStatus;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
}
|
||||
}
|
||||
@@ -242,7 +242,12 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
|
||||
if (chkIsAutoReply.Checked && 1==1)
|
||||
{
|
||||
Invoke(new Action(() => { lblAutoReplyStatus.Visible = true; lblAutoReplyStatus.Text = "自动回复中... " + DateTime.Now.ToString("HH:mm:ss"); }));
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
lblAutoReplyStatus.Visible = true;
|
||||
lblAutoReplyStatus.Text = "自动回复中... 待回复数:" +
|
||||
lstAutoReplayParam.Select(rp => rp.nickName).Distinct().ToList().Count + "条 " + DateTime.Now.ToString("HH:mm:ss");
|
||||
}));
|
||||
|
||||
if (lstAutoReplayParam.Count > 0)
|
||||
{
|
||||
@@ -281,7 +286,11 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
if (response1.Result.Result.ParseToString() != "success")
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(500, 1000));
|
||||
Invoke(new Action(() => { lblAutoReplyStatus.Text = "当前用户获取失败,尝试获取全部用户 " + DateTime.Now.ToString("HH:mm:ss"); }));
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
lblAutoReplyStatus.Text = "当前用户获取失败,尝试获取全部用户 待回复数:" +
|
||||
lstAutoReplayParam.Select(rp => rp.nickName).Distinct().ToList().Count + "条 " + DateTime.Now.ToString("HH:mm:ss");
|
||||
}));
|
||||
var jsStr2 = @"function clickAllUser() {
|
||||
var users = document.getElementsByClassName('tab-list-item');
|
||||
for (i=0; i<users.length; i++) {
|
||||
@@ -354,7 +363,11 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
row.Cells["colAutoReplyCount"].Value = AutoReplyCount;
|
||||
}));
|
||||
}
|
||||
Invoke(new Action(() => { lblAutoReplyStatus.Text = autoReplayParam.shopId + " 已尝试发送自动回复 " + DateTime.Now.ToString("HH:mm:ss"); }));
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
lblAutoReplyStatus.Text = autoReplayParam.shopId + " 已尝试发送自动回复 待回复数:" +
|
||||
lstAutoReplayParam.Select(rp => rp.nickName).Distinct().ToList().Count + "条 " + DateTime.Now.ToString("HH:mm:ss");
|
||||
}));
|
||||
Thread.Sleep(Randomx.GetId(500, 600));
|
||||
}
|
||||
}
|
||||
@@ -377,6 +390,32 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
//_1688AddressForm.Show();
|
||||
}
|
||||
|
||||
private void lblAutoReplyStatus_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int isDbClick = 0;
|
||||
private void lblAutoReplyStatus_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
isDbClick++;
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(5000);
|
||||
if (isDbClick > 0)
|
||||
isDbClick--;
|
||||
});
|
||||
|
||||
if (textBox1.Visible == true)
|
||||
textBox1.Visible = false;
|
||||
|
||||
if (isDbClick > 3)
|
||||
{
|
||||
isDbClick = 0;
|
||||
textBox1.Visible = true;
|
||||
textBox1.Text = JsonHelper.SerializeObject(lstAutoReplayParam);
|
||||
}
|
||||
}
|
||||
|
||||
void InitOrderForm()
|
||||
{
|
||||
@@ -1850,6 +1889,7 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
//订单编号###亲,您的这笔订单已核实,请问是遇到什么问题了呢?
|
||||
//退款成功###亲,您的退款已办理成功,欢迎下次光临哦!";
|
||||
|
||||
|
||||
//https://store.weixin.qq.com/shop-faas/mmchannelstradeorder/list/cgi/orderSearch?token=&lang=zh_CN
|
||||
//https://store.weixin.qq.com/shop/order/list
|
||||
// 待发货
|
||||
|
||||
Reference in new issue
Block a user