fix 修复已知问题

This commit is contained in:
Kurris
2024-12-15 20:49:12 +08:00
parent d3dbff9248
commit f7b28440b7
9 changed files with 94 additions and 30 deletions

View File

@@ -51,8 +51,10 @@ public class AppointmentAreaService : IAppointmentAreaService
public async Task AssignAsync(AppointmentAreaAssignRequest request)
{
(await _dbContext.Queryable<AppointmentAreaEntity>().Where(x => x.CustomCode == request.CustomCode).AnyAsync())
.ThrowIfFalse("区域不存在");
(await _dbContext.Queryable<AppointmentAreaEntity>()
.Where(x => x.CustomCode == request.CustomCode)
.AnyAsync()
).ThrowIfFalse("区域不存在");
(await _dbContext.Queryable<DeviceGroupEntity>()
.Where(x => request.DeviceGroupCodes.Contains(x.Code))