优化接口、仓储层

This commit is contained in:
izory
2021-09-27 16:07:55 +08:00
parent 40026f596f
commit 56a04bbf73
48 changed files with 621 additions and 745 deletions

View File

@@ -84,7 +84,7 @@ namespace ZR.Admin.WebApi.Controllers.System
user.Update_time = DateTime.Now;
int result = UserService.ChangeUser(user);
return OutputJson(result);
return ToResponse(result);
}
/// <summary>
@@ -103,11 +103,11 @@ namespace ZR.Admin.WebApi.Controllers.System
string newMd5 = NETCore.Encrypt.EncryptProvider.Md5(newPassword);
if (user.Password != oldMd5)
{
return OutputJson(ApiResult.Error("修改密码失败,旧密码错误"));
return ToResponse(ApiResult.Error("修改密码失败,旧密码错误"));
}
if (user.Password == newMd5)
{
return OutputJson(ApiResult.Error("新密码不能和旧密码相同"));
return ToResponse(ApiResult.Error("新密码不能和旧密码相同"));
}
if (UserService.ResetPwd(loginUser.UserId, newMd5) > 0)
{
@@ -116,7 +116,7 @@ namespace ZR.Admin.WebApi.Controllers.System
return SUCCESS(1);
}
return OutputJson(ApiResult.Error("修改密码异常,请联系管理员"));
return ToResponse(ApiResult.Error("修改密码异常,请联系管理员"));
}
/// <summary>