make
This commit is contained in:
parent
480c786f08
commit
48788ea2ec
|
|
@ -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<SQReservationParticipantsApiDto>($"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<object> obj = new List<object>();
|
||||
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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user