fix 人脸检测设置返回默认值
This commit is contained in:
@@ -98,7 +98,15 @@ public class FactorySettingService : IFactorySettingService
|
||||
FactoryName = currentFactory?.Name,
|
||||
EnableOutsourceDown = currentSetting?.EnableOutsourceDown ?? false,
|
||||
UserQrCodeExpiration = currentSetting?.UserQrCodeExpiration,
|
||||
FaceImageDetection = currentSetting?.FaceImageDetection
|
||||
FaceImageDetection = currentSetting?.FaceImageDetection ?? new FaceImageDetectionDto
|
||||
{
|
||||
Enable = true,
|
||||
Detections = typeof(FaceQualityTypeEnumType).GetFields(BindingFlags.Public | BindingFlags.Static).Select(x => new FaceImageDetection
|
||||
{
|
||||
Type = Enum.Parse<FaceQualityTypeEnumType>(x!.GetValue(null)!.ToString()!),
|
||||
Level = FaceQualityLevelEnumType.Medium
|
||||
}).ToList()
|
||||
}
|
||||
};
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user