fix: 兼容壹路运动站有效次数的线上列类型

线上 YL_Train.StandardCounts 为 int,QA 为 float,原实体按 double 读取导致 GetAiSportsStationList 在生产环境抛出 Int32 到 Double 的转换异常。

在列表查询投影中使用 Convert.ToDouble,使 EF 生成 CONVERT(float, [StandardCounts]),同时兼容两种数据库列类型,不修改表结构或其他接口。

验证:WebApi Release 构建通过;EF SQL 探针确认生成 CONVERT(float);QA 和生产库只读查询均成功。线上服务仍需部署本提交并重启后生效。
This commit is contained in:
ltx 2026-10-21 13:46:47 +08:00
parent 9d2573b9c3
commit 9266080356

View File

@ -102,7 +102,8 @@ namespace VOL.Ai.Services
train.StartTime,
train.EndTime,
train.Score,
train.StandardCounts,
// QA stores this as float, while production still uses int.
StandardCounts = Convert.ToDouble(train.StandardCounts),
train.UnStandardCounts,
train.TimeKeeping,
train.Duration,