Files
sbnews/server/app/adminapi/controller/match/MatchController.php
T
2026-06-11 12:15:29 +08:00

41 lines
1.0 KiB
PHP

<?php
namespace app\adminapi\controller\match;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\match\MatchLists;
use app\adminapi\logic\match\MatchLogic;
use app\adminapi\validate\match\MatchValidate;
class MatchController extends BaseAdminController
{
public function lists()
{
return $this->dataLists(new MatchLists());
}
public function detail()
{
$params = (new MatchValidate())->goCheck('detail');
$result = MatchLogic::detail($params);
return $this->data($result);
}
public function edit()
{
$params = (new MatchValidate())->post()->goCheck('edit');
$result = MatchLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(MatchLogic::getError());
}
public function delete()
{
$params = (new MatchValidate())->post()->goCheck('delete');
MatchLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
}