添加结果显示

This commit is contained in:
milimoe 2026-05-12 23:05:28 +08:00
parent 9dfd61885b
commit a1e136289c
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0
3 changed files with 4 additions and 4 deletions

View File

@ -114,10 +114,11 @@ namespace Oshima.FunGame.WebAPI.Services
int mstatus = Convert.ToInt32(row["status"]);
DateTime deadline = Convert.ToDateTime(row["bet_deadline"]);
string stage = row["stage"].ToString() ?? "";
string result = row["result"] != DBNull.Value ? row["result"].ToString() ?? "" : "";
string mStatusStr = mstatus switch { 0 => "未开始", 1 => "进行中", 2 => "已结束", _ => "未知" };
string matchLabel = $"{t1} vs {t2}";
string clickableMatch = matchLabel.CreateCmdInput($"比赛详情 {mid}");
matches.AppendLine($" [{mid}] {(stage != "" ? $"{stage} " : "")} {clickableMatch} (状态:{mStatusStr}, 截止:{deadline:MM-dd HH:mm})");
matches.AppendLine($" [{mid}] {(stage != "" ? $"{stage} " : "")} {clickableMatch} (状态:{mStatusStr}, 结果:{result}, 截止:{deadline:MM-dd HH:mm})");
}
}
else

View File

@ -7,7 +7,7 @@ using Oshima.FunGame.WebAPI.Model;
namespace Oshima.FunGame.WebAPI.Controllers
{
[ApiController]
[Route("api/[controller]")]
[Route("[controller]")]
public class BettingController : ControllerBase
{
/// <summary>

View File

@ -1,5 +1,4 @@
using System.Security.Cryptography;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Milimoe.FunGame.Core.Api.Utility;