/// <summary>
/// 根据 RoleID And SectionStr 获取 UserInfoList
/// </summary>
/// <returns></returns>
public ActionResult GetUserDataByRoleAndSection(UserInfoViewModel viewModel)
{
IList<UserInfo> userinfolist = _service.GetUserByRoleAndSection(viewModel);
var userListvalue = userinfolist.GroupBy(p => new { p.ID, p.TrueName }).Select(g => g.First()).ToList();
if (userinfolist != null)
{
return Json(new { flag = "success", userinfolist = userListvalue });
}
return Json(new { flag = "error" });
}
转载于:https://www.cnblogs.com/yibu/p/4788868.html