From a1e136289c37754d79f3ff5d9b7ef285a69044c9 Mon Sep 17 00:00:00 2001 From: milimoe Date: Tue, 12 May 2026 23:05:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=93=E6=9E=9C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OshimaServers/Service/CSBettingService.cs | 3 ++- OshimaWebAPI/Controllers/BettingController.cs | 2 +- OshimaWebAPI/Controllers/CSBettingController.cs | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OshimaServers/Service/CSBettingService.cs b/OshimaServers/Service/CSBettingService.cs index 977cb69..0bf6f6f 100644 --- a/OshimaServers/Service/CSBettingService.cs +++ b/OshimaServers/Service/CSBettingService.cs @@ -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 diff --git a/OshimaWebAPI/Controllers/BettingController.cs b/OshimaWebAPI/Controllers/BettingController.cs index ded42c4..74913fa 100644 --- a/OshimaWebAPI/Controllers/BettingController.cs +++ b/OshimaWebAPI/Controllers/BettingController.cs @@ -7,7 +7,7 @@ using Oshima.FunGame.WebAPI.Model; namespace Oshima.FunGame.WebAPI.Controllers { [ApiController] - [Route("api/[controller]")] + [Route("[controller]")] public class BettingController : ControllerBase { /// diff --git a/OshimaWebAPI/Controllers/CSBettingController.cs b/OshimaWebAPI/Controllers/CSBettingController.cs index 95b03e0..6af01c9 100644 --- a/OshimaWebAPI/Controllers/CSBettingController.cs +++ b/OshimaWebAPI/Controllers/CSBettingController.cs @@ -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;