pull/1/head
wanghousheng 10 months ago
parent 886b1e4710
commit 1fa6a68329
  1. 6
      app/api/controller/Recovery.php
  2. 6
      app/store/controller/Recovery.php

@ -49,12 +49,12 @@ class Recovery extends Controller
$category_id = intval($this->request->post('category_id'));
$where = [];
if ($recovery_name) {
$where[] = ['recovery.recovery_name', 'like', "%$recovery_name%"];
$where[] = ['server_recovery.recovery_name', 'like', "%$recovery_name%"];
}
if ($category_id) {
$where[] = ['recovery.category_id', '=', $category_id];
$where[] = ['server_recovery.category_id', '=', $category_id];
}
$where[] = ['recovery.status', '=', 1];
$where[] = ['server_recovery.status', '=', 1];
$model = new ServerRecovery();
$list = $model->getList($where);
$data['list'] = $list->items();

@ -94,13 +94,13 @@ class Recovery extends Controller
$status = intval($this->request->post('status'));
$where = [];
if ($recovery_name) {
$where[] = ['recovery.server_name', 'like', "%$recovery_name%"];
$where[] = ['server_recovery.server_name', 'like', "%$recovery_name%"];
}
if ($category_id) {
$where[] = ['recovery.category_id', '=', $category_id];
$where[] = ['server_recovery.category_id', '=', $category_id];
}
if ($status) {
$where[] = ['recovery.status', '=', $status];
$where[] = ['server_recovery.status', '=', $status];
}
try {
$list = $model->getList($where);

Loading…
Cancel
Save