fix method query
This commit is contained in:
parent
ee3dcc05a0
commit
3b7d478635
@ -55,7 +55,6 @@ switch ($action) {
|
|||||||
->where('type', $tp);
|
->where('type', $tp);
|
||||||
if (count($mts) > 0) {
|
if (count($mts) > 0) {
|
||||||
if (count($mts) != count($methods)) {
|
if (count($mts) != count($methods)) {
|
||||||
foreach ($mts as $mt) {
|
|
||||||
$w = [];
|
$w = [];
|
||||||
$v = [];
|
$v = [];
|
||||||
foreach ($mts as $mt) {
|
foreach ($mts as $mt) {
|
||||||
@ -65,7 +64,6 @@ switch ($action) {
|
|||||||
$query->where_likes($w, $v);
|
$query->where_likes($w, $v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (count($rts) > 0) {
|
if (count($rts) > 0) {
|
||||||
$query->where_in('routers', $rts);
|
$query->where_in('routers', $rts);
|
||||||
}
|
}
|
||||||
@ -90,7 +88,6 @@ switch ($action) {
|
|||||||
}
|
}
|
||||||
if (count($mts) > 0) {
|
if (count($mts) > 0) {
|
||||||
if (count($mts) != count($methods)) {
|
if (count($mts) != count($methods)) {
|
||||||
foreach ($mts as $mt) {
|
|
||||||
$w = [];
|
$w = [];
|
||||||
$v = [];
|
$v = [];
|
||||||
foreach ($mts as $mt) {
|
foreach ($mts as $mt) {
|
||||||
@ -100,7 +97,6 @@ switch ($action) {
|
|||||||
$query->where_likes($w, $v);
|
$query->where_likes($w, $v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (count($rts) > 0) {
|
if (count($rts) > 0) {
|
||||||
$query->where_in('routers', $rts);
|
$query->where_in('routers', $rts);
|
||||||
}
|
}
|
||||||
@ -126,17 +122,6 @@ switch ($action) {
|
|||||||
if (count($plns) > 0) {
|
if (count($plns) > 0) {
|
||||||
$query->where_in('plan_name', $plns);
|
$query->where_in('plan_name', $plns);
|
||||||
}
|
}
|
||||||
if (count($mts) > 0) {
|
|
||||||
if (count($mts) != count($methods)) {
|
|
||||||
$w = [];
|
|
||||||
$v = [];
|
|
||||||
foreach ($mts as $mt) {
|
|
||||||
$w[] ='method';
|
|
||||||
$v[] = "$mt - %";
|
|
||||||
}
|
|
||||||
$query->where_likes($w, $v);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$count = $query->count();
|
$count = $query->count();
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
$result['datas'][] = $count;
|
$result['datas'][] = $count;
|
||||||
@ -173,7 +158,6 @@ switch ($action) {
|
|||||||
}
|
}
|
||||||
if (count($mts) > 0) {
|
if (count($mts) > 0) {
|
||||||
if (count($mts) != count($methods)) {
|
if (count($mts) != count($methods)) {
|
||||||
foreach ($mts as $mt) {
|
|
||||||
$w = [];
|
$w = [];
|
||||||
$v = [];
|
$v = [];
|
||||||
foreach ($mts as $mt) {
|
foreach ($mts as $mt) {
|
||||||
@ -183,7 +167,6 @@ switch ($action) {
|
|||||||
$query->where_likes($w, $v);
|
$query->where_likes($w, $v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (count($rts) > 0) {
|
if (count($rts) > 0) {
|
||||||
$query->where_in('routers', $rts);
|
$query->where_in('routers', $rts);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user