diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 14cb99d3..481bac6d 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -3300,9 +3300,11 @@ namespace Myshipping.Application var sysconfig = await _cache.GetAllSysConfig(); var urlConfig = sysconfig.FirstOrDefault(x => x.GroupCode == "DJY_CONST" && x.Code == "DjyVgmApiMyshpping"); - var useridConfig = sysconfig.FirstOrDefault(x => x.GroupCode == "DJY_CONST" && x.Code == "DjyVgmApiMyshppingUserId"); - var userSecretConfig = sysconfig.FirstOrDefault(x => x.GroupCode == "DJY_CONST" && x.Code == "DjyVgmApiMyshppingUserSecret"); - + var accConfig = await _webAccountConfig.GetAccountConfig("DjyVgm", UserManager.UserId); + if (accConfig == null) + { + throw Oops.Bah("请在网站账号中维护VGM接口的用户id和秘钥"); + } var objMdata = new { @@ -3341,8 +3343,8 @@ namespace Myshipping.Application var dictParam = new Dictionary { { "ac", "vgm" }, - { "uid", useridConfig.Value}, - { "skey", userSecretConfig.Value}, + { "uid", accConfig.Account}, + { "skey", accConfig.Password}, { "optype", "9"}, { "mdata", JsonConvert.SerializeObject(objMdata)}, { "ctndata", JsonConvert.SerializeObject(listCtn)}