public AdministratorResponse AlterAdminPwd(string adminId = null, string Pwd = null, string newPwd = null) { AdministratorResponse response = new AdministratorResponse(); if (adminId == null) { response.ReplyMsg = "账号不能为空"; return(response); } else if (Pwd == null) { response.ReplyMsg = "原密码不能为空"; return(response); } else if (newPwd == null) { response.ReplyMsg = "新密码不能为空"; return(response); } else { var count = ar.EditAdminPwd(adminId, Pwd, newPwd); if (count > 0) { response.ReplyMsg = "密码修改成功"; } else { response.ReplyMsg = "密码修改失败"; } return(response); } }
public AdministratorResponse Login([FromBody] AdministratorLoginItem body) { AdministratorResponse response = new AdministratorResponse(); var a = ar.GetAdministrator(body.AdminId, body.AdminPasword); if (a > 0) { response.ReplyMsg = "登陆成功"; } else { response.ReplyMsg = "登陆失败,管理编号或密码错误"; } return(response); }