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

master
zhangxiaofeng 2 weeks ago
parent 0128b84f4a
commit 1c309f438d

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

Loading…
Cancel
Save