微信店铺重发优化功能
This commit is contained in:
1 parent
16342df70a
commit
daa7f733fc
28 files changed
+3675
-986
No files matched your search
@@ -1306,8 +1306,18 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
}
|
||||
}
|
||||
|
||||
bool isSendOrderE57 = false;
|
||||
public void SendOrderE57(PddBuyerOrderInfoLite order, bool resetSendStatus = false)
|
||||
{
|
||||
if (resetSendStatus == true)
|
||||
{
|
||||
// 防止重复点击发送按钮
|
||||
if (isSendOrderE57)
|
||||
return;
|
||||
isSendOrderE57 = true;
|
||||
Task.Run(() => { Thread.Sleep(2500); isSendOrderE57 = false; });
|
||||
}
|
||||
|
||||
if (order == null)
|
||||
return;
|
||||
if (resetSendStatus)
|
||||
@@ -1339,7 +1349,7 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
// 外采订单已发货的订单不再尝试发货
|
||||
//if (order.sendStatus == "已发送")
|
||||
// return;
|
||||
if (order.sendStatus.Contains("外采订单已发货"))
|
||||
if (order.sendStatus.Contains("外采订单已发货") || order.sendStatus.Contains("更新外采订单微信发货成功"))
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -1363,15 +1373,26 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
var exportRst = WXHttpResponseBLL.e57PostResponse(url, dataStr, "");
|
||||
for (int i = 0; i < 5 && exportRst.Contains("操作超时"); i++)
|
||||
{
|
||||
Thread.Sleep(2000);
|
||||
Thread.Sleep(3000);
|
||||
WXHttpResponseBLL.e57PostResponse(url, dataStr, "");
|
||||
}
|
||||
if (exportRst.Contains("操作超时"))
|
||||
{
|
||||
order.sendStatus = "发送失败 操作超时";
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_order_list", lstPddBuyerOrderInfoLite);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
ShowOrder(order);
|
||||
}));
|
||||
return;
|
||||
}
|
||||
// exportRst.Contains("已存在") || exportRst.Contains("同运单号拦截") || exportRst.Contains("订单已绑定外采订单")
|
||||
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
|
||||
xmlDoc.LoadXml(exportRst); //<ResultVo><code>1505</code><msg>不支持的平台类型: WEISHOP</msg><data/><totalRecords/></ResultVo>
|
||||
string msg = xmlDoc["ResultVo"]["msg"].InnerText;
|
||||
string data = xmlDoc["ResultVo"]["data"].InnerText;
|
||||
if (msg == "SUCCESS")
|
||||
string code = xmlDoc["ResultVo"]["code"].InnerText;
|
||||
if (code == "0" || msg == "SUCCESS") //if (msg == "SUCCESS")
|
||||
{
|
||||
order.sendStatus = string.IsNullOrEmpty(data) ? msg : data;
|
||||
if (order.sendStatus == "更新微信外采订单状态成功")
|
||||
|
||||
Reference in new issue
Block a user