头像上传功能、性别选择

This commit is contained in:
橙子
2022-10-13 23:55:21 +08:00
parent 3555b08fe8
commit 8456320884
119 changed files with 51 additions and 31 deletions

View File

@@ -159,22 +159,22 @@ namespace Yi.Framework.ApiMicroservice.Controllers
return Result.Success().SetData(routers);
}
/// <summary>
/// 更新已登录用户的用户信息
/// </summary>
/// <param name="user"></param>
/// <returns></returns>
[HttpPut]
public async Task<Result> UpdateUserByHttp(UserEntity user)
{
//当然,密码是不能给他修改的
user.Password = null;
user.Salt = null;
///// <summary>
///// 更新已登录用户的用户信息
///// </summary>
///// <param name="user"></param>
///// <returns></returns>
//[HttpPut]
//public async Task<Result> UpdateUserByHttp(UserEntity user)
//{
// //当然,密码是不能给他修改的
// user.Password = null;
// user.Salt = null;
//修改需要赋值上主键哦
user.Id = HttpContext.GetUserIdInfo();
return Result.Success().SetStatus(await _iUserService._repository.UpdateIgnoreNullAsync(user));
}
// //修改需要赋值上主键哦
// user.Id = HttpContext.GetUserIdInfo();
// return Result.Success().SetStatus(await _iUserService._repository.UpdateIgnoreNullAsync(user));
//}
/// <summary>
/// 自己更新密码

View File

@@ -119,6 +119,8 @@ namespace Yi.Framework.ApiMicroservice.Controllers
[Log("用户模块", OperEnum.Update)]
public async Task<Result> UpdateProfile(UserInfoDto userDto)
{
//修改需要赋值上主键哦
userDto.User.Id = HttpContext.GetUserIdInfo();
return Result.Success().SetStatus(await _iUserService.UpdateProfile(userDto));
}