VGM发送取网站账号配置

optimize
wanghaomei 2 years ago
parent 03e224e837
commit 189c6aa2ba

@ -3300,9 +3300,11 @@ namespace Myshipping.Application
var sysconfig = await _cache.GetAllSysConfig(); var sysconfig = await _cache.GetAllSysConfig();
var urlConfig = sysconfig.FirstOrDefault(x => x.GroupCode == "DJY_CONST" && x.Code == "DjyVgmApiMyshpping"); 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 accConfig = await _webAccountConfig.GetAccountConfig("DjyVgm", UserManager.UserId);
var userSecretConfig = sysconfig.FirstOrDefault(x => x.GroupCode == "DJY_CONST" && x.Code == "DjyVgmApiMyshppingUserSecret"); if (accConfig == null)
{
throw Oops.Bah("请在网站账号中维护VGM接口的用户id和秘钥");
}
var objMdata = new var objMdata = new
{ {
@ -3341,8 +3343,8 @@ namespace Myshipping.Application
var dictParam = new Dictionary<string, string> { var dictParam = new Dictionary<string, string> {
{ "ac", "vgm" }, { "ac", "vgm" },
{ "uid", useridConfig.Value}, { "uid", accConfig.Account},
{ "skey", userSecretConfig.Value}, { "skey", accConfig.Password},
{ "optype", "9"}, { "optype", "9"},
{ "mdata", JsonConvert.SerializeObject(objMdata)}, { "mdata", JsonConvert.SerializeObject(objMdata)},
{ "ctndata", JsonConvert.SerializeObject(listCtn)} { "ctndata", JsonConvert.SerializeObject(listCtn)}

Loading…
Cancel
Save