作者 lyh

gx

@@ -29,14 +29,13 @@ class UserLogController extends BaseController @@ -29,14 +29,13 @@ class UserLogController extends BaseController
29 $lists = $user->lists($map,$this->page,$this->row,$this->order); 29 $lists = $user->lists($map,$this->page,$this->row,$this->order);
30 if(!empty($lists) && !empty($lists['list'])){ 30 if(!empty($lists) && !empty($lists['list'])){
31 $userModel = new User(); 31 $userModel = new User();
32 - $managerModel = new Manage();  
33 foreach ($lists['list'] as $k => $v){ 32 foreach ($lists['list'] as $k => $v){
34 $info = $userModel->read(['id'=>$v['user_id']]); 33 $info = $userModel->read(['id'=>$v['user_id']]);
35 $v['mobile'] = $info['mobile'] ?? ''; 34 $v['mobile'] = $info['mobile'] ?? '';
36 $v['name'] = $info['name'] ?? ''; 35 $v['name'] = $info['name'] ?? '';
37 $v['type'] = ($v['type'] == 0) ? '用户登录' : '管理员登录'; 36 $v['type'] = ($v['type'] == 0) ? '用户登录' : '管理员登录';
38 if(!empty($v['remark'])){ 37 if(!empty($v['remark'])){
39 - $v['remark'] = $this->handleRemark($managerModel,$v['remark']); 38 + $v['remark'] = $this->handleRemark($userModel,$v['remark']);
40 } 39 }
41 $lists['list'][$k] = $v; 40 $lists['list'][$k] = $v;
42 } 41 }
@@ -51,14 +50,13 @@ class UserLogController extends BaseController @@ -51,14 +50,13 @@ class UserLogController extends BaseController
51 * @method :post 50 * @method :post
52 * @time :2023/9/5 16:56 51 * @time :2023/9/5 16:56
53 */ 52 */
54 - public function searchParam(){ 53 + public function searchParam(&$userModel){
55 $map = []; 54 $map = [];
56 - $managerModel = new Manage();  
57 if(isset($this->map['mobile']) && !empty($this->map['mobile'])){ 55 if(isset($this->map['mobile']) && !empty($this->map['mobile'])){
58 - $ids = $managerModel->where('mobile', 'like', '%' . $this->map['mobile'] . '%')->pluck('id')->toArray(); 56 + $ids = $userModel->where('mobile', 'like', '%' . $this->map['mobile'] . '%')->pluck('id')->toArray();
59 $map['user_id'] = ['in',$ids]; 57 $map['user_id'] = ['in',$ids];
60 }elseif (isset($this->map['name']) && !empty($this->map['name'])){ 58 }elseif (isset($this->map['name']) && !empty($this->map['name'])){
61 - $ids = $managerModel->where('name', 'like', '%' . $this->param['name'] . '%')->pluck('id')->toArray(); 59 + $ids = $userModel->where('name', 'like', '%' . $this->param['name'] . '%')->pluck('id')->toArray();
62 $map['user_id'] = ['in',$ids]; 60 $map['user_id'] = ['in',$ids];
63 } 61 }
64 if(isset($this->map['created_at'])){ 62 if(isset($this->map['created_at'])){