Commit 5861f857 authored by 黄奎's avatar 黄奎

页面修改

parent f3500547
...@@ -78,15 +78,16 @@ namespace Edu.Module.System ...@@ -78,15 +78,16 @@ namespace Edu.Module.System
} }
/// <summary> /// <summary>
/// 删除角色 /// 修改角色状态
/// </summary> /// </summary>
/// <param name="RoleId"></param> /// <param name="RoleId"></param>
/// <param name="Status"></param>
/// <returns></returns> /// <returns></returns>
public bool RemoveRoleModule(object RoleId) public bool SetRoleStatusModule(object RoleId,int Status)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Role_ViewModel.Status),(int)DateStateEnum.Delete}, {nameof(RB_Role_ViewModel.Status),Status},
}; };
bool flag = roleRepository.Update(fileds, new WhereHelper(nameof(RB_Role_ViewModel.RoleId), RoleId)); bool flag = roleRepository.Update(fileds, new WhereHelper(nameof(RB_Role_ViewModel.RoleId), RoleId));
return flag; return flag;
......
...@@ -195,14 +195,15 @@ namespace Edu.WebApi.Controllers.Public ...@@ -195,14 +195,15 @@ namespace Edu.WebApi.Controllers.Public
} }
/// <summary> /// <summary>
/// 删除角色 /// 修改角色状态
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult RemoveRole() public ApiResult SetRoleStatus()
{ {
var RoleId = base.ParmJObj.GetInt("RoleId", 0); var RoleId = base.ParmJObj.GetInt("RoleId", 0);
var flag = roleModule.RemoveRoleModule(RoleId); var Status = base.ParmJObj.GetInt("Status", 0);
var flag = roleModule.SetRoleStatusModule(RoleId, Status);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
#endregion #endregion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment