更新后端传tenantid

This commit is contained in:
2026-02-26 23:43:01 +08:00
parent 21480f43b1
commit 99fc99f8ad
4 changed files with 150 additions and 13 deletions
+11
View File
@@ -187,4 +187,15 @@ abstract class BaseController
}
}
/**
* 获取当前用户的 tenant_id
*
* @return int 租户ID
*/
protected function getTenantId(): int
{
$userInfo = $this->getAdminUserInfo();
return isset($userInfo['tenant_id']) ? intval($userInfo['tenant_id']) : 0;
}
}