From 393749e7c0d52c126bcdeacded17df197b7d9421 Mon Sep 17 00:00:00 2001 From: lamson <171004297@qq.com> Date: Fri, 27 Oct 2023 16:18:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20HttpTrackerTrait=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=93=8D=E5=BA=94=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/HttpController/Admin/HttpTrackerTrait.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/HttpController/Admin/HttpTrackerTrait.php b/src/HttpController/Admin/HttpTrackerTrait.php index 25ab397..c68456e 100644 --- a/src/HttpController/Admin/HttpTrackerTrait.php +++ b/src/HttpController/Admin/HttpTrackerTrait.php @@ -67,6 +67,15 @@ protected function _builder() $builder->where("($str)"); } + // 响应参数查询 data.result + if ( ! empty($filter['rp_key']) && ! empty($filter['rp_value'])) { + + $sym = strpos($filter['rp_value'], '%') !== false ? 'LIKE' : '='; + + $str = "response->'$.data.result.$filter[rp_key]' $sym '$filter[rp_value]'"; + $builder->where("($str)"); + } + // 自定义部分 if ($my = trim($filter['sql'])) { $builder->where("($my)");