修改往来单位地址

optimize
jianghaiqing 1 year ago
parent 1cdf68e53a
commit 89a167db6d

@ -9,7 +9,7 @@ namespace Myshipping.Core.Entity
/// </summary>
[SugarTable("djy_customer_addr")]
[Description("客户地址")]
public class DjyCustomerAddr
public class DjyCustomerAddr : DBEntityTenant
{
/// <summary>
/// 客户Id

@ -111,7 +111,7 @@ namespace Myshipping.Core.Service
await _repContact.InsertAsync(contactList);
//地址
var addrList = input.Contacts.Adapt<List<DjyCustomerAddr>>();
var addrList = input.Addrs.Adapt<List<DjyCustomerAddr>>();
addrList.ForEach(x => x.CustomerId = entity.Id);
await _repAddr.InsertAsync(addrList);
@ -159,7 +159,7 @@ namespace Myshipping.Core.Service
await _repContact.InsertAsync(contactList);
//地址
await _repAddr.DeleteAsync(x => x.CustomerId == input.Id);
var addrList = input.Contacts.Adapt<List<DjyCustomerAddr>>();
var addrList = input.Addrs.Adapt<List<DjyCustomerAddr>>();
addrList.ForEach(x => x.CustomerId = entity.Id);
await _repAddr.InsertAsync(addrList);
return entity.Id;

Loading…
Cancel
Save