1
This commit is contained in:
parent
6f1a061dad
commit
e5707148d1
@ -254,14 +254,14 @@ namespace asg_form.Controllers
|
|||||||
if (keyword == null)
|
if (keyword == null)
|
||||||
{
|
{
|
||||||
a.cout = userManager.Users.Count();
|
a.cout = userManager.Users.Count();
|
||||||
a.msg = await userManager.Users.Paginate(pageindex, pagesize).Select(a => new { a.Id, a.Email, a.chinaname, a.UserName, a.Integral, a.officium,a.qqnumber}).ToListAsync();
|
a.msg = await userManager.Users.Paginate(pageindex, pagesize).Select(a => new { a.Id, a.Email, a.chinaname, a.UserName, a.Integral, a.officium,a.qqnumber,a.roleListName,a.roleListCode}).ToListAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
a.cout = userManager.Users.Where(a => a.chinaname == keyword || a.UserName == keyword || a.Email == keyword).Count();
|
a.cout = userManager.Users.Where(a => a.chinaname == keyword || a.UserName == keyword || a.Email == keyword).Count();
|
||||||
a.msg = await userManager.Users.Where(a => a.chinaname == keyword || a.UserName == keyword || a.Email == keyword).Paginate(pageindex, pagesize).Select(a => new { a.Id, a.Email, a.chinaname, a.UserName, a.Integral, a.officium,a.qqnumber}).ToListAsync();
|
a.msg = await userManager.Users.Where(a => a.chinaname == keyword || a.UserName == keyword || a.Email == keyword).Paginate(pageindex, pagesize).Select(a => new { a.Id, a.Email, a.chinaname, a.UserName, a.Integral, a.officium,a.qqnumber, a.roleListName, a.roleListCode }).ToListAsync();
|
||||||
}
|
}
|
||||||
return Ok(a);
|
return Ok(a);
|
||||||
}
|
}
|
||||||
|
@ -365,11 +365,11 @@ namespace asg_form.Controllers
|
|||||||
List<string> roles = (List<string>)await userManager.GetRolesAsync(user);
|
List<string> roles = (List<string>)await userManager.GetRolesAsync(user);
|
||||||
wp = 4;
|
wp = 4;
|
||||||
if (showbase64) {
|
if (showbase64) {
|
||||||
return new post_user { id = id.ToInt64(), money = user.Integral, Base64 = user.UserBase64, name = user.UserName, chinaname = user.chinaname, email = user.Email, isadmin = isadmin, Roles = roles, officium = user.officium ,qqnumber=user.qqnumber};
|
return new post_user { id = id.ToInt64(), money = user.Integral, Base64 = user.UserBase64, name = user.UserName, chinaname = user.chinaname, email = user.Email, isadmin = isadmin, Roles = roles, officium = user.officium ,qqnumber=user.qqnumber,roleListCode = user.roleListCode, roleListName = user.roleListName };
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return new post_user { id = id.ToInt64(), money = user.Integral, name = user.UserName, chinaname = user.chinaname, email = user.Email, isadmin = isadmin, Roles = roles, officium = user.officium, qqnumber = user.qqnumber };
|
return new post_user { id = id.ToInt64(), money = user.Integral, name = user.UserName, chinaname = user.chinaname, email = user.Email, isadmin = isadmin, Roles = roles, officium = user.officium, qqnumber = user.qqnumber,roleListCode = user.roleListCode,roleListName=user.roleListName };
|
||||||
|
|
||||||
}
|
}
|
||||||
}catch (Exception ex)
|
}catch (Exception ex)
|
||||||
@ -393,6 +393,8 @@ namespace asg_form.Controllers
|
|||||||
public long? money { get; set; }
|
public long? money { get; set; }
|
||||||
public string? qqnumber { get; set; }
|
public string? qqnumber { get; set; }
|
||||||
public List<string>? Roles { get; set; }
|
public List<string>? Roles { get; set; }
|
||||||
|
public string? roleListName { get; set; }
|
||||||
|
public string? roleListCode { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
7
asg_form/Controllers/menuAssignController.cs
Normal file
7
asg_form/Controllers/menuAssignController.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace asg_form.Controllers
|
||||||
|
{
|
||||||
|
public class menuAssignController
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Reflection.Metadata;
|
||||||
using asg_form.Controllers;
|
using asg_form.Controllers;
|
||||||
using asg_form.Controllers.Team;
|
using asg_form.Controllers.Team;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
@ -27,6 +28,8 @@ namespace asg_form
|
|||||||
|
|
||||||
//public bool isadmin { get; set; }
|
//public bool isadmin { get; set; }
|
||||||
//public List<string>? Roles { get; set; }
|
//public List<string>? Roles { get; set; }
|
||||||
|
public string? roleListName { get; set; }
|
||||||
|
public string? roleListCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Role : IdentityRole<long>
|
public class Role : IdentityRole<long>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user