$params['id']]); if (!$info) throw new Exception("操作失败", HttpStatus::CUSTOM_ERROR); $info->update($params); } else { $info = static::$MODEL::create($params); } return true; } }