using Microsoft.AspNetCore.Mvc; using QYZH.InteractiveMagazine.IService; using QYZH.InteractiveMagazine.IService.Dto; using QYZH.InteractiveMagazine.Models.Common; using QYZH.InteractiveMagazine.Models.Dto; namespace QYZH.InteractiveMagazine.WebApi.Controllers; /// /// 用户控制器 /// [Route("api/[controller]")] [ApiController] public class UsersController : BaseController { private readonly IUsersService _usersService; private readonly ILogger _logger; public UsersController(IUsersService usersService, ILogger logger) { _usersService = usersService; _logger = logger; } /// /// 获取用户列表(分页) /// [HttpGet] public async Task>> GetList([FromQuery] UsersQueryInput input) { return await _usersService.GetListAsync(input); } /// /// 获取用户详情 /// [HttpGet("{id}")] public async Task> GetDetail(long id) { return await _usersService.GetDetailAsync(id); } /// /// 更新用户状态 /// [HttpPut("{id}/status")] public async Task UpdateStatus(long id, [FromBody] UpdateUserStatusInput input) { return await _usersService.UpdateStatusAsync(id, input); } }