作者 lyh

gx

... ... @@ -53,7 +53,7 @@ class ManagerLogController extends BaseController
$ids = $managerModel->where('mobile', 'like', '%' . $this->map['mobile'] . '%')->pluck('id')->toArray();
$map['manage_id'] = ['in',$ids];
}elseif (isset($this->map['name']) && !empty($this->map['name'])){
$ids = $managerModel->where($this->map)->pluck('id')->toArray();
$ids = $managerModel->where('name', 'like', '%' . $this->param['name'] . '%')->pluck('id')->toArray();
$map['manage_id'] = ['in',$ids];
}
if(isset($this->map['created_at'])){
... ...
<?php
/**
* @remark :
* @name :UserLoginController.php
* @name :UserLogController.php
* @author :lyh
* @method :post
* @time :2023/9/5 16:07
... ... @@ -15,7 +15,7 @@ use App\Models\Manage\Manage;
use App\Models\User\User;
use App\Models\User\UserLogin;
class UserLoginController extends BaseController
class UserLogController extends BaseController
{
/**
* @remark :用户日志
... ... @@ -54,11 +54,11 @@ class UserLoginController extends BaseController
public function searchParam(){
$map = [];
$managerModel = new Manage();
if(isset($this->param['mobile']) && !empty($this->param['mobile'])){
if(isset($this->map['mobile']) && !empty($this->map['mobile'])){
$ids = $managerModel->where('mobile', 'like', '%' . $this->map['mobile'] . '%')->pluck('id')->toArray();
$map['manage_id'] = ['in',$ids];
}elseif (isset($this->param['name']) && !empty($this->param['name'])){
$ids = $managerModel->where('name', 'like', '%' . $this->map['name'] . '%')->pluck('id')->toArray();
}elseif (isset($this->map['name']) && !empty($this->map['name'])){
$ids = $managerModel->where('name', 'like', '%' . $this->param['name'] . '%')->pluck('id')->toArray();
$map['manage_id'] = ['in',$ids];
}
if(isset($this->map['created_at'])){
... ...
... ... @@ -53,7 +53,7 @@ Route::middleware(['aloginauth'])->group(function () {
//用户日志
Route::prefix('log')->group(function () {
Route::any('/', [Aside\User\UserLoginController::class, 'lists'])->name('admin.user_log_lists');
Route::any('/', [Aside\User\UserLogController::class, 'lists'])->name('admin.user_log_lists');
});
});
... ...