You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
245 lines
7.9 KiB
C#
245 lines
7.9 KiB
C#
1 year ago
|
|
||
|
|
||
|
//----------SysUser开始----------
|
||
|
|
||
|
|
||
|
using Admin.Core.Model;
|
||
|
using Admin.Core.Model.Sys;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace Admin.Core.IService.ISys
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 用户信息表IService
|
||
|
/// </summary>
|
||
|
public interface ISysUserService : IBaseServices<SysUser>
|
||
|
{
|
||
|
|
||
|
/// <summary>
|
||
|
/// 获取用户角色Key
|
||
|
/// </summary>
|
||
|
/// <param name="loginName"></param>
|
||
|
/// <param name="loginPwd"></param>
|
||
|
/// <returns></returns>
|
||
|
Task<string> GetUserRoleNameStr(string loginName, string loginPwd);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据条件分页查询用户列表
|
||
|
/// </summary>
|
||
|
/// <param name="pageQuery"> 查询条件 </param>
|
||
|
/// <returns> 用户信息集合信息 </returns>
|
||
|
Task<PageModel<UserModel>> SelectUserList(PageQuery<UserQuery> pageQuery);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据ID查询
|
||
|
/// </summary>
|
||
|
/// <param name="id">主键</param>
|
||
|
/// <returns></returns>
|
||
|
Task<UserView> GetByID(int id);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据用户编号获取详细信息
|
||
|
/// </summary>
|
||
|
/// <param name="userId"></param>
|
||
|
/// <returns></returns>
|
||
|
Task<UserView> GetInfo(int userId);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据条件分页查询已分配用户角色列表
|
||
|
/// </summary>
|
||
|
/// <param name="user"> 用户信息 </param>
|
||
|
/// <returns> 用户信息集合信息 </returns>
|
||
|
List<SysUser> SelectAllocatedList(SysUser user);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据条件分页查询未分配用户角色列表
|
||
|
/// </summary>
|
||
|
/// <param name="user"> 用户信息 </param>
|
||
|
/// <returns> 用户信息集合信息 </returns>
|
||
|
List<SysUser> SelectUnallocatedList(SysUser user);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 通过用户账号查询用户
|
||
|
/// </summary>
|
||
|
/// <param name="loginName"> 用户账号 </param>
|
||
|
/// <returns> 用户对象信息 </returns>
|
||
|
Task<SysUser> SelectUserByLoginName(string loginName);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 通过用户ID查询用户
|
||
|
/// </summary>
|
||
|
/// <param name="userId"> 用户ID </param>
|
||
|
/// <returns> 用户对象信息 </returns>
|
||
|
Task<SysUser> SelectUserById(int userId);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查询用户所属角色组
|
||
|
/// </summary>
|
||
|
/// <param name="loginName"> 用户账号 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<List<SysRole>> SelectUserRoleGroup(string loginName);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查询用户所属角色组
|
||
|
/// </summary>
|
||
|
/// <param name="userId"> 用户Id </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<List<SysRole>> SelectUserRoleGroup(int userId);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查询用户所属岗位组
|
||
|
/// </summary>
|
||
|
/// <param name="loginName"> 用户名 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<List<SysPost>> SelectUserPostGroup(string loginName);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 校验用户账号是否存在
|
||
|
/// </summary>
|
||
|
/// <param name="loginName"> 用户账号 </param>
|
||
|
/// <returns> true-存在 false-不存在 </returns>
|
||
|
Task<bool> CheckLoginNameUnique(string loginName);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 校验用户手机号是否存在
|
||
|
/// </summary>
|
||
|
/// <param name="phoneNumber"> 手机号
|
||
|
/// <returns> 存在数量 </returns>
|
||
|
Task<int> checkPhoneUnique(string phoneNumber);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 校验email是否存在
|
||
|
/// </summary>
|
||
|
/// <param name="email"> email
|
||
|
/// <returns> 存在数量 </returns>
|
||
|
Task<int> CheckEmailUnique(string email);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 新增保存用户信息
|
||
|
/// </summary>
|
||
|
/// <param name="user"> 用户信息 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<int> InsertUser(UserView user);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 注册用户信息
|
||
|
/// </summary>
|
||
|
/// <param name="user"> 用户信息 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<bool> RegisterUser(SysUser user);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 修改保存用户信息
|
||
|
/// </summary>
|
||
|
/// <param name="user"> 用户信息 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<bool> UpdateUser(UserView user);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据用户编号获取授权角色
|
||
|
/// </summary>
|
||
|
/// <param name="userId"></param>
|
||
|
/// <returns></returns>
|
||
|
Task<UserView> AuthRole(int userId);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查询用户已分配角色列表
|
||
|
/// </summary>
|
||
|
/// <param name="userId"></param>
|
||
|
/// <returns></returns>
|
||
|
Task<UserView> AllocatedList(int userId);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查询用户未分配角色列表
|
||
|
/// </summary>
|
||
|
/// <param name="userId"></param>
|
||
|
/// <returns></returns>
|
||
|
Task<UserView> UnallocatedList(int userId);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 用户授权角色
|
||
|
/// </summary>
|
||
|
/// <param name="userId"> 用户ID </param>
|
||
|
/// <param name="roleIds"> 角色组 </param>
|
||
|
Task<bool> InsertUserAuth(int userId, int?[] roleIds);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 用户关联岗位
|
||
|
/// </summary>
|
||
|
/// <param name="userId"> 用户ID </param>
|
||
|
/// <param name="postIds"> 岗位组 </param>
|
||
|
Task<bool> UpdateUserPost(int userId, int?[] postIds);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 修改用户状态
|
||
|
/// </summary>
|
||
|
/// <param name="user"> 用户信息 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<bool> UpdateUserStatus(SysUser user);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 修改用户基本信息
|
||
|
/// </summary>
|
||
|
/// <param name="user"> 用户信息 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<bool> UpdateUserProfile(SysUser user);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 修改用户头像
|
||
|
/// </summary>
|
||
|
/// <param name="user"> 用户信息 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<bool> UpdateUserAvatar(SysUser user);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 重置用户密码
|
||
|
/// </summary>
|
||
|
/// <param name="user"> 用户信息 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<bool> ResetPwd(SysUser user);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 新增用户角色信息
|
||
|
/// </summary>
|
||
|
/// <param name="userId"> 用户ID </param>
|
||
|
/// <param name="roleIds"> 角色组 </param>
|
||
|
Task<bool> InsertUserRole(int userId, int?[] roleIds);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 新增用户岗位信息
|
||
|
/// </summary>
|
||
|
/// <param name="userId"> 用户ID </param>
|
||
|
/// <param name="postIds"> 岗位组 </param>
|
||
|
Task<bool> InsertUserPost(int userId, int?[] postIds);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 通过用户ID删除用户
|
||
|
/// </summary>
|
||
|
/// <param name="userId"> 用户ID </param>
|
||
|
/// <param name="updateBy"> 修改者 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<bool> DeleteUserById(int userId, string updateBy = "");
|
||
|
|
||
|
/// <summary>
|
||
|
/// 批量删除用户信息
|
||
|
/// </summary>
|
||
|
/// <param name="userIds"> 需要删除的用户ID </param>
|
||
|
/// <param name="updateBy"> 修改者 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
Task<bool> DeleteUserByIds(int[] userIds, string updateBy = "");
|
||
|
|
||
|
/// <summary>
|
||
|
/// 导入用户数据
|
||
|
/// </summary>
|
||
|
/// <param name="userList"> 用户数据列表 </param>
|
||
|
/// <param name="isUpdateSupport"> 是否更新支持,如果已存在,则进行更新数据 </param>
|
||
|
/// <param name="operName"> 操作用户 </param>
|
||
|
/// <returns> 结果 </returns>
|
||
|
string ImportUser(List<SysUser> userList, bool? isUpdateSupport, string operName);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//----------SysUser结束----------
|
||
|
|