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.

102 lines
2.9 KiB
C#

1 year ago
//----------SysPost开始----------
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 ISysPostService : IBaseServices<SysPost>
{
/// <summary>
/// 查询岗位信息集合
/// </summary>
/// <param name="pageQuery"> 岗位信息 </param>
/// <returns> 岗位信息集合 </returns>
Task<PageModel<SysPost>> SelectPostList(PageQuery<SysPost> pageQuery);
/// <summary>
/// 查询所有岗位
/// </summary>
/// <returns> 岗位列表 </returns>
Task<List<SysPost>> SelectPostAll();
/// <summary>
/// 通过岗位ID查询岗位信息
/// </summary>
/// <param name="postId"> 岗位ID </param>
/// <returns> 角色对象信息 </returns>
Task<SysPost> SelectPostById(int postId);
/// <summary>
/// 根据用户ID获取岗位选择框列表
/// </summary>
/// <param name="userId"> 用户ID </param>
/// <returns> 选中岗位ID列表 </returns>
Task<List<int>> SelectPostListByUserId(int userId);
/// <summary>
/// 校验岗位名称是否唯一
/// </summary>
/// <param name="post"> 岗位信息 </param>
/// <returns> 结果 </returns>
Task<bool> CheckPostNameUnique(SysPost post);
/// <summary>
/// 校验岗位编码是否唯一
/// </summary>
/// <param name="post"> 岗位信息 </param>
/// <returns> 结果 </returns>
Task<bool> CheckPostCodeUnique(SysPost post);
/// <summary>
/// 通过岗位ID查询岗位使用数量
/// </summary>
/// <param name="postId"> 岗位ID </param>
/// <returns> 结果 </returns>
Task<int> CountUserPostById(List<int> postIds);
/// <summary>
/// 删除岗位信息
/// </summary>
/// <param name="postId"> 岗位ID </param>
/// <returns> 结果 </returns>
Task<bool> DeletePostById(int postId);
/// <summary>
/// 批量删除岗位信息
/// </summary>
/// <param name="postIds"> 需要删除的岗位ID </param>
/// <returns> 结果 </returns>
/// <exception cref="Exception"> 异常 </exception>
Task<bool> DeletePostByIds(List<int> postIds);
/// <summary>
/// 新增保存岗位信息
/// </summary>
/// <param name="post"> 岗位信息 </param>
/// <returns> 结果 </returns>
Task<int> InsertPost(SysPost post);
/// <summary>
/// 修改保存岗位信息
/// </summary>
/// <param name="post"> 岗位信息 </param>
/// <returns> 结果 </returns>
Task<bool> UpdatePost(SysPost post);
}
}
//----------SysPost结束----------