修改EDI发送FTP、邮件的请求API地址没配置时增加提醒

optimize
jianghaiqing 2 years ago
parent 6e5121f0a1
commit c931dd8fcf

@ -3645,7 +3645,11 @@ namespace Myshipping.Application
par.Add("pwd", ediCfg.PASSWORD); par.Add("pwd", ediCfg.PASSWORD);
par.Add("path", ediCfg.FOLDERNAME); par.Add("path", ediCfg.FOLDERNAME);
var ftpSpiderUrl = _cache.GetAllDictData().GetAwaiter().GetResult().FirstOrDefault(x => x.TypeCode == "url_set" && x.Code == "booking_edi_ftp_server").Value; var ftpSpiderUrl = _cache.GetAllDictData().GetAwaiter().GetResult()
.FirstOrDefault(x => x.TypeCode == "url_set" && x.Code == "booking_edi_ftp_server")?.Value;
if (ftpSpiderUrl == null)
throw Oops.Bah("字典未配置 url_set->booking_edi_ftp_server 请联系管理员");
//var fileInfo = new FileInfo(filePath); //var fileInfo = new FileInfo(filePath);
@ -3716,7 +3720,10 @@ namespace Myshipping.Application
CommonWebApiResult result = new CommonWebApiResult { succ = true }; CommonWebApiResult result = new CommonWebApiResult { succ = true };
var emailUrl = _cache.GetAllDictData().GetAwaiter().GetResult() var emailUrl = _cache.GetAllDictData().GetAwaiter().GetResult()
.FirstOrDefault(x => x.TypeCode == "url_set" && x.Code == "email_api_url").Value; .FirstOrDefault(x => x.TypeCode == "url_set" && x.Code == "email_api_url")?.Value;
if(emailUrl == null)
throw Oops.Bah("字典未配置 url_set->email_api_url 请联系管理员");
List<EmailApiDto> emailList = new List<EmailApiDto>(); List<EmailApiDto> emailList = new List<EmailApiDto>();

Loading…
Cancel
Save