|
...
|
...
|
@@ -29,14 +29,13 @@ class UserLogController extends BaseController |
|
|
|
$lists = $user->lists($map,$this->page,$this->row,$this->order);
|
|
|
|
if(!empty($lists) && !empty($lists['list'])){
|
|
|
|
$userModel = new User();
|
|
|
|
$managerModel = new Manage();
|
|
|
|
foreach ($lists['list'] as $k => $v){
|
|
|
|
$info = $userModel->read(['id'=>$v['user_id']]);
|
|
|
|
$v['mobile'] = $info['mobile'] ?? '';
|
|
|
|
$v['name'] = $info['name'] ?? '';
|
|
|
|
$v['type'] = ($v['type'] == 0) ? '用户登录' : '管理员登录';
|
|
|
|
if(!empty($v['remark'])){
|
|
|
|
$v['remark'] = $this->handleRemark($managerModel,$v['remark']);
|
|
|
|
$v['remark'] = $this->handleRemark($userModel,$v['remark']);
|
|
|
|
}
|
|
|
|
$lists['list'][$k] = $v;
|
|
|
|
}
|
|
...
|
...
|
@@ -51,14 +50,13 @@ class UserLogController extends BaseController |
|
|
|
* @method :post
|
|
|
|
* @time :2023/9/5 16:56
|
|
|
|
*/
|
|
|
|
public function searchParam(){
|
|
|
|
public function searchParam(&$userModel){
|
|
|
|
$map = [];
|
|
|
|
$managerModel = new Manage();
|
|
|
|
if(isset($this->map['mobile']) && !empty($this->map['mobile'])){
|
|
|
|
$ids = $managerModel->where('mobile', 'like', '%' . $this->map['mobile'] . '%')->pluck('id')->toArray();
|
|
|
|
$ids = $userModel->where('mobile', 'like', '%' . $this->map['mobile'] . '%')->pluck('id')->toArray();
|
|
|
|
$map['user_id'] = ['in',$ids];
|
|
|
|
}elseif (isset($this->map['name']) && !empty($this->map['name'])){
|
|
|
|
$ids = $managerModel->where('name', 'like', '%' . $this->param['name'] . '%')->pluck('id')->toArray();
|
|
|
|
$ids = $userModel->where('name', 'like', '%' . $this->param['name'] . '%')->pluck('id')->toArray();
|
|
|
|
$map['user_id'] = ['in',$ids];
|
|
|
|
}
|
|
|
|
if(isset($this->map['created_at'])){
|
...
|
...
|
|