1016 lines
45 KiB
C#
1016 lines
45 KiB
C#
using AllBase;
|
||
using AllBase.Helper;
|
||
using AllBase.Model.Param;
|
||
using AllBase.Model.Result;
|
||
using AllBase.Model.Result.PDDResult;
|
||
using AllBase.Model.Result.WXResult;
|
||
using CefSharp;
|
||
using CefSharp.WinForms;
|
||
using NaiBa.CefHelper;
|
||
using NaiBa.CefHelper.Handler;
|
||
using NaiBa.Util;
|
||
using NaiBa.Util.Extension;
|
||
using Newtonsoft.Json.Linq;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.ComponentModel;
|
||
using System.Data;
|
||
using System.Diagnostics;
|
||
using System.Drawing;
|
||
using System.IO;
|
||
using System.Linq;
|
||
using System.Net;
|
||
using System.Text;
|
||
using System.Text.RegularExpressions;
|
||
using System.Threading;
|
||
using System.Threading.Tasks;
|
||
using System.Windows.Forms;
|
||
using TemuKJD.BaseForms;
|
||
using TemuKJD.BLL;
|
||
using TemuKJD.Extension;
|
||
using TemuKJD.Helper;
|
||
using TemuKJD.PDDForms.ProductSelectForms;
|
||
using TemuKJD.PDDForms.ShopForms;
|
||
using TemuKJD.ToolForms;
|
||
using Work;
|
||
|
||
namespace TemuKJD.WXForms.TalkForms
|
||
{
|
||
public partial class BuyerOrderListForm : BaseGeneralForm
|
||
{
|
||
private static BuyerOrderListForm instance = null;
|
||
public static BuyerOrderListForm Instance { get { if (instance == null || instance.IsDisposed || instance.Disposing) instance = new BuyerOrderListForm(); return instance; } }
|
||
ShopLoginInfo currentShop { get { return this.lblCurrentShop.Tag as ShopLoginInfo; } }
|
||
//ConcurrentList<WxOrderInfoLite> lstWxOrderInfoLite { get; set; } = new ConcurrentList<WxOrderInfoLite>();
|
||
ConcurrentList<PddBuyerOrderInfoLite> lstPddBuyerOrderInfoLite { get; set; } = new ConcurrentList<PddBuyerOrderInfoLite>();
|
||
public CancellationTokenSource cancellationTokenSource { get; set; } = new CancellationTokenSource();
|
||
public ChromiumWebBrowser cefWebBrowser = null;
|
||
public bool loadComplate = false;
|
||
public bool firstVisible = false;
|
||
public DateTime nextGetOrderTime = DateTime.MinValue;
|
||
|
||
public BuyerOrderListForm()
|
||
{
|
||
InitializeComponent();
|
||
instance = this;
|
||
}
|
||
|
||
private void ProductListForm_Load(object sender, EventArgs e)
|
||
{
|
||
dtpStartTime.Value = DateTime.Now.Date.AddMonths(-1);
|
||
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)
|
||
lstPddBuyerOrderInfoLite = new ConcurrentList<PddBuyerOrderInfoLite>();
|
||
ShowOrder();
|
||
|
||
GetBuyer();
|
||
AutoGetPddOrder();
|
||
loadComplate = true;
|
||
}
|
||
|
||
private void ProductListForm_VisibleChanged(object sender, EventArgs e)
|
||
{
|
||
}
|
||
|
||
void ShowOrder()
|
||
{
|
||
Task.Run(() => {
|
||
|
||
foreach(var order in lstPddBuyerOrderInfoLite)
|
||
{
|
||
Invoke(new Action(() =>
|
||
{
|
||
ShowOrder(order);
|
||
}));
|
||
}
|
||
});
|
||
}
|
||
|
||
void ShowOrder(PddBuyerOrderInfoLite order)
|
||
{
|
||
if (order == null)
|
||
return;
|
||
|
||
var row = dgvPddBuyerOrder.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colOPddOrderSn").ParseToString() == order.order_sn);
|
||
if (row == null)
|
||
{
|
||
var rowIndex = this.dgvPddBuyerOrder.Rows.Add(
|
||
false,
|
||
order.buyerId,
|
||
order.buyerName,
|
||
order.order_sn,
|
||
order.order_time == null ? "" : BaseClass.StampToDateTime(order.order_time.ParseToInt()).ToString("yy-MM-dd HH:ss"),
|
||
"", // 图片路径,
|
||
DataGridViewExtension.defaultBitmap, // 订单图片
|
||
order.order_Goods == null ? "" : string.Join("\r\n", order.order_Goods.Select(g => g.goods_name + " x" + g.goods_number)), // 商品信息
|
||
order.order_amount * 0.01,
|
||
order.order_status_prompt,
|
||
order.outExpressCompanyName,
|
||
order.tracking_number,
|
||
order.sendStatus,
|
||
"发送"
|
||
);
|
||
row = dgvPddBuyerOrder.Rows[rowIndex];
|
||
row.Height = 40;
|
||
|
||
}
|
||
else
|
||
{
|
||
//row.Cells["colOSelect"].Value = selectIds.Contains(buyer.buyer_id);
|
||
row.Cells["colOBuyerId"].Value = order.buyerId;
|
||
row.Cells["colOBuyerName"].Value = order.buyerName;
|
||
row.Cells["colOPddOrderSn"].Value = order.order_sn;
|
||
row.Cells["colOOrderTime"].Value = order.order_time == null ? "" : BaseClass.StampToDateTime(order.order_time.ParseToInt()).ToString("yy-MM-dd HH:ss");
|
||
//row.Cells["colOImgUrl"].Value = "";
|
||
// 商品信息
|
||
row.Cells["colOGoodsInfo"].Value = order.order_Goods == null ? "" : string.Join("\r\n", order.order_Goods.Select(g => g.goods_name + " x" + g.goods_number));
|
||
row.Cells["colOOrderAmount"].Value = order.order_amount * 0.01;
|
||
row.Cells["dgvOStatus"].Value = order.order_status_prompt;
|
||
row.Cells["colOExpressName"].Value = order.outExpressCompanyName;
|
||
row.Cells["colOExpressId"].Value = order.tracking_number;
|
||
row.Cells["colOMsg"].Value = order.sendStatus;
|
||
}
|
||
}
|
||
|
||
private void InitCef()
|
||
{
|
||
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false);
|
||
CustomResourceRequestHandlerLocal resourceRequestHandler = new CustomResourceRequestHandlerLocal();
|
||
resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete;
|
||
resourceRequestHandler.BeforeResourceLoadEvent += RequestHandler_BeforeResourceLoad;
|
||
cefWebBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler);
|
||
var lifeSapnHandler = new LifeSpanHandlerLocal(PopWindowType.SelfWindow);
|
||
cefWebBrowser.LifeSpanHandler = lifeSapnHandler;
|
||
cefWebBrowser.KeyboardHandler = new KeyboardHandler();
|
||
cefWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd;
|
||
cefWebBrowser.AddressChanged += CefWebBrowser_AddressChanged;
|
||
cefWebBrowser.LoadError += CefWebBrowser_LoadError;
|
||
cefWebBrowser.Dock = DockStyle.Fill;
|
||
cefWebBrowser.SendToBack();
|
||
splitContainer3.Panel2.Controls.Add(cefWebBrowser);
|
||
|
||
//js绑定C#对象
|
||
//PDDShopBrowserObject shopObj = new PDDShopBrowserObject();
|
||
//shopObj.OnInfoReceived += ShopObj_OnInfoReceived;
|
||
//CefSharpSettings.WcfEnabled = true;
|
||
//cefWebBrowser.JavascriptObjectRepository.Register(
|
||
// name: "shopObj",
|
||
// objectToBind: shopObj,
|
||
// isAsync: false,
|
||
// options: new BindingOptions { Binder = BindingOptions.DefaultBinder.Binder /*CamelCaseJavascriptNames = false*/ /*cef79*/ }
|
||
//);
|
||
}
|
||
|
||
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
|
||
{
|
||
if (url.StartsWith("https://mobile.yangkeduo.com/orders.html?type=3&order_index=0"))
|
||
{
|
||
|
||
}
|
||
if (url.StartsWith("https://mobile.yangkeduo.com/orders.html?type=3"))
|
||
{
|
||
Task.Run(() =>
|
||
{
|
||
var data = responseData;
|
||
if (data.Contains("display_amount"))
|
||
{
|
||
var jsonData = BaseRegex.GetJsonObjStrJson(ref data, "ordersStore")?.FirstOrDefault();
|
||
var nickName = BaseRegex.GetStringJson(ref data, "nickName");
|
||
var buyerId = GlobalConfig.BuyerLoginList.FirstOrDefault(b => b.buyer_nick == nickName)?.buyer_id;
|
||
if (!string.IsNullOrEmpty(jsonData) && !string.IsNullOrEmpty(nickName) && !string.IsNullOrEmpty(buyerId))
|
||
{
|
||
var ordersStr = BaseRegex.GetJsonObjStrJson(ref jsonData, "initOdersList")?.FirstOrDefault();
|
||
if (ordersStr != null && ordersStr.StartsWith("{\"3\":"))
|
||
{
|
||
ordersStr = "{\"orders\":" + ordersStr.Substring(5);
|
||
CefReadBuyerOrder(buyerId, ordersStr);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
if (url.StartsWith("https://mobile.yangkeduo.com/orders.html?type=2"))
|
||
{
|
||
Task.Run(() =>
|
||
{
|
||
var data = responseData;
|
||
if (data.Contains("display_amount"))
|
||
{
|
||
var jsonData = BaseRegex.GetJsonObjStrJson(ref data, "ordersStore")?.FirstOrDefault();
|
||
var nickName = BaseRegex.GetStringJson(ref data, "nickName");
|
||
var buyerId = GlobalConfig.BuyerLoginList.FirstOrDefault(b => b.buyer_nick == nickName)?.buyer_id;
|
||
if (!string.IsNullOrEmpty(jsonData) && !string.IsNullOrEmpty(nickName) && !string.IsNullOrEmpty(buyerId))
|
||
{
|
||
var ordersStr = BaseRegex.GetJsonObjStrJson(ref jsonData, "initOdersList")?.FirstOrDefault();
|
||
if (ordersStr != null && ordersStr.StartsWith("{\"2\":"))
|
||
{
|
||
ordersStr = "{\"orders\":" + ordersStr.Substring(5);
|
||
CefReadBuyerOrder(buyerId, ordersStr);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
if (url.StartsWith("https://mobile.yangkeduo.com/proxy/api/api/aristotle/order_list_v3"))
|
||
{
|
||
Task.Run(() =>
|
||
{
|
||
CefReadBuyerOrder(url, responseData);
|
||
});
|
||
}
|
||
}
|
||
|
||
string currentReadBuyer = "";
|
||
void CefReadBuyerOrder(string url, string data)
|
||
{
|
||
if (data.Contains("轻奢壁挂式香皂盒置物架卫生间沥水家居可拆卸收纳盒翻盖肥皂盒"))
|
||
{
|
||
|
||
}
|
||
|
||
var buyer = GlobalConfig.BuyerLoginList.FirstOrDefault(b => url.Contains(b.buyer_id));
|
||
if (buyer == null)
|
||
return;
|
||
|
||
//{"server_time":1775789489,"orders":[],"extra_info":{}}
|
||
if (data.Contains("\"orders\":[]"))
|
||
{
|
||
currentReadBuyer = "";
|
||
return;
|
||
}
|
||
if (data.Contains("\"error_code\":40001"))
|
||
{
|
||
currentReadBuyer = "";
|
||
CheckBuyerLogin(new List<BuyerLoginInfo> { buyer }, false);
|
||
return;
|
||
}
|
||
|
||
var list = JsonHelper.DeserializeJsonToList<PddBuyerOrderInfoLite>(JsonHelper.JObjectParse(data)["orders"].ParseToString());
|
||
foreach (var o in list)
|
||
{
|
||
o.buyerId = buyer.buyer_id;
|
||
o.buyerName = buyer.buyer_name;
|
||
o.outExpressCompanyMsg = o.extra_info.order_hint?.message; // todo 此处转换
|
||
|
||
PddBuyerOrderInfoLite order = null;
|
||
if (!this.lstPddBuyerOrderInfoLite.Any(or => or.order_sn == o.order_sn))
|
||
{
|
||
order = o;
|
||
lstPddBuyerOrderInfoLite.Add(order);
|
||
}
|
||
else
|
||
{
|
||
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;
|
||
order.display_amount = o.display_amount;
|
||
order.extra_info = JsonHelper.DeserializeJsonToObject<extra_info>(JsonHelper.SerializeObject(o.extra_info));
|
||
order.order_amount = o.order_amount;
|
||
order.order_Goods = JsonHelper.DeserializeJsonToList<order_good>(JsonHelper.SerializeObject(o.order_Goods));
|
||
order.order_link_url = o.order_link_url;
|
||
order.order_prompt_color = o.order_prompt_color;
|
||
order.order_status_prompt = o.order_status_prompt;
|
||
order.parent_order_sn = o.parent_order_sn;
|
||
order.service_amount = o.service_amount;
|
||
order.shipping_amount = o.shipping_amount;
|
||
order.outExpressCompanyMsg = o.outExpressCompanyMsg;
|
||
order.order_time = o.order_time;
|
||
order.tracking_number = o.tracking_number;
|
||
}
|
||
}
|
||
|
||
Task.Run(() =>
|
||
{
|
||
SendOrderE57(order);
|
||
});
|
||
|
||
Invoke(new Action(() =>
|
||
{
|
||
ShowOrder(order);
|
||
}));
|
||
}
|
||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_order", lstPddBuyerOrderInfoLite);
|
||
}
|
||
|
||
private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request)
|
||
{
|
||
return false;
|
||
}
|
||
private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e)
|
||
{
|
||
////js绑定C#对象 html页面内声明绑定的C#对象
|
||
//StringBuilder sb = new StringBuilder();
|
||
//sb.Append("(function(){");
|
||
//sb.Append("CefSharp.BindObjectAsync('shopObj');");
|
||
//sb.Append("})();");
|
||
//cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString());
|
||
}
|
||
private void CefWebBrowser_AddressChanged(object sender, CefSharp.AddressChangedEventArgs e)
|
||
{
|
||
if (this.Created && !this.Disposing && !this.IsDisposed)
|
||
{
|
||
//Invoke(new Action(() =>
|
||
//{
|
||
// currentUrl = e.Address;
|
||
// txtAddress.Text = e.Address;
|
||
//}));
|
||
}
|
||
}
|
||
private void CefWebBrowser_LoadError(object sender, CefSharp.LoadErrorEventArgs e)
|
||
{
|
||
}
|
||
|
||
void GetBuyer()
|
||
{
|
||
var ids = dgvBuyer.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true).Select(s => s.Cells["colBuyerId"].Value.ParseToString()).ToList();
|
||
Invoke(new Action(() => { pbLoading.Visible = true; }));
|
||
|
||
Task.Run(() =>
|
||
{
|
||
var url = BaseClass.BuildPDDObjString("user/get_buyer");
|
||
var data = UserLogin.GetSignaturex();
|
||
data += "&page_size=200";
|
||
|
||
var result = GetHtml.PostUtf8(url, data);
|
||
if (string.IsNullOrEmpty(result) || !result.Contains("\"code\":200"))
|
||
result = GetHtml.PostUtf8(url, data);
|
||
|
||
if (result.Contains("\"code\":200"))
|
||
{
|
||
List<BuyerLoginInfo> loginInfoLst = JsonHelper.DeserializeJsonToList<BuyerLoginInfo>(JsonHelper.JObjectParse(result)["data"].ParseToString());
|
||
GlobalConfig.BuyerLoginList.RemoveAll(bu => !loginInfoLst.Any(b => b.buyer_id == bu.buyer_id));
|
||
foreach (var b in loginInfoLst)
|
||
{
|
||
var buyer = GlobalConfig.BuyerLoginList.FirstOrDefault(bu => bu.buyer_id == b.buyer_id);
|
||
if (buyer == null)
|
||
GlobalConfig.BuyerLoginList.Add(b);
|
||
else
|
||
{
|
||
buyer.add_time = b.add_time;
|
||
buyer.buyer_id = b.buyer_id;
|
||
buyer.buyer_name = b.buyer_name;
|
||
buyer.buyer_nick = b.buyer_nick;
|
||
buyer.cookie = b.cookie;
|
||
buyer.mdy_time = b.mdy_time;
|
||
buyer.notes = b.notes;
|
||
buyer.status = b.status;
|
||
buyer.user_name = b.user_name;
|
||
}
|
||
}
|
||
|
||
Invoke(new Action(() =>
|
||
{
|
||
dgvBuyer.Rows.Clear();
|
||
}));
|
||
|
||
foreach (var buyer in GlobalConfig.BuyerLoginList)
|
||
{
|
||
Invoke(new Action(() =>
|
||
{
|
||
BindBuyer(buyer, "", ids);
|
||
}));
|
||
}
|
||
}
|
||
|
||
Invoke(new Action(() =>
|
||
{
|
||
pbLoading.Visible = false;
|
||
}));
|
||
});
|
||
}
|
||
|
||
private void BindBuyer(List<BuyerLoginInfo> buyers, string msg = "", List<string> selectIds = null)
|
||
{
|
||
foreach (var buyer in buyers)
|
||
{
|
||
Invoke(new Action(() =>
|
||
{
|
||
BindBuyer(buyer, msg, selectIds);
|
||
}));
|
||
}
|
||
}
|
||
|
||
private void BindBuyer(BuyerLoginInfo buyer, string msg = "", List<string> selectIds = null)
|
||
{
|
||
if (buyer == null)
|
||
return;
|
||
|
||
if (selectIds == null)
|
||
selectIds = dgvBuyer.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true).Select(s => s.Cells["colBuyerId"].Value.ParseToString()).ToList();
|
||
|
||
bool canUse = buyer.status == "在线";
|
||
var row = dgvBuyer.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colBuyerId").ParseToString() == buyer.buyer_id);
|
||
if (row == null)
|
||
{
|
||
var rowIndex = this.dgvBuyer.Rows.Add(
|
||
selectIds.Contains(buyer.buyer_id),
|
||
buyer.buyer_id,
|
||
buyer.buyer_name,
|
||
buyer.buyer_nick,
|
||
buyer.notes,
|
||
"访问",
|
||
buyer.status
|
||
);
|
||
row = dgvBuyer.Rows[rowIndex];
|
||
}
|
||
else
|
||
{
|
||
row.Cells["colSelect"].Value = selectIds.Contains(buyer.buyer_id);
|
||
row.Cells["colBuyerId"].Value = buyer.buyer_id;
|
||
row.Cells["dgvBuyerName"].Value = buyer.buyer_name;
|
||
row.Cells["dgvBuyerNick"].Value = buyer.buyer_nick;
|
||
row.Cells["colShopNotes"].Value = buyer.notes;
|
||
row.Cells["colBuyerId"].Value = buyer.buyer_id;
|
||
row.Cells["colLoginStatus"].Value = buyer.status;
|
||
row.Cells["colMessage"].Value = msg;
|
||
}
|
||
|
||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Blue : Color.Red;
|
||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Blue : Color.Red;
|
||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightBlue : Color.OrangeRed;
|
||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkBlue : Color.DarkRed;
|
||
}
|
||
|
||
|
||
void AutoGetPddOrder()
|
||
{
|
||
Task.Run(() =>
|
||
{
|
||
Thread.Sleep(5000);
|
||
while (true)
|
||
{
|
||
if(chkPause.Checked)
|
||
{
|
||
Thread.Sleep(1000);
|
||
Invoke(new Action(() =>
|
||
{
|
||
btnSearch.Text = "自动刷新暂停中";
|
||
}));
|
||
continue;
|
||
}
|
||
|
||
if (DateTime.Now > nextGetOrderTime)
|
||
{
|
||
nextGetOrderTime = DateTime.Now.AddMinutes(30);
|
||
GetPddOrder();
|
||
}
|
||
Thread.Sleep(1000);
|
||
Invoke(new Action(() =>
|
||
{
|
||
var ticks = nextGetOrderTime - DateTime.Now;
|
||
btnSearch.Text = "刷新订单 " + ticks.Minutes + ":" + ticks.Seconds;
|
||
}));
|
||
}
|
||
});
|
||
}
|
||
|
||
void GetPddOrder()
|
||
{
|
||
if (cancellationTokenSource != null)
|
||
cancellationTokenSource.Cancel();
|
||
cancellationTokenSource = new CancellationTokenSource();
|
||
Task.Run(() =>
|
||
{
|
||
currentReadBuyer = "";
|
||
|
||
foreach (var buyer in GlobalConfig.BuyerLoginList)
|
||
{
|
||
if (cancellationTokenSource.IsCancellationRequested)
|
||
break;
|
||
|
||
if (buyer.status != "在线")
|
||
continue;
|
||
|
||
try
|
||
{
|
||
while (cefWebBrowser == null || !cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid)
|
||
{
|
||
Thread.Sleep(1);
|
||
}
|
||
|
||
CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null));
|
||
|
||
var cookieLst = JsonHelper.DeserializeJsonToList<CefSharp.Cookie>(buyer?.cookie);
|
||
var t = CEFBrowser.SetCookieAsync(JsonHelper.SerializeObject(cookieLst), cefWebBrowser.GetCookieManager(null));
|
||
|
||
cefWebBrowser.Load("https://mobile.yangkeduo.com/personal.html");
|
||
Thread.Sleep(Randomx.GetId(2000, 3000));
|
||
|
||
string readBuyer = buyer.buyer_id;
|
||
currentReadBuyer = buyer.buyer_id;
|
||
cefWebBrowser.Load("https://mobile.yangkeduo.com/orders.html?type=2");
|
||
Thread.Sleep(Randomx.GetId(2000, 3000));
|
||
|
||
while (currentReadBuyer == readBuyer)
|
||
{
|
||
if (cancellationTokenSource.IsCancellationRequested)
|
||
break;
|
||
|
||
Thread.Sleep(Randomx.GetId(100,300));
|
||
|
||
var jsStr = @"window.scroll({
|
||
top: document.body.scrollHeight,
|
||
left: 0,
|
||
behavior: 'smooth' // 可选,使滚动平滑
|
||
});";
|
||
var t1 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr);
|
||
t1.Wait(1000);
|
||
}
|
||
Thread.Sleep(Randomx.GetId(2000, 3000));
|
||
|
||
readBuyer = buyer.buyer_id;
|
||
currentReadBuyer = buyer.buyer_id;
|
||
cefWebBrowser.Load("https://mobile.yangkeduo.com/orders.html?type=3");
|
||
Thread.Sleep(Randomx.GetId(2000, 3000));
|
||
|
||
while (currentReadBuyer == readBuyer)
|
||
{
|
||
if (cancellationTokenSource.IsCancellationRequested)
|
||
break;
|
||
|
||
Thread.Sleep(Randomx.GetId(100, 300));
|
||
|
||
var jsStr = @"window.scroll({
|
||
top: document.body.scrollHeight,
|
||
left: 0,
|
||
behavior: 'smooth' // 可选,使滚动平滑
|
||
});";
|
||
var t1 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr);
|
||
t1.Wait(1000);
|
||
}
|
||
}
|
||
catch
|
||
{
|
||
}
|
||
Thread.Sleep(Randomx.GetId(6000, 8000));
|
||
}
|
||
}, cancellationTokenSource.Token);
|
||
}
|
||
|
||
private void btnSearch_Click(object sender, EventArgs e)
|
||
{
|
||
nextGetOrderTime = DateTime.Now.AddMinutes(30);
|
||
GetPddOrder();
|
||
}
|
||
|
||
private void pnlEmpty_Click(object sender, EventArgs e)
|
||
{
|
||
this.txtOrderSn.Text = "";
|
||
}
|
||
|
||
private void dgvDbProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||
{
|
||
if (e.ColumnIndex < 0 || e.RowIndex < 0)
|
||
return;
|
||
string headerText = dgvWxOrder.Columns[e.ColumnIndex].HeaderText;
|
||
//var dbId = dgvDbProduct.Rows[e.RowIndex].Cells["col_db_id"].Value.ParseToString();
|
||
//var dbProduct = lstTemuDbProduct.FirstOrDefault(p => p.id.ToString() == dbId);
|
||
|
||
switch (headerText)
|
||
{
|
||
case "详情":
|
||
case "编辑/详情":
|
||
//PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct);
|
||
//if (BaseClass.MainPath != "binxixi")
|
||
//{
|
||
// editForm.pnlSkuOption.Visible = false;
|
||
// editForm.txtProductName.ReadOnly = true;
|
||
// editForm.txtExtCode.ReadOnly = true;
|
||
// editForm.lblSkcId.Text = "仓库编码";
|
||
//}
|
||
//editForm.ShowDialog();
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["col_ext_code"].Value = dbProduct.ext_code;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["colHeadWords"].Value = dbProduct.head_words;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["colEndWords"].Value = dbProduct.end_words;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["colSkuReplaceImgUrl"].Value = dbProduct.sku_img_replace_url;
|
||
break;
|
||
case "主图":
|
||
ShowImgForm imgFrom = new ShowImgForm(dgvWxOrder.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", ""));
|
||
imgFrom.ShowDialog();
|
||
break;
|
||
case "":
|
||
dgvWxOrder.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvWxOrder.Rows[e.RowIndex].Cells["colCheck"].Value;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
}
|
||
|
||
private void btnStopStop_Click(object sender, EventArgs e)
|
||
{
|
||
currentReadBuyer = "";
|
||
if (cancellationTokenSource != null)
|
||
cancellationTokenSource.Cancel();
|
||
Task.Run(() =>
|
||
{
|
||
Thread.Sleep(3000);
|
||
Invoke(new Action(() =>
|
||
{
|
||
if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested)
|
||
pbLoading.Visible = false;
|
||
}));
|
||
});
|
||
}
|
||
|
||
private void PDDDBProdListForm_KeyDown(object sender, KeyEventArgs e)
|
||
{
|
||
}
|
||
|
||
private void PDDDBProdListForm_KeyUp(object sender, KeyEventArgs e)
|
||
{
|
||
}
|
||
|
||
private void WXUserProdListForm_FormClosing(object sender, FormClosingEventArgs e)
|
||
{
|
||
this.Hide();
|
||
e.Cancel = true;
|
||
}
|
||
|
||
private void btnAddBuyler_Click(object sender, EventArgs e)
|
||
{
|
||
PddMobileLoginForm buyerLoginForm = new PddMobileLoginForm(null);
|
||
buyerLoginForm.openType = EnumOpenType.login;
|
||
buyerLoginForm.InitUrl = "https://mobile.yangkeduo.com/login.html?from=https%3A%2F%2Fmobile.yangkeduo.com%2Fpersonal.html";
|
||
buyerLoginForm.ShowDialog();
|
||
GetBuyer();
|
||
}
|
||
|
||
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||
{
|
||
if (e.ColumnIndex < 0 || e.RowIndex < 0)
|
||
return;
|
||
|
||
string headerText = dgvBuyer.Columns[e.ColumnIndex].HeaderText;
|
||
var buyerId = dgvBuyer.Rows[e.RowIndex].Cells["colBuyerId"].Value.ParseToString();
|
||
var buyer = GlobalConfig.BuyerLoginList.FirstOrDefault(p => p.buyer_id.ToString() == buyerId);
|
||
|
||
switch (headerText)
|
||
{
|
||
case "状态":
|
||
case "登录":
|
||
CheckBuyerLogin(new List<BuyerLoginInfo> { buyer }, false);
|
||
if (buyer.status == "在线")
|
||
{
|
||
PddMobileLoginForm shopLoginForm = new PddMobileLoginForm(buyer);
|
||
shopLoginForm.openType = EnumOpenType.manage;
|
||
shopLoginForm.WindowState = FormWindowState.Maximized;
|
||
shopLoginForm.InitUrl = "https://mobile.yangkeduo.com";
|
||
shopLoginForm.Show();
|
||
}
|
||
else
|
||
{
|
||
PddMobileLoginForm shopLoginForm = new PddMobileLoginForm(buyer);
|
||
shopLoginForm.openType = EnumOpenType.login;
|
||
shopLoginForm.InitUrl = "https://mobile.yangkeduo.com/login.html?from=https%3A%2F%2Fmobile.yangkeduo.com%2Fpersonal.html";
|
||
shopLoginForm.ShowDialog();
|
||
GetBuyer();
|
||
}
|
||
break;
|
||
case "访问":
|
||
{
|
||
PddMobileLoginForm shopLoginForm = new PddMobileLoginForm(buyer);
|
||
shopLoginForm.openType = EnumOpenType.manage;
|
||
shopLoginForm.WindowState = FormWindowState.Maximized;
|
||
shopLoginForm.InitUrl = "https://mobile.yangkeduo.com";
|
||
shopLoginForm.Show();
|
||
}
|
||
break;
|
||
case "详情":
|
||
case "编辑/详情":
|
||
//PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct);
|
||
//if (BaseClass.MainPath != "binxixi")
|
||
//{
|
||
// editForm.pnlSkuOption.Visible = false;
|
||
// editForm.txtProductName.ReadOnly = true;
|
||
// editForm.txtExtCode.ReadOnly = true;
|
||
// editForm.lblSkcId.Text = "仓库编码";
|
||
//}
|
||
//editForm.ShowDialog();
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["col_notes"].Value = dbProduct.notes;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["col_ext_code"].Value = dbProduct.ext_code;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["colHeadWords"].Value = dbProduct.head_words;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["colEndWords"].Value = dbProduct.end_words;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name;
|
||
//dgvDbProduct.Rows[e.RowIndex].Cells["colSkuReplaceImgUrl"].Value = dbProduct.sku_img_replace_url;
|
||
break;
|
||
case "":
|
||
case "全选":
|
||
dgvBuyer.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvBuyer.Rows[e.RowIndex].Cells["colSelect"].Value;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
}
|
||
|
||
public void CheckBuyerLogin(List<BuyerLoginInfo> checkBuyers, bool isShowProgress = true)
|
||
{
|
||
for (int i = 0; i < checkBuyers.Count; i++)
|
||
{
|
||
var buyer = GlobalConfig.BuyerLoginList.FirstOrDefault(v => v.buyer_id == checkBuyers[i].buyer_id);
|
||
var buys = GlobalConfig.BuyerLoginList.Where(v => v.buyer_id == checkBuyers[i].buyer_id).ToList();
|
||
if (buyer == null)
|
||
continue;
|
||
|
||
// 先从服务端取最新cookie
|
||
var url = BaseClass.BuildPDDObjString("user/get_buyer");
|
||
var data = UserLogin.GetSignaturex();
|
||
data += "&buyer_ids=" + buyer.buyer_id;
|
||
data += "&page_size=1";
|
||
var result = GetHtml.PostUtf8(url, data);
|
||
if (string.IsNullOrEmpty(result) || !result.Contains("\"code\":200"))
|
||
result = GetHtml.PostUtf8(url, data);
|
||
if (!result.Contains("\"code\":200"))
|
||
continue;
|
||
List<BuyerLoginInfo> loginInfoLst = JsonHelper.DeserializeJsonToList<BuyerLoginInfo>(JsonHelper.JObjectParse(result)["data"].ParseToString());
|
||
|
||
var serverBuyer = loginInfoLst.FirstOrDefault();
|
||
if (buyer != null && serverBuyer != null)
|
||
{
|
||
buyer.cookie = serverBuyer.cookie;
|
||
foreach (var buy in buys)
|
||
{
|
||
buy.cookie = serverBuyer.cookie;
|
||
}
|
||
}
|
||
|
||
if (buyer != null)
|
||
{
|
||
var loginResult = CheckBuyerLogin(buyer);
|
||
if (!loginResult.Contains("\"success\":true") && !loginResult.Contains("\"login\":true") && !loginResult.Contains("\"nickname\""))
|
||
{
|
||
buyer.cookie = "[]";
|
||
foreach (var buy in buys)
|
||
{
|
||
buy.status = "掉线";
|
||
buy.cookie = "[]";
|
||
}
|
||
}
|
||
else
|
||
{
|
||
foreach (var buy in buys)
|
||
{
|
||
buy.status = "在线";
|
||
}
|
||
}
|
||
UpdateServerBuyerCookies(buyer); // 店铺cookie和状态写入服务端
|
||
}
|
||
if (this.Created && isShowProgress)
|
||
{
|
||
this.Invoke(new Action(() =>
|
||
{
|
||
this.statusBar.lblTaskStatus.Text = "正在检测...";
|
||
this.statusBar.pgbTaskProgress.Value = (i + 1);
|
||
this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + checkBuyers.Count;
|
||
BindBuyer(buyer);
|
||
}));
|
||
}
|
||
}
|
||
}
|
||
|
||
public static string CheckBuyerLogin(BuyerLoginInfo buyer, string refere = "https://mobile.yangkeduo.com/goods.html")
|
||
{
|
||
string url = "https://mobile.yangkeduo.com/proxy/api/api/apollo/v3/user/me?pdduid=" + buyer.buyer_id;
|
||
return YkdHttpResponseBLL.YangkeduoGetResponse(buyer, url, refere);
|
||
}
|
||
|
||
public static string UpdateServerBuyerCookies(BuyerLoginInfo buyer, string fromTool = null)
|
||
{
|
||
var url = BaseClass.BuildPDDObjString("user/mdy_buyer_cookie");
|
||
var data = UserLogin.GetSignaturex()
|
||
+ "&status=" + buyer.status
|
||
+ "&cookie=" + GetHtml.UrlEncodeUtf8(buyer.cookie)
|
||
+ "&buyer_id=" + buyer.buyer_id;
|
||
var result = GetHtml.PostUtf8(url, data);
|
||
if (!result.Contains("\"code\":200"))
|
||
result = GetHtml.PostUtf8(url, data);
|
||
return result;
|
||
}
|
||
|
||
private void btnRefresh_Click(object sender, EventArgs e)
|
||
{
|
||
GetBuyer();
|
||
}
|
||
|
||
private void btnCheck_Click(object sender, EventArgs e)
|
||
{
|
||
var ids = dgvBuyer.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true).Select(s => s.Cells["colBuyerId"].Value.ParseToString()).ToList();
|
||
var buyers = GlobalConfig.BuyerLoginList.Where(b => ids.Contains(b.buyer_id)).ToList();
|
||
Task.Run(() => {
|
||
CheckBuyerLogin(buyers);
|
||
});
|
||
}
|
||
|
||
private void btnDel_Click(object sender, EventArgs e)
|
||
{
|
||
if (BaseMsgForm.ShowConfirm("确定删除吗?删除后不可恢复!").DialogResult == DialogResult.Cancel)
|
||
return;
|
||
|
||
var ids = dgvBuyer.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true).Select(s => s.Cells["colBuyerId"].Value.ParseToString()).ToList();
|
||
var buyers = GlobalConfig.BuyerLoginList.Where(b => ids.Contains(b.buyer_id)).ToList();
|
||
this.statusBar.pgbTaskProgress.Maximum = buyers.Count;
|
||
pbLoading.Visible = true;
|
||
|
||
Task.Run(() =>
|
||
{
|
||
int i = 0;
|
||
foreach (var buyer in buyers)
|
||
{
|
||
i++;
|
||
this.Invoke(new Action(() =>
|
||
{
|
||
this.statusBar.lblTaskStatus.Text = "正在删除...";
|
||
this.statusBar.pgbTaskProgress.Value = i;
|
||
this.statusBar.pgbTaskProgress.Text = i + "/" + buyers.Count;
|
||
}));
|
||
|
||
var url = BaseClass.BuildPDDObjString("user/del_buyer");
|
||
var data = UserLogin.GetSignaturex()
|
||
+ "&buyer_id=" + buyer.buyer_id;
|
||
var result = GetHtml.PostUtf8(url, data);
|
||
|
||
Thread.Sleep(100);
|
||
}
|
||
this.Invoke(new Action(() =>
|
||
{
|
||
this.statusBar.lblTaskStatus.Text = "删除完成";
|
||
this.statusBar.pgbTaskProgress.Value = buyers.Count;
|
||
this.statusBar.pgbTaskProgress.Text = buyers.Count + "/" + buyers.Count;
|
||
}));
|
||
GetBuyer();
|
||
});
|
||
}
|
||
|
||
private void dgvPddBuyerOrder_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||
{
|
||
if (e.ColumnIndex < 0 || e.RowIndex < 0)
|
||
return;
|
||
string headerText = dgvPddBuyerOrder.Columns[e.ColumnIndex].HeaderText;
|
||
var orderSn = dgvPddBuyerOrder.Rows[e.RowIndex].Cells["colOPddOrderSn"].Value.ParseToString();
|
||
var order = lstPddBuyerOrderInfoLite.FirstOrDefault(p => p.order_sn == orderSn);
|
||
|
||
|
||
switch (headerText)
|
||
{
|
||
case "详情":
|
||
case "编辑/详情":
|
||
break;
|
||
case "发送":
|
||
Task.Run(() =>
|
||
{
|
||
SendOrderE57(order, true);
|
||
});
|
||
break;
|
||
case "图片":
|
||
ShowImgForm imgFrom = new ShowImgForm(dgvPddBuyerOrder.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", ""));
|
||
imgFrom.ShowDialog();
|
||
break;
|
||
case "":
|
||
case "全选":
|
||
dgvPddBuyerOrder.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvPddBuyerOrder.Rows[e.RowIndex].Cells["colCheck"].Value;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
}
|
||
|
||
public void SendOrderE57(PddBuyerOrderInfoLite order, bool resetSendStatus = false)
|
||
{
|
||
if (resetSendStatus)
|
||
order.sendStatus = "";
|
||
|
||
if (order.sendStatus == "已发送")
|
||
{
|
||
return;
|
||
}
|
||
// 已发货且没有运单号的属于已退货,不再发送
|
||
if (order.order_status_prompt != "拼单成功,待发货" && order.order_status_prompt != "免拼成功,待发货" && (string.IsNullOrEmpty(order.tracking_number) || string.IsNullOrEmpty(order.outExpressCompanyName)))
|
||
{
|
||
order.sendStatus = "已发货退货";
|
||
Invoke(new Action(() =>
|
||
{
|
||
ShowOrder(order);
|
||
}));
|
||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_order", lstPddBuyerOrderInfoLite);
|
||
return;
|
||
}
|
||
|
||
JObject obj = new JObject();
|
||
obj["platform"] = "WEISHOP";
|
||
obj["outAmount"] = order.order_amount;
|
||
obj["outAccount"] = order.buyerName;
|
||
obj["outOrderNo"] = order.order_sn;
|
||
obj["outExpressCompany"] = order.outExpressCompanyCode;
|
||
obj["outExpressNo"] = order.tracking_number;
|
||
var dataStr = JsonHelper.SerializeObject(obj);
|
||
string url = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/bind";
|
||
//成功 "<ResultVo><code>0</code><msg>SUCCESS</msg><data/><totalRecords/></ResultVo>"
|
||
//失败 已存在
|
||
//<ResultVo><code>1505</code><msg>调用微信接口更新物流信息失败: 非法参数, 同运单号拦截 rid: 69d8ab9c-22baa3b1-67de0d95</msg><data/><totalRecords/></ResultVo>
|
||
var exportRst = WXHttpResponseBLL.e57PostResponse(url, dataStr, "");
|
||
if (exportRst.Contains("发送失败 操作超时"))
|
||
WXHttpResponseBLL.e57PostResponse(url, dataStr, "");
|
||
if (exportRst.Contains("SUCCESS") || exportRst.Contains("已存在") || exportRst.Contains("同运单号拦截") || exportRst.Contains("订单已绑定外采订单"))
|
||
{
|
||
order.sendStatus = "已发送";
|
||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_order", lstPddBuyerOrderInfoLite);
|
||
}
|
||
else if (exportRst != null && exportRst.Contains("<msg>") && exportRst.Contains("</msg>"))
|
||
{
|
||
order.sendStatus = exportRst.Substring(0, exportRst.IndexOf("</msg>")).Substring(exportRst.IndexOf("<msg>") + 5);
|
||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_order", lstPddBuyerOrderInfoLite);
|
||
}
|
||
else
|
||
{
|
||
order.sendStatus = "发送失败 " + exportRst;
|
||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_order", lstPddBuyerOrderInfoLite);
|
||
}
|
||
Invoke(new Action(() =>
|
||
{
|
||
ShowOrder(order);
|
||
}));
|
||
//Thread.Sleep(500);
|
||
}
|
||
|
||
private void panelEx3_Click(object sender, EventArgs e)
|
||
{
|
||
dgvPddBuyerOrder.Visible = !dgvPddBuyerOrder.Visible;
|
||
if (dgvPddBuyerOrder.Visible == false)
|
||
panelEx3.Text = "打开";
|
||
else
|
||
panelEx3.Text = "折叠";
|
||
}
|
||
|
||
private void panelEx1_Click(object sender, EventArgs e)
|
||
{
|
||
if (dgvPddBuyerOrder.Height < dgvPddBuyerOrder.Parent.Height)
|
||
dgvPddBuyerOrder.Height += 50;
|
||
if (dgvPddBuyerOrder.Height > dgvPddBuyerOrder.Parent.Height)
|
||
dgvPddBuyerOrder.Height = dgvPddBuyerOrder.Parent.Height;
|
||
}
|
||
|
||
private void panelEx2_Click(object sender, EventArgs e)
|
||
{
|
||
if (dgvPddBuyerOrder.Height > 100)
|
||
dgvPddBuyerOrder.Height -= 100;
|
||
if (dgvPddBuyerOrder.Height < 100)
|
||
dgvPddBuyerOrder.Height = 100;
|
||
}
|
||
|
||
TimeSpan PauseTick = new TimeSpan(1);
|
||
private void chkPause_CheckedChanged(object sender, EventArgs e)
|
||
{
|
||
if (chkPause.Checked != true)
|
||
nextGetOrderTime = DateTime.Now + PauseTick;
|
||
else
|
||
PauseTick = nextGetOrderTime - DateTime.Now;
|
||
|
||
}
|
||
}
|
||
|
||
public class YkdBuyerOrder
|
||
{
|
||
|
||
}
|
||
|
||
public class WxOrder
|
||
{
|
||
// orderStatus:20待发货 0售后中 30已发货
|
||
public static string OrderSeach(ShopLoginInfo shop, string orderId, string telNumber, int orderStatus = 20, int page = 1, string startTime="", string endTime="")
|
||
{
|
||
if (string.IsNullOrWhiteSpace(startTime))
|
||
startTime = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date.AddMonths(-1)).ToString();
|
||
if (string.IsNullOrWhiteSpace(endTime))
|
||
endTime = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date).ToString();
|
||
|
||
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeorder/list/cgi/orderSearch?token=&lang=zh_CN";
|
||
string referer = "https://store.weixin.qq.com/shop/order/list";
|
||
string body = @"{""isSearch"":true,""pageSize"":100,""overTime"":0,""pengingShipOneDay"":0,""pengingShipSixHour"":0,""expediteDelivery"":0," +
|
||
@"""stockoutPunishAlert"":0,""waybillStatus"":0,""pageNum"":1,""onAftersaleOrderExist"":0,""orderStatus"":" + orderStatus +
|
||
@",""page"":" + page + @",""orderId"":""" + orderId + @""",""orderTime"":{""type"":0,""time"":[" + startTime + @"," + endTime + @"]}," +
|
||
@"""telNumber"":""" + telNumber + @""",""title"":"""",""receiverName"":"""",""finderNickName"":"""",""merchantNotes"":""""," +
|
||
@"""merchantNotesTagColor"":0,""waybillId"":"""",""productCode"":"""",""inspectStatus"":"""",""finderWay"":0,""searchOrderType"":0," +
|
||
@"""payMethod"":0,""orderChannel"":0,""bulkbuyActivityId"":"""",""deliveryNegotiationFlag"":0,""transactionId"":""""," +
|
||
@"""startCreateTime"":" + startTime + @",""endCreateTime"":" + endTime + @"}";
|
||
var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer);
|
||
return result;
|
||
}
|
||
}
|
||
}
|