重构接口

This commit is contained in:
lzw
2021-10-29 23:23:32 +08:00
parent 9d83b24a8d
commit 0bf80f0f51
16 changed files with 508 additions and 245 deletions

View File

@@ -40,7 +40,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
public async Task<Result> Login(user _user)
{
var user_data = await _userService.Login(_user);
var menuList = await _userService.GetMenusByUser(user_data);
var menuList = await _menuService.GetTopMenuByUserId(user_data.id);
if ( user_data!=null)
{
var token = MakeJwt.app(new jwtUser() {user=user_data,menuIds= menuList});
@@ -112,9 +112,8 @@ namespace Yi.Framework.ApiMicroservice.Controllers
[HttpPut]
[Authorize]
public async Task<Result> ChangePassword(ChangePwdDto pwdDto)
{
var uid= pwdDto.user.id;
var user_data = await _userService.GetUserById(uid);
{
var user_data = await _userService.GetUserById(pwdDto.user.id);
string msg = "修改成功";
if (! string.IsNullOrEmpty( pwdDto.newPassword))
{