fix issoftdelete
This commit is contained in:
@@ -355,12 +355,14 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
//当前设备的分组
|
//当前设备的分组
|
||||||
var groups = await _dbContext.Queryable<DeviceGroupRelationshipEntity>()
|
var groups = await _dbContext.Queryable<DeviceGroupRelationshipEntity>()
|
||||||
.Where(x => x.DeviceCode == device.Code)
|
.Where(x => x.DeviceCode == device.Code)
|
||||||
|
.Where(x => x.IsDeleted == false)
|
||||||
.Select(x => x.GroupCode)
|
.Select(x => x.GroupCode)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
var permissions = await _dbContext.Queryable<DevicePermissionEntity>()
|
var permissions = await _dbContext.Queryable<DevicePermissionEntity>()
|
||||||
.Where(x => (x.UniqueType == DeviceAssignmentTypeEnumType.Device && x.UniqueValue == device.Code)
|
.Where(x => (x.UniqueType == DeviceAssignmentTypeEnumType.Device && x.UniqueValue == device.Code)
|
||||||
|| (x.UniqueType == DeviceAssignmentTypeEnumType.Group && groups.Contains(x.UniqueValue)))
|
|| (x.UniqueType == DeviceAssignmentTypeEnumType.Group && groups.Contains(x.UniqueValue)))
|
||||||
|
.Where(x => x.IsDeleted == false)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
var ids = new List<long>();
|
var ids = new List<long>();
|
||||||
|
|||||||
Reference in New Issue
Block a user