mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2026-06-04 19:42:13 +00:00
fix bug
This commit is contained in:
parent
cee9b7c954
commit
3a8477efae
@ -828,7 +828,7 @@ namespace Oshima.FunGame.WebAPI.Services
|
||||
|
||||
// 检查比赛是否存在
|
||||
sql.Parameters["@mid"] = request.MatchId;
|
||||
sql.ExecuteDataSet("SELECT status, available_options FROM csbetting_matches WHERE id = @mid");
|
||||
sql.ExecuteDataSet("SELECT status, available_options, bet_deadline FROM csbetting_matches WHERE id = @mid");
|
||||
if (!sql.Success || sql.DataSet.Tables[0].Rows.Count == 0)
|
||||
{
|
||||
error = "比赛不存在。";
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using System.Security.Cryptography;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
@ -232,6 +233,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
||||
if (CSBettingService.CreateEvent(request.Name, request.StartTime, request.EndTime, out string error, out long? newId))
|
||||
{
|
||||
md.Content = $"赛事创建成功!新赛事ID:{newId}";
|
||||
reply.Keyboard = new KeyboardMessage().AppendButtons(1, Button.CreateCmdButton("🔍 赛事详情", $"赛事详情 {newId}"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -266,6 +268,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
||||
request.StartTime, request.BetDeadline, request.AvailableOptions, request.Team1WinOdds, request.Team2WinOdds, request.Team1WinProbability, out string error, out long? newId))
|
||||
{
|
||||
md.Content = $"比赛创建成功!新比赛ID:{newId}";
|
||||
reply.Keyboard = new KeyboardMessage().AppendButtons(1, Button.CreateCmdButton("🔍 比赛详情", $"比赛详情 {newId}"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using System.Security.Cryptography;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Models;
|
||||
using Oshima.FunGame.OshimaServers.Model;
|
||||
@ -38,18 +39,6 @@ namespace Oshima.FunGame.WebAPI.Services
|
||||
return true;
|
||||
}
|
||||
|
||||
// 赛事列表
|
||||
if (e.Detail.StartsWith("赛事") || e.Detail.StartsWith("赛事列表"))
|
||||
{
|
||||
int page = 1;
|
||||
string detail = e.Detail.Replace("赛事", "").Replace("赛事列表", "").Trim();
|
||||
System.Text.RegularExpressions.Match match = GetFirstNumber().Match(detail);
|
||||
if (match.Success && int.TryParse(match.Value, out int p)) page = p;
|
||||
BotReply reply = BettingController.GetEventsOverview(page);
|
||||
await SendAsync(e, "CS赛事预测", reply);
|
||||
return true;
|
||||
}
|
||||
|
||||
// 赛程:显示所有比赛
|
||||
if (e.Detail.StartsWith("赛程") || e.Detail.StartsWith("比赛列表"))
|
||||
{
|
||||
@ -135,6 +124,18 @@ namespace Oshima.FunGame.WebAPI.Services
|
||||
return true;
|
||||
}
|
||||
|
||||
// 赛事列表
|
||||
if (e.Detail.StartsWith("赛事") || e.Detail.StartsWith("赛事列表"))
|
||||
{
|
||||
int page = 1;
|
||||
string detail = e.Detail.Replace("赛事", "").Replace("赛事列表", "").Trim();
|
||||
System.Text.RegularExpressions.Match match = GetFirstNumber().Match(detail);
|
||||
if (match.Success && int.TryParse(match.Value, out int p)) page = p;
|
||||
BotReply reply = BettingController.GetEventsOverview(page);
|
||||
await SendAsync(e, "CS赛事预测", reply);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (e.Detail.StartsWith("我的预测"))
|
||||
{
|
||||
int page = 1;
|
||||
@ -232,7 +233,8 @@ namespace Oshima.FunGame.WebAPI.Services
|
||||
.AppendButtons(2,
|
||||
Button.CreateCmdButton("📋 赛事列表", "赛事列表"),
|
||||
Button.CreateCmdButton("📅 比赛列表", "比赛列表"),
|
||||
Button.CreateCmdButton("⚙️ 继续结算", "结算比赛 ", enter: false));
|
||||
Button.CreateCmdButton("⚙️ 继续结算", "结算比赛 ", enter: false),
|
||||
Button.CreateCmdButton("🔍 比赛详情", $"比赛详情 {mid}"));
|
||||
await SendAsync(e, "CS赛事预测", reply);
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user