操作日志新增条件查询,并简单优化了操作日志控制器

This commit is contained in:
tlerbao
2020-07-15 11:39:55 +08:00
parent a6ad9b63dd
commit 142fd71b56
3 changed files with 46 additions and 21 deletions

View File

@@ -8,12 +8,6 @@ use catchAdmin\system\model\OperateLog as Log;
class OperateLog extends CatchController
{
protected $model;
public function __construct(Log $model)
{
$this->model = $model;
}
/**
*
* @time 2020年04月28日
@@ -45,7 +39,7 @@ class OperateLog extends CatchController
* @throws \Exception
* @return \think\response\Json
*/
public function delete($id)
public function delete($id, Log $log)
{
$ids = explode(',', $id);
@@ -53,6 +47,6 @@ class OperateLog extends CatchController
return false;
}
return CatchResponse::success($this->model->whereIn('id', $ids)->delete());
return CatchResponse::success($log->whereIn('id', $ids)->delete());
}
}