1
This commit is contained in:
@ -76,8 +76,8 @@ class Index extends AdminController
|
||||
public function get_order()
|
||||
{
|
||||
$this->success('操作成功', [
|
||||
'count'=>(new MallOrder())->where([['create_time','>',strtotime(date('Y-m-d')." 06:00:00")],['status','=',0]])->count(),
|
||||
'rid'=>(new MallOrder())->where([['create_time','>',strtotime(date('Y-m-d')." 06:00:00")],['status','=',0]])
|
||||
'count'=>(new MallOrder())->where([['status','=',0]])->count(),
|
||||
'rid'=>(new MallOrder())->where([['status','=',0]])
|
||||
->order('id desc')->value('id')
|
||||
]);
|
||||
}
|
||||
|
||||
@ -110,6 +110,22 @@ class Order extends AdminController
|
||||
$save ? $this->success('IP拉黑成功') : $this->error('保存失败');
|
||||
}
|
||||
}
|
||||
#[NodeAnnotation(title: '开始操作', auth: true)]
|
||||
public function start_url(Request $request, $id): string
|
||||
{
|
||||
$row = self::$model::find($id);
|
||||
empty($row) && $this->error('数据不存在');
|
||||
if ($request->isPost()) {
|
||||
try {
|
||||
$save = (new \app\admin\model\BlackIp())->save([
|
||||
'type' => $row->type == 1?0:1,
|
||||
]);
|
||||
}catch (\Exception $e) {
|
||||
$this->error('保存失败');
|
||||
}
|
||||
$save ? $this->success('IP拉黑成功') : $this->error('保存失败');
|
||||
}
|
||||
}
|
||||
|
||||
#[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOGIN)]
|
||||
public function no_check_login(Request $request): string
|
||||
|
||||
Reference in New Issue
Block a user