feat: new chain

This commit is contained in:
hashbro
2026-08-11 03:27:54 +08:00
parent 41023b16f4
commit 4983077085
17 changed files with 94 additions and 47 deletions
@@ -122,11 +122,11 @@ class PageVisitController extends Controller
$q = PageVisit::query();
AgentScope::applyChannelIdScope($q, $this->agent());
$agentUserId = $this->isAgentPortal()
? (int) ($this->agent()?->id ?? 0)
: (int) $request->query('agent_user_id', 0);
if (! $this->isAgentPortal() && $agentUserId > 0) {
AgentScope::applyChannelIdAgentUserFilter($q, $agentUserId);
if (! $this->isAgentPortal()) {
AgentScope::applyChannelIdAgentUserFilter(
$q,
AgentScope::parseAgentUserIdFilter($request->query('agent_user_id'))
);
}
$channelId = trim((string) $request->query('channel_id', ''));