From ad6fa8fc868733a505435cd2bf6bad1c98e2f59c Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Thu, 9 Jan 2025 15:40:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E6=94=B6=E8=97=8F=E5=8A=9F?= =?UTF-8?q?=E8=83=BDfixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AxibugEmuOnline.Server/Manager/GameShareManager.cs | 4 ++-- .../Properties/PublishProfiles/FolderProfile.pubxml | 13 +++++++++++++ .../PublishProfiles/FolderProfile.pubxml.user | 10 ++++++++++ .../PublishProfiles/FolderProfile1.pubxml.user | 2 +- AxibugEmuOnline.Web/Controllers/ApiController.cs | 11 ++++++++--- 5 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml create mode 100644 AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml.user diff --git a/AxibugEmuOnline.Server/Manager/GameShareManager.cs b/AxibugEmuOnline.Server/Manager/GameShareManager.cs index 09dbe531..1a699060 100644 --- a/AxibugEmuOnline.Server/Manager/GameShareManager.cs +++ b/AxibugEmuOnline.Server/Manager/GameShareManager.cs @@ -136,11 +136,11 @@ namespace AxibugEmuOnline.Server.Manager MySqlConnection conn = SQLPool.DequeueSQLConn("CheckIsRomStart"); try { - string query = $"SELECT count(id) from rom_stars where uid = ?uid and = ?romid"; + string query = $"SELECT count(id) from rom_stars where uid = ?uid and romid = ?romid"; using (var command = new MySqlCommand(query, conn)) { // 设置参数值 - command.Parameters.AddWithValue("?RomID", RomId); + command.Parameters.AddWithValue("?romid", RomId); command.Parameters.AddWithValue("?uid", uid); // 执行查询并处理结果 using (var reader = command.ExecuteReader()) diff --git a/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml b/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 00000000..df5633ac --- /dev/null +++ b/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,13 @@ + + + + + Release + Any CPU + bin\Release\net8.0\publish\ + FileSystem + <_TargetId>Folder + + \ No newline at end of file diff --git a/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml.user b/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml.user new file mode 100644 index 00000000..9e772c03 --- /dev/null +++ b/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -0,0 +1,10 @@ + + + + + True|2025-01-09T06:39:17.5797829Z||;True|2025-01-09T14:39:05.6042660+08:00||;True|2025-01-09T14:33:09.1944386+08:00||; + + + \ No newline at end of file diff --git a/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile1.pubxml.user b/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile1.pubxml.user index 4e985b4c..b6eb66ef 100644 --- a/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/AxibugEmuOnline.Server/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - True|2025-01-08T15:13:47.7309044Z||;True|2025-01-08T13:32:52.0590130+08:00||;True|2025-01-08T13:31:56.8589678+08:00||;True|2025-01-07T13:54:02.0272718+08:00||;True|2025-01-07T10:47:36.6196477+08:00||;True|2025-01-07T01:21:34.5863249+08:00||;False|2025-01-07T01:20:39.5344134+08:00||;True|2025-01-07T00:21:47.4863058+08:00||;True|2025-01-07T00:16:42.7998249+08:00||;False|2025-01-07T00:16:02.8107509+08:00||;False|2025-01-02T15:36:18.1906464+08:00||;False|2025-01-02T15:36:06.5622643+08:00||;True|2024-12-27T18:24:49.7554320+08:00||; + True|2025-01-09T07:02:05.2160606Z||;True|2025-01-09T14:48:42.5299550+08:00||;False|2025-01-09T14:48:02.6306184+08:00||;True|2025-01-09T14:17:00.2185117+08:00||;True|2025-01-08T23:13:47.7309044+08:00||;True|2025-01-08T13:32:52.0590130+08:00||;True|2025-01-08T13:31:56.8589678+08:00||;True|2025-01-07T13:54:02.0272718+08:00||;True|2025-01-07T10:47:36.6196477+08:00||;True|2025-01-07T01:21:34.5863249+08:00||;False|2025-01-07T01:20:39.5344134+08:00||;True|2025-01-07T00:21:47.4863058+08:00||;True|2025-01-07T00:16:42.7998249+08:00||;False|2025-01-07T00:16:02.8107509+08:00||;False|2025-01-02T15:36:18.1906464+08:00||;False|2025-01-02T15:36:06.5622643+08:00||;True|2024-12-27T18:24:49.7554320+08:00||; \ No newline at end of file diff --git a/AxibugEmuOnline.Web/Controllers/ApiController.cs b/AxibugEmuOnline.Web/Controllers/ApiController.cs index 5b8306de..05111f43 100644 --- a/AxibugEmuOnline.Web/Controllers/ApiController.cs +++ b/AxibugEmuOnline.Web/Controllers/ApiController.cs @@ -206,7 +206,12 @@ namespace AxibugEmuOnline.Web.Controllers string HotOrderBy = "ORDER BY playcount DESC, id ASC"; - query = $"SELECT romlist.id,romlist.`Name`,romlist.GameType,romlist.Note,romlist.RomUrl,romlist.ImgUrl,romlist.`Hash`,romlist.`playcount`,romlist.`stars`,romlist.`PlatformType` from rom_stars LEFT JOIN romlist on romlist.Id = rom_stars.id where rom_stars.uid = ?uid and romlist.`Name` like ?searchPattern {platformCond} {GameTypeCond} {HotOrderBy} LIMIT ?offset, ?pageSize;"; + query = @$"SELECT romlist.id,romlist.`Name`,romlist.GameType,romlist.Note,romlist.RomUrl,romlist.ImgUrl,romlist.`Hash`,romlist.`playcount`,romlist.`stars`,romlist.`PlatformType` +from rom_stars +LEFT JOIN romlist on romlist.Id = rom_stars.romid +where rom_stars.uid = ?uid +and romlist.`Name` like ?searchPattern {platformCond} {GameTypeCond} {HotOrderBy} +LIMIT ?offset, ?pageSize;"; using (var command = new MySqlCommand(query, conn)) { // òֵ @@ -325,11 +330,11 @@ namespace AxibugEmuOnline.Web.Controllers MySqlConnection conn = SQLPool.DequeueSQLConn("CheckIsRomStart"); try { - string query = $"SELECT count(0) from rom_stars where uid = ?uid and = ?romid"; + string query = $"SELECT count(0) from rom_stars where uid = ?uid and romid = ?romid"; using (var command = new MySqlCommand(query, conn)) { // òֵ - command.Parameters.AddWithValue("?RomID", RomId); + command.Parameters.AddWithValue("?romid", RomId); command.Parameters.AddWithValue("?uid", uid); // ִвѯ using (var reader = command.ExecuteReader())