Merge branch 'v1.0.5' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api into v1.0.5
This commit is contained in:
@@ -389,13 +389,22 @@ namespace WMS.Web.Repositories.Configuration
|
||||
ent.ToTable("t_wms_subscribe_notification");
|
||||
ent.HasKey(x => x.Id);
|
||||
|
||||
var valueComparer = new ValueComparer<List<string>>(
|
||||
(c1, c2) => c1.SequenceEqual(c2),
|
||||
c => c.Aggregate(0, (a, v) => HashCode.Combine(a, v.GetHashCode())),
|
||||
c => c.ToList());
|
||||
|
||||
ent.Property(f => f.Telephones).HasConversion(
|
||||
v => JsonConvert.SerializeObject(v),
|
||||
v => JsonConvert.DeserializeObject<List<string>>(v));
|
||||
v => JsonConvert.DeserializeObject<List<string>>(v))
|
||||
.Metadata
|
||||
.SetValueComparer(valueComparer);
|
||||
|
||||
ent.Property(f => f.Emails).HasConversion(
|
||||
v => JsonConvert.SerializeObject(v),
|
||||
v => JsonConvert.DeserializeObject<List<string>>(v));
|
||||
v => JsonConvert.DeserializeObject<List<string>>(v))
|
||||
.Metadata
|
||||
.SetValueComparer(valueComparer); ;
|
||||
});
|
||||
|
||||
base.OnModelCreating(builder);
|
||||
|
||||
@@ -256,6 +256,7 @@ namespace WMS.Web.Repositories
|
||||
else
|
||||
return null;
|
||||
}
|
||||
response.IsOldOps = false;
|
||||
response.BoxId = entity.serial.BoxId;
|
||||
response.BoxBillNo = entity?.box?.BoxBillNo ?? "";
|
||||
response.SubStockCode = entity?.boxInventory?.SubStockCode ?? "";
|
||||
@@ -290,6 +291,7 @@ namespace WMS.Web.Repositories
|
||||
.SelectMany(x => x.box.DefaultIfEmpty(), (p, box) => new { p.serial, p.boxInventory, box })
|
||||
.FirstOrDefaultAsync(w => serialNumber.Equals(w.serial.SerialNumber));
|
||||
if (entity == null || entity.serial == null) return null;
|
||||
response.IsOldOps = true;
|
||||
response.BoxId = entity.serial.BoxId;
|
||||
response.BoxBillNo = entity?.box?.BoxBillNo ?? "";
|
||||
response.SubStockCode = entity?.boxInventory?.SubStockCode ?? "";
|
||||
|
||||
@@ -143,14 +143,14 @@ namespace WMS.Web.Repositories
|
||||
{
|
||||
if (ids == null)
|
||||
{
|
||||
return await _context.SubscribeNotification
|
||||
return await _context.SubscribeNotification.Where(w => w.IsDelete != true)
|
||||
.AsNoTracking().ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
return await _context.SubscribeNotification
|
||||
.AsNoTracking()
|
||||
.Where(w => ids.Contains(w.Id))
|
||||
.Where(w => ids.Contains(w.Id) && w.IsDelete != true)
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user