-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
39 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 15 additions & 8 deletions
23
src/Service/FastWiki.Service/Domain/Users/Repositories/IUserRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,56 @@ | ||
namespace FastWiki.Service.Domain.Users.Repositories; | ||
|
||
/// <summary> | ||
/// 用户仓储 | ||
/// 用户仓储 | ||
/// </summary> | ||
public interface IUserRepository : IRepository<User, Guid> | ||
{ | ||
/// <summary> | ||
/// 获取用户列表 | ||
/// 获取用户列表 | ||
/// </summary> | ||
Task<List<User>> GetListAsync(string? keyword, int page, int pageSize); | ||
|
||
/// <summary> | ||
/// 获取用户数量 | ||
/// 获取用户数量 | ||
/// </summary> | ||
/// <param name="keyword"></param> | ||
/// <returns></returns> | ||
Task<long> GetCountAsync(string? keyword); | ||
|
||
/// <summary> | ||
/// 删除用户 | ||
/// 删除用户 | ||
/// </summary> | ||
/// <param name="id"></param> | ||
/// <returns></returns> | ||
Task<bool> DeleteAsync(Guid id); | ||
|
||
/// <summary> | ||
/// 禁用用户/启用用户 | ||
/// 禁用用户/启用用户 | ||
/// </summary> | ||
/// <param name="id"></param> | ||
/// <param name="disable">是否禁用</param> | ||
/// <param name="disable">是否禁用</param> | ||
/// <returns></returns> | ||
Task<bool> DisableAsync(Guid id, bool disable); | ||
|
||
/// <summary> | ||
/// 修改角色 | ||
/// 修改角色 | ||
/// </summary> | ||
/// <param name="id"></param> | ||
/// <param name="role"></param> | ||
/// <returns></returns> | ||
Task UpdateRoleAsync(Guid id, RoleType role); | ||
|
||
/// <summary> | ||
/// 验证账户是否存在 | ||
/// 验证账户是否存在 | ||
/// </summary> | ||
/// <param name="account"></param> | ||
/// <returns></returns> | ||
Task<bool> IsExistAccountAsync(string account); | ||
|
||
/// <summary> | ||
/// 添加 | ||
/// </summary> | ||
/// <param name="user"></param> | ||
/// <returns></returns> | ||
Task InsertAsync(User user); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters