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 != "登录成功")
|
||||
|
||||
+12
-6
@@ -2,6 +2,8 @@
|
||||
using AllBase.DouYinModel.Param.ConfigManage;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Config;
|
||||
using AllBase.Model.DBModel;
|
||||
using NaiBa.Util;
|
||||
using NaiBa.Util.Helper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -14,12 +16,16 @@ namespace _29WxOrderWpf
|
||||
{
|
||||
public class StartUp
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
GlobalConfig.BuyConfig = ConfigHelper.LoadConfig<BuyConfig>("buy_config_260708");
|
||||
if (GlobalConfig.BuyConfig == null)
|
||||
GlobalConfig.BuyConfig = new BuyConfig();
|
||||
}
|
||||
public static void Init()
|
||||
{
|
||||
GlobalConfig.BuyConfig = ConfigHelper.LoadConfig<BuyConfig>("buy_config_260708");
|
||||
if (GlobalConfig.BuyConfig == null)
|
||||
GlobalConfig.BuyConfig = new BuyConfig();
|
||||
|
||||
GlobalConfig.lstWXShopTokenInfo = ConfigHelper.LoadConfig<ConcurrentList<WXShopTokenInfo>>("wx_shop_token_list");
|
||||
if (GlobalConfig.lstWXShopTokenInfo == null)
|
||||
GlobalConfig.lstWXShopTokenInfo = new ConcurrentList<WXShopTokenInfo>();
|
||||
}
|
||||
|
||||
public static void SaveBuyConfig()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user