|
@@ -24,6 +24,7 @@ class ManagerLogController extends BaseController |
|
@@ -24,6 +24,7 @@ class ManagerLogController extends BaseController |
|
24
|
* @time :2023/9/5 16:10
|
24
|
* @time :2023/9/5 16:10
|
|
25
|
*/
|
25
|
*/
|
|
26
|
public function lists(LoginLog $manageLogin){
|
26
|
public function lists(LoginLog $manageLogin){
|
|
|
|
27
|
+ $this->map = $this->searchParam();
|
|
27
|
$lists = $manageLogin->lists($this->map,$this->page,$this->row,$this->order);
|
28
|
$lists = $manageLogin->lists($this->map,$this->page,$this->row,$this->order);
|
|
28
|
if(!empty($lists) && !empty($lists['list'])){
|
29
|
if(!empty($lists) && !empty($lists['list'])){
|
|
29
|
$managerModel = new Manage();
|
30
|
$managerModel = new Manage();
|
|
@@ -38,4 +39,24 @@ class ManagerLogController extends BaseController |
|
@@ -38,4 +39,24 @@ class ManagerLogController extends BaseController |
|
38
|
$this->response('success',Code::SUCCESS,$lists);
|
39
|
$this->response('success',Code::SUCCESS,$lists);
|
|
39
|
}
|
40
|
}
|
|
40
|
|
41
|
|
|
|
|
42
|
+ /**
|
|
|
|
43
|
+ * @remark :搜索参数
|
|
|
|
44
|
+ * @name :searchParam
|
|
|
|
45
|
+ * @author :lyh
|
|
|
|
46
|
+ * @method :post
|
|
|
|
47
|
+ * @time :2023/9/5 16:56
|
|
|
|
48
|
+ */
|
|
|
|
49
|
+ public function searchParam(){
|
|
|
|
50
|
+ $map = [];
|
|
|
|
51
|
+ $managerModel = new Manage();
|
|
|
|
52
|
+ if(isset($this->param['mobile']) && !empty($this->param['mobile'])){
|
|
|
|
53
|
+ $ids = $managerModel->where('mobile', 'like', '%' . $this->map['mobile'] . '%')->pluck('id')->toArray();
|
|
|
|
54
|
+ $map['manage_id'] = ['in',$ids];
|
|
|
|
55
|
+ }elseif (isset($this->param['name']) && !empty($this->param['name'])){
|
|
|
|
56
|
+ $ids = $managerModel->where('name', 'like', '%' . $this->map['name'] . '%')->pluck('id')->toArray();
|
|
|
|
57
|
+ $map['manage_id'] = ['in',$ids];
|
|
|
|
58
|
+ }
|
|
|
|
59
|
+ return $map;
|
|
|
|
60
|
+ }
|
|
|
|
61
|
+
|
|
41
|
} |
62
|
} |