Commit bd02894d by zry

dbug

parent a6b44fbe
......@@ -14,5 +14,6 @@ public class UserResponse
public string Mail { get; set; }
public string Mobile { get; set; }
public int States { get; set; }
public List<int> Hospital { get; set; }
}
}
......@@ -73,7 +73,19 @@ public UserIdentity Login(LoginRequest request)
public List<UserResponse> GetUserList(int userID)
{
var userlist = _userRepository.GetEntities(t => t.CreateUser == userID);
return Mapper.Map<List<UserResponse>>(userlist);
var result = Mapper.Map<List<UserResponse>>(userlist);
if (result != null && result.Count > 0)
{
foreach (var item in result)
{
var hoslist = _userhospitalRepository.GetEntities(p => p.UserID == item.UserID);
if (hoslist != null && hoslist.Count() > 0)
{
item.Hospital = hoslist.Select(p => p.HospitalID.Value).ToList();
}
}
}
return result;
}
/// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment