fix 删除任务无需返回多余信息
This commit is contained in:
@@ -125,7 +125,9 @@ public class AssignmentService : IAssignmentService
|
||||
Tasks = x.AsEnumerable().Select(item =>
|
||||
{
|
||||
var key = $"face:{item.UserCode}";
|
||||
var token = timeLimitedDataProtector.Protect(key, TimeSpan.FromSeconds(faceUrlOptions.Limit));
|
||||
var token = item.Type == DeviceTaskEnumType.Add
|
||||
? timeLimitedDataProtector.Protect(key, TimeSpan.FromSeconds(faceUrlOptions.Limit))
|
||||
: string.Empty;
|
||||
|
||||
return new TaskCombineUserDimensionDto
|
||||
{
|
||||
@@ -138,11 +140,13 @@ public class AssignmentService : IAssignmentService
|
||||
UserName = item.UserName,
|
||||
DepartmentNo = item.DepartmentNo,
|
||||
DepartmentName = item.DepartmentName,
|
||||
CardNo = item.CardNo,
|
||||
Face = faceUrlOptions.Url + token
|
||||
CardNo = item.Type == DeviceTaskEnumType.Add ? item.CardNo : string.Empty,
|
||||
Face = item.Type == DeviceTaskEnumType.Add ? faceUrlOptions.Url + token : string.Empty,//下发才附带照片信息
|
||||
}
|
||||
};
|
||||
}).ToList()
|
||||
|
||||
})
|
||||
.ToList()
|
||||
};
|
||||
|
||||
}).ToList();
|
||||
|
||||
Reference in New Issue
Block a user