From 48788ea2ec773109bda8e412398353c3987c77c1 Mon Sep 17 00:00:00 2001 From: zpc Date: Fri, 12 Sep 2025 18:42:19 +0800 Subject: [PATCH] make --- CoreCms.Net.Web.WebApi/Controllers/SQController.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CoreCms.Net.Web.WebApi/Controllers/SQController.cs b/CoreCms.Net.Web.WebApi/Controllers/SQController.cs index 2c28eed..b535366 100644 --- a/CoreCms.Net.Web.WebApi/Controllers/SQController.cs +++ b/CoreCms.Net.Web.WebApi/Controllers/SQController.cs @@ -181,7 +181,7 @@ ISQReservationEvaluateServices sQReservationEvaluateServices var userId = _user.ID; var list = await _sQReservationEvaluateServices.QueryListByClauseAsync(it => it.reservation_id == reId && it.user_id == userId); var participants = await _dbBase.Ado.SqlQueryAsync($"select p.id,p.reservation_id,p.status,p.join_time,p.user_id, p.role,u.nickName UserName,u.avatarImage AvatarImage,ISNULL(u.play_level,4) play_level,ISNULL(u.skills_level,4) skills_level from SQReservationParticipants p inner join CoreCmsUser u on p.user_id=u.id where p.status=0 and p.reservation_id ={reId} and p.is_arrive=1 "); - if (participants == null) + if (participants == null || participants.Count == 0) { return new WebApiDto() { @@ -189,6 +189,7 @@ ISQReservationEvaluateServices sQReservationEvaluateServices Data = null }; } + var userBlack = await _coreCmsUserBlacklistServices.GetUserBlacklists(userId); List obj = new List(); foreach (var item in participants) { @@ -202,6 +203,7 @@ ISQReservationEvaluateServices sQReservationEvaluateServices decimal user_play_level = 4; decimal user_skills_level = 4; DateTime? now = null; + var userBlackStatus = false; if (list.Count > 0) { var e = list.Find(it => it.to_user_id == item.user_id); @@ -215,11 +217,19 @@ ISQReservationEvaluateServices sQReservationEvaluateServices user_skills_level = e.skills_level; } } + if (userBlack.Count > 0) + { + if (userBlack.Any(it => it == item.user_id)) + { + userBlackStatus = true; + } + } var o = new { item.UserName, item.user_id, item.AvatarImage, + userBlackStatus, user_play_level, user_skills_level, is_evaluate,