diff --git a/BBWY.Client/APIServices/MdsApiService.cs b/BBWY.Client/APIServices/MdsApiService.cs index 8a6d32e5..e2740001 100644 --- a/BBWY.Client/APIServices/MdsApiService.cs +++ b/BBWY.Client/APIServices/MdsApiService.cs @@ -4,6 +4,7 @@ using BBWY.Common.Models; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; +using System.Linq; using System.Net.Http; namespace BBWY.Client.APIServices @@ -58,13 +59,19 @@ namespace BBWY.Client.APIServices response.Data.Add(d); foreach (var jShop in jayShops) { - if (jShop.Value("ShopId") == null || string.IsNullOrEmpty(jShop.Value("AppToken"))) + var shopId = jShop.Value("ShopId"); + if (shopId == null || string.IsNullOrEmpty(jShop.Value("AppToken"))) continue; //排除未授权 try { + var jayAccounts = jShop.Value("AccountList"); + if ((jayAccounts == null || !jayAccounts.HasValues) && d.ShopList.Count(s => s.ShopId == shopId) > 0) + { + continue; + } var shop = new Shop() { - ShopId = jShop.Value("ShopId"), + ShopId = shopId.Value, AppKey = jShop.Value("AppKey"), AppSecret = jShop.Value("AppSecret"), AppToken = jShop.Value("AppToken"), @@ -76,9 +83,7 @@ namespace BBWY.Client.APIServices TeamId = jShop.Value("TeamId") }; d.ShopList.Add(shop); - var jayAccounts = jShop.Value("AccountList"); - if (jayAccounts == null || !jayAccounts.HasValues) - continue; + shop.PurchaseAccountList = new List(); foreach (var jPurchaseAccount in jayAccounts) { @@ -89,8 +94,8 @@ namespace BBWY.Client.APIServices AppKey = jPurchaseAccount.Value("AppKey"), AppSecret = jPurchaseAccount.Value("AppSecret"), AppToken = jPurchaseAccount.Value("AppToken"), - ShopId = shop.ShopId - //PurchasePlatformId = jPurchaseAccount.Value() + ShopId = shop.ShopId, + PurchasePlatformId = (Platform)jPurchaseAccount.Value("AppPlatformId") }); } } diff --git a/BBWY.Client/App.xaml.cs b/BBWY.Client/App.xaml.cs index c927f624..1a11d216 100644 --- a/BBWY.Client/App.xaml.cs +++ b/BBWY.Client/App.xaml.cs @@ -48,6 +48,8 @@ namespace BBWY.Client //齐越山鸡 userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTM1MzMwMzI4ODkyMTQ5NzYwIiwidGVhbUlkIjoiMTUxNjk3NDI1MDU0MjUwMTg4OCIsInNvblRlYW1JZHMiOiIxNDM2Mjg4NTAwMjM1MjQzNTIwIiwiZXhwIjoxNjk0NjY5NjkxfQ.cSwro-7bGwOu92YejH9JhMenTai7Mvf99i2paQCmxIw"; + //userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTIwOTc1NzQ0MTY2MDA2Nzg0IiwidGVhbUlkIjoiMTQzNjI4ODUwMDIzNTI0MzUyMCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE3MDkyNzQ3NzZ9.2aAkMNeDPHUZ3q0K83Usp7QNhPMkBNW8uWxknJZ49oE"; + //刷单组测试 //userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTcxODUyODE0OTAzMTUyNjQwIiwidGVhbUlkIjoiMTU3MTg1MjQ1MDI5NjUwMDIyNCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE2OTUxNDc2ODh9.hVupdHnhgHHGo3QrMSDqhINqtq6Q5_RovWyXjiMkkEs"; //齐越愉辰 diff --git a/BBWY.Client/Views/MainWindow.xaml b/BBWY.Client/Views/MainWindow.xaml index 88785d2c..369d3366 100644 --- a/BBWY.Client/Views/MainWindow.xaml +++ b/BBWY.Client/Views/MainWindow.xaml @@ -26,7 +26,7 @@ - + diff --git a/BBWY.Server.Business/PlatformSDK/LogisticsCompanyConverter.cs b/BBWY.Server.Business/PlatformSDK/LogisticsCompanyConverter.cs index abcdfb5c..c3e5e88b 100644 --- a/BBWY.Server.Business/PlatformSDK/LogisticsCompanyConverter.cs +++ b/BBWY.Server.Business/PlatformSDK/LogisticsCompanyConverter.cs @@ -44,6 +44,10 @@ namespace BBWY.Server.Business new LogisticsCompanyRelationship(){SourceName="极兔快递(原百世快递)",TargetName="京旗联盟-极兔",SecondTargetName ="厂家自送"}, new LogisticsCompanyRelationship(){SourceName="极兔速递-原百世快递",TargetName="京旗联盟-极兔",SecondTargetName ="厂家自送"} }); + converterDictionary.Add($"{Enums.Platform.拳探}_{Enums.Platform.京东}", new List() + { + + }); } ///