ONE订舱邮箱将订单里的邮箱与模板里的邮箱结合起来

master
zhangxiaofeng 2 weeks ago
parent 0128b84f4a
commit 1c309f438d

@ -225,22 +225,32 @@ namespace Myshipping.Application.EDI
}; };
postModel.copyNum = custOrder.CopyNum; postModel.copyNum = custOrder.CopyNum;
// 邮箱
postModel.emailList = new List<string>();
if (!string.IsNullOrWhiteSpace(custOrder.OpMail)) if (!string.IsNullOrWhiteSpace(custOrder.OpMail))
{ {
var mailStr = custOrder.OpMail.Replace("", ","); var mailStr = custOrder.OpMail.Replace("", ",").Replace(";", ",").Replace("", ",");
var mailList = mailStr.Split(',').Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x.Trim()).ToList(); var mailList = mailStr.Split(',').Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x.Trim()).ToList();
postModel.emailList = mailList; postModel.emailList.AddRange(mailList);
} }
//else if (!string.IsNullOrEmpty(custContact.Email)) if (!string.IsNullOrEmpty(template.BcReceiveEmail))
//{ {
// postModel.emailList = new List<string>() { custContact.Email }; var mailStr = template.BcReceiveEmail.Replace("", ",").Replace(";", ",").Replace("", ",");
//} var mailList = template.BcReceiveEmail.Split(',').Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x.Trim()).ToList();
//else if (!string.IsNullOrEmpty(template.BcReceiveEmail)) postModel.emailList.AddRange(mailList);
//{ }
// postModel.emailList = new List<string>() { template.BcReceiveEmail }; postModel.emailList = postModel.emailList.Distinct().ToList();
//}
//else if (!string.IsNullOrEmpty(custContact.Email))
var apiUrl = sCfgSpiderUrl.Value; //{
// postModel.emailList = new List<string>() { custContact.Email };
//}
//else if (!string.IsNullOrEmpty(template.BcReceiveEmail))
//{
// postModel.emailList = new List<string>() { template.BcReceiveEmail };
//}
var apiUrl = sCfgSpiderUrl.Value;
if (!apiUrl.EndsWith("/")) if (!apiUrl.EndsWith("/"))
{ {
apiUrl += "/"; apiUrl += "/";

Loading…
Cancel
Save