|
@@ -26,7 +26,6 @@ class ServerInformationController extends BaseController |
|
@@ -26,7 +26,6 @@ class ServerInformationController extends BaseController |
|
26
|
$this->map['title'] = ['like','%'.$this->map['title'],','];
|
26
|
$this->map['title'] = ['like','%'.$this->map['title'],','];
|
|
27
|
}
|
27
|
}
|
|
28
|
$serverInformationModel = new ServerInformation();
|
28
|
$serverInformationModel = new ServerInformation();
|
|
29
|
- $this->map['deleted'] = ServerInformation::DELETED_NORMAL;
|
|
|
|
30
|
$lists = $serverInformationModel->lists($this->map,$this->page,$this->row,$this->order);
|
29
|
$lists = $serverInformationModel->lists($this->map,$this->page,$this->row,$this->order);
|
|
31
|
$this->response('success', Code::SUCCESS, $lists);
|
30
|
$this->response('success', Code::SUCCESS, $lists);
|
|
32
|
|
31
|
|
|
@@ -82,14 +81,6 @@ class ServerInformationController extends BaseController |
|
@@ -82,14 +81,6 @@ class ServerInformationController extends BaseController |
|
82
|
$this->response('服务器删除成功!');
|
81
|
$this->response('服务器删除成功!');
|
|
83
|
}
|
82
|
}
|
|
84
|
|
83
|
|
|
85
|
- /**
|
|
|
|
86
|
- * 获取软删除的数据
|
|
|
|
87
|
- * @return JsonResponse
|
|
|
|
88
|
- */
|
|
|
|
89
|
- public function delete_list()
|
|
|
|
90
|
- {
|
|
|
|
91
|
- return $this->lists(ServerInformation::DELETED_DELETE);
|
|
|
|
92
|
- }
|
|
|
|
93
|
|
84
|
|
|
94
|
/**
|
85
|
/**
|
|
95
|
* 恢复数据
|
86
|
* 恢复数据
|
|
@@ -105,33 +96,6 @@ class ServerInformationController extends BaseController |
|
@@ -105,33 +96,6 @@ class ServerInformationController extends BaseController |
|
105
|
}
|
96
|
}
|
|
106
|
|
97
|
|
|
107
|
|
98
|
|
|
108
|
- /**
|
|
|
|
109
|
- * 搜索
|
|
|
|
110
|
- * @param Request $request
|
|
|
|
111
|
- * @return JsonResponse
|
|
|
|
112
|
- */
|
|
|
|
113
|
- public function search(Request $request)
|
|
|
|
114
|
- {
|
|
|
|
115
|
- $search = [];
|
|
|
|
116
|
- $ip = $request->input('ip');
|
|
|
|
117
|
- if ($ip) {
|
|
|
|
118
|
- $search['ip'] = $ip;
|
|
|
|
119
|
- }
|
|
|
|
120
|
- $remark = $request->input('title');
|
|
|
|
121
|
- if ($remark) {
|
|
|
|
122
|
- $search['title'] = $remark;
|
|
|
|
123
|
- }
|
|
|
|
124
|
- if (empty($search)) {
|
|
|
|
125
|
- return $this->response('请输入搜索内容', Code::USER_ERROR);
|
|
|
|
126
|
- }
|
|
|
|
127
|
- $query = ServerInformation::query()->select(['id', 'title', 'ip']);
|
|
|
|
128
|
- foreach ($search as $key => $item) {
|
|
|
|
129
|
- $query = $query->Where("{$key}", 'like', "%{$item}%");
|
|
|
|
130
|
- }
|
|
|
|
131
|
- $size = $request->input('size', $this->row);
|
|
|
|
132
|
- $query = $query->orderBy('id', 'desc')->paginate($size);
|
|
|
|
133
|
- return $this->response('success', Code::SUCCESS, $query);
|
|
|
|
134
|
- }
|
|
|
|
135
|
|
99
|
|
|
136
|
/**
|
100
|
/**
|
|
137
|
* 服务器信息
|
101
|
* 服务器信息
|