Skip to content

Commit

Permalink
Merge pull request #61 from wonder-game/develop
Browse files Browse the repository at this point in the history
feat: HttpTrackerTrait支持搜索响应参数
  • Loading branch information
linkunyuan authored Oct 27, 2023
2 parents 6f3be77 + 393749e commit cd9dbd1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/HttpController/Admin/HttpTrackerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)");
Expand Down

0 comments on commit cd9dbd1

Please sign in to comment.