赛事列表显示赛事时间

This commit is contained in:
milimoe 2026-05-10 04:06:33 +08:00
parent 226159bb53
commit c1bf8b843f
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0

View File

@ -48,7 +48,9 @@ namespace Oshima.FunGame.WebAPI.Services
string name = row["name"].ToString() ?? "";
int status = Convert.ToInt32(row["status"]);
string statusStr = status switch { 0 => "未开始", 1 => "进行中", 2 => "已结束", _ => "未知" };
sb.AppendLine($"🏆 [{id}] {name.CreateCmdInput($" {id}")} ({statusStr})");
DateTime startTime = Convert.ToDateTime(row["start_time"]);
DateTime endTime = Convert.ToDateTime(row["end_time"]);
sb.AppendLine($"🏆 [{id}] {name.CreateCmdInput($" {id}")} ({statusStr}{startTime:yyyy/MM/dd} ~ {endTime:yyyy/MM/dd})");
}
return (sb.ToString().TrimEnd(), totalPages);
}