api调用加入代发相关逻辑
This commit is contained in:
1 parent
6b1b8507c7
commit
dacacb352c
7 files changed
+167
-38
No files matched your search
@@ -508,30 +508,49 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
return;
|
||||
}
|
||||
|
||||
// 检测是否加入代发
|
||||
if (orderItem.Shop?.LoginStatus == "登录成功" && orderItem.BuyGoodsBtnTxt == "云仓拍单" && !isAbnormalOrder)
|
||||
{
|
||||
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierOrderList(orderItem.Shop, orderItem.order_id);
|
||||
if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierOrderList(orderItem.Shop, orderItem.order_id);
|
||||
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"supplierName\":\"29供货商\"")) // "supplierName":"29供货商"
|
||||
{
|
||||
orderItem.Shop.Is29Supplier = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ShopBLL.CheckShopLogin(orderItem.Shop);
|
||||
if (orderItem.Shop?.LoginStatus == "登录成功")
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("店铺后台未查询到该代发单,请确认店铺在线且商品加入代发");
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Api检测是否加入代发
|
||||
if (orderItem.BuyGoodsBtnTxt == "云仓拍单" && !isAbnormalOrder)
|
||||
{
|
||||
var apiSearchDropship = new WxApiBLL().WxApiDropshipSearch(orderItem.Shop, orderItem.order_id, 100);
|
||||
if (apiSearchDropship.Contains("\"ds_order_id_list\":[]"))
|
||||
{
|
||||
var apiAddDropship = new WxApiBLL().WxApiDropshipAssign(orderItem.Shop, orderItem.order_id, orderItem.product_id, orderItem.sku_id, orderItem.sku_cnt.ParseToInt());
|
||||
}
|
||||
apiSearchDropship = new WxApiBLL().WxApiDropshipSearch(orderItem.Shop, orderItem.order_id, 100);
|
||||
if (apiSearchDropship.Contains("\"ds_order_id_list\":[]"))
|
||||
BaseMsgWindow.ShowError("店铺后台未查询到该代发单,请确商品已加入29供货商代发");
|
||||
}
|
||||
|
||||
// 模拟检测是否加入代发
|
||||
//if (orderItem.Shop?.LoginStatus == "登录成功" && orderItem.BuyGoodsBtnTxt == "云仓拍单" && !isAbnormalOrder)
|
||||
//{
|
||||
// var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierOrderList(orderItem.Shop, orderItem.order_id);
|
||||
// if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
// is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierOrderList(orderItem.Shop, orderItem.order_id);
|
||||
// if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
// {
|
||||
// ShopBLL.CheckShopLogin(orderItem.Shop);
|
||||
// if (orderItem.Shop?.LoginStatus != "登录成功")
|
||||
// {
|
||||
// Dispatcher.Invoke(new Action(() =>
|
||||
// {
|
||||
// BaseMsgWindow.ShowAnimateMessage("店铺掉线", "Error", 5);
|
||||
// btnBuyOrder.Cursor = Cursors.Hand;
|
||||
// }));
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// if (!is29SupplierRst.Contains("\"supplierName\":\"29供货商\"")) // "supplierName":"29供货商"
|
||||
// {
|
||||
// Dispatcher.Invoke(new Action(() =>
|
||||
// {
|
||||
// BaseMsgWindow.ShowError("店铺后台未查询到该代发单,请确认店铺在线且商品加入代发");
|
||||
// btnBuyOrder.Cursor = Cursors.Hand;
|
||||
// }));
|
||||
// return;
|
||||
// }
|
||||
// orderItem.Shop.Is29Supplier = true;
|
||||
//}
|
||||
|
||||
// 掉线提示重登
|
||||
if (orderItem.Shop?.LoginStatus != "登录成功")
|
||||
|
||||
Reference in new issue
Block a user