瀏覽代碼

调整年龄范围

datasub12_previous
H Vs 1 年之前
父節點
當前提交
02ecc05f1a
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      HealthMonitor.Service/Resolver/BloodpressResolver.cs

+ 1
- 1
HealthMonitor.Service/Resolver/BloodpressResolver.cs 查看文件

@@ -140,7 +140,7 @@ namespace HealthMonitor.Service.Resolver
}
// 验证年龄是否在范围 (2 - 120)
var age = SafeType.SafeInt(DateTime.Today.Year - person?.Person.BornDate!.Value.Year!);
if (age < 1 || age > 120)
if (age < 2 || age > 120)
{
_logger.LogWarning("验证年龄,不在范围 (2 - 120)岁,跳过此消息");
return;


Loading…
取消
儲存