Beispiel #1
0
 public IActionResult ChangeName([FromBody] Admin admin)
 {
     if (!JudgeRoles(1))
     {
         return(Json(new { code = -1, msg = "您没有权限进行此操作!" }));
     }
     if (AdminSystem.ChangeName(admin))
     {
         AdminSystem.AddLog(GetAdminName(), "修改用户名");
         return(Json(new { code = 0, msg = "用户名修改成功" }));
     }
     return(Json(new { code = -1, msg = "用户名修改失败" }));
 }