This commit is contained in:
你的名字
2025-10-16 09:51:45 +08:00
parent ac0f12b21a
commit 8f278d494f
3 changed files with 42 additions and 3 deletions

View File

@ -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')
]);
}

View File

@ -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