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

页面修改

parent f3500547
......@@ -78,15 +78,16 @@ namespace Edu.Module.System
}
/// <summary>
/// 删除角色
/// 修改角色状态
/// </summary>
/// <param name="RoleId"></param>
/// <param name="Status"></param>
/// <returns></returns>
public bool RemoveRoleModule(object RoleId)
public bool SetRoleStatusModule(object RoleId,int Status)
{
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));
return flag;
......
......@@ -195,14 +195,15 @@ namespace Edu.WebApi.Controllers.Public
}
/// <summary>
/// 删除角色
/// 修改角色状态
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult RemoveRole()
public ApiResult SetRoleStatus()
{
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();
}
#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