//
namespace SafeCampus.Web.Core;
///
/// 用户个人信息控制器
///
[ApiDescriptionSettings(Tag = "用户个人信息控制器")]
[Route("userCenter")]
public class UserCenterController : BaseController
{
private readonly IUserCenterService _userCenterService;
public UserCenterController(IUserCenterService userCenterService)
{
_userCenterService = userCenterService;
}
#region Get
///
/// 获取个人菜单
///
///
[HttpGet("loginMenu")]
public async Task LoginMenu([FromQuery] BaseIdInput input)
{
return await _userCenterService.GetLoginMenu(input);
}
///
/// 获取个人工作台
///
///
[HttpGet("loginWorkbench")]
public async Task LoginWorkbench()
{
return await _userCenterService.GetLoginWorkbench();
}
///
/// 获取组织架构
///
///
[HttpGet("loginOrgTree")]
public async Task LoginOrgTree()
{
return await _userCenterService.LoginOrgTree();
}
///
/// 获取登录用户的站内信分页
///
///
///
[HttpGet("loginUnreadMessagePage")]
public async Task LoginUnreadMessagePage([FromQuery] MessagePageInput input)
{
return await _userCenterService.LoginMessagePage(input);
}
///
/// 读取登录用户站内信详情
///
///
///
[HttpGet("loginUnreadMessageDetail")]
public async Task LoginUnreadMessageDetail([FromQuery] BaseIdInput input)
{
return await _userCenterService.LoginMessageDetail(input);
}
///
/// 未读消息数
///
///
[HttpGet("UnReadCount")]
public async Task UnReadCount()
{
return await _userCenterService.UnReadCount();
}
///
/// 删除我的消息
///
///
///
[HttpPost("deleteMessage")]
[DisplayName("删除个人消息")]
public async Task DeleteMessage([FromBody] BaseIdInput input)
{
await _userCenterService.DeleteMyMessage(input);
}
///
/// 修改密码
///
///
///
[HttpPost("updatePassword")]
[DisplayName("修改密码")]
public async Task UpdatePassword([FromBody] UpdatePasswordInput input)
{
await _userCenterService.UpdatePassword(input);
}
///
/// 修改头像
///
///
///
[HttpPost("updateAvatar")]
[DisplayName("修改头像")]
public async Task UpdateAvatar([FromForm] BaseFileInput input)
{
return await _userCenterService.UpdateAvatar(input);
}
///
/// 修改默认模块
///
///
[HttpPost("setDefaultModule")]
public async Task SetDefaultModule([FromBody] SetDefaultModuleInput input)
{
await _userCenterService.SetDefaultModule(input);
}
///
/// 快捷方式菜单树
///
///
///
[HttpGet("shortcutTree")]
public async Task ShortcutTree()
{
return await _userCenterService.ShortcutTree();
}
#endregion
#region Post
///
/// 编辑个人信息
///
///
///
[HttpPost("updateUserInfo")]
[DisplayName("编辑个人信息")]
public async Task UpdateUserInfo([FromBody] UpdateInfoInput input)
{
await _userCenterService.UpdateUserInfo(input);
}
///
/// 更新签名
///
///
///
[HttpPost("updateSignature")]
[DisplayName("更新签名")]
public async Task UpdateSignature([FromBody] UpdateSignatureInput input)
{
await _userCenterService.UpdateSignature(input);
}
///
/// 编辑工作台
///
///
///
[HttpPost("updateUserWorkbench")]
[DisplayName("编辑工作台")]
public async Task UpdateUserWorkbench([FromBody] UpdateWorkbenchInput input)
{
await _userCenterService.UpdateWorkbench(input);
}
#endregion
}