using YBEE.EQM.Core;

namespace YBEE.EQM.Application
{
    /// <summary>
    /// 系统用户服务
    /// </summary>
    [ApiDescriptionSettings(Name = "sys-user")]
    [Route("sys/user")]
    [AppAuthorize]
    public class SysUserAppService : IDynamicApiController
    {
        private readonly ISysUserService _sysUserService;
        public SysUserAppService(ISysUserService sysUserService)
        {
            _sysUserService = sysUserService;
        }

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task ChangePassword(ChangeSysUserPasswordInput input)
        {
            await _sysUserService.ChangePassword(input);
        }

        /// <summary>
        /// 查询简要用户列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<PageResult<SysUserSimpleOutput>> QueryUserSimplePageList(SysUserPageInput input)
        {
            return await _sysUserService.QueryUserSimplePageList(input);
        }
    }
}