public JsonResult ChangePassword(string oldpassword, string password) { if (string.IsNullOrWhiteSpace(oldpassword) || string.IsNullOrWhiteSpace(password)) { return(Json(new Result() { success = false, msg = "密码不能为空!" })); } var model = CurrentSellerManager; var pwd = SecureHelper.MD5(SecureHelper.MD5(oldpassword) + model.PasswordSalt); if (pwd == model.Password) { _iManagerService.ChangeSellerManagerPassword(CurrentSellerManager.Id, CurrentSellerManager.ShopId, password, CurrentSellerManager.RoleId); return(Json(new Result() { success = true, msg = "修改成功" })); } else { return(Json(new Result() { success = false, msg = "旧密码错误" })); } }
/// <summary> /// 修改商家管理员密码 /// </summary> /// <param name="model"></param> public static void ChangeSellerManagerPassword(long id, long shopId, string password, long roleId) { _iManagerService.ChangeSellerManagerPassword(id, shopId, password, roleId); }