mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 完成查询优化
This commit is contained in:
parent
27f9c4fd45
commit
de1160bdb7
@ -33,15 +33,15 @@ class User extends Base {
|
||||
|
||||
$obj = new AdminUser();
|
||||
if (strlen($status)) {
|
||||
$obj->where('status', $status);
|
||||
$obj = $obj->where('status', $status);
|
||||
}
|
||||
if ($type) {
|
||||
switch ($type) {
|
||||
case 1:
|
||||
$obj->whereLike('username', "%{$keywords}%");
|
||||
$obj = $obj->whereLike('username', "%{$keywords}%");
|
||||
break;
|
||||
case 2:
|
||||
$obj->whereLike('nickname', "%{$keywords}%");
|
||||
$obj = $obj->whereLike('nickname', "%{$keywords}%");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user