Commit fb873797 by 钟博

多角色对parentId为null和0的过滤

parent aebcea91
...@@ -60,7 +60,7 @@ public List<RoleResponse> GetUsersRole(int userid) ...@@ -60,7 +60,7 @@ public List<RoleResponse> GetUsersRole(int userid)
List<RoleResponse> roleResponses = new List<RoleResponse>(); List<RoleResponse> roleResponses = new List<RoleResponse>();
var user=_userRepository.GetEntity(c => c.ID == userid); var user=_userRepository.GetEntity(c => c.ID == userid);
var ParentUser = _userRepository.GetEntities(c => c.ParentID == userid); var ParentUser = _userRepository.GetEntities(c => c.ParentID == userid);
if (user.ParentID!=null || user.ParentID==0) if (user.ParentID!=null && user.ParentID!=0)
{ {
ParentUser=_userRepository.GetEntities(c => c.ParentID == user.ParentID); ParentUser=_userRepository.GetEntities(c => c.ParentID == user.ParentID);
} }
......
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