fixed:登录日志删除失败

This commit is contained in:
JaguarJack
2020-09-25 10:47:20 +08:00
parent 09b20c255b
commit 097b0e1ee5
2 changed files with 4 additions and 4 deletions

View File

@@ -4,7 +4,6 @@ namespace catchAdmin\system\controller;
use catcher\base\CatchController;
use catcher\CatchResponse;
use think\facade\Db;
use catchAdmin\system\model\LoginLog as Log;
class LoginLog extends CatchController
@@ -26,11 +25,12 @@ class LoginLog extends CatchController
*
* @time 2020年04月28日
* @param Log $log
* @param $id
* @throws \Exception
* @return \think\response\Json
*/
public function empty(Log $log)
public function empty($id, Log $log)
{
return CatchResponse::success($log->where('id', '>', 0)->delete(), '清空成功');
return CatchResponse::success($log->deleteBy($id), '删除成功');
}
}