feat: wire match live backend api
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\controller\match;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\match\MatchLiveLists;
|
||||
use app\adminapi\logic\match\MatchLiveLogic;
|
||||
use app\adminapi\validate\match\MatchLiveValidate;
|
||||
|
||||
class MatchLiveController extends BaseAdminController
|
||||
{
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new MatchLiveLists());
|
||||
}
|
||||
|
||||
public function detail()
|
||||
{
|
||||
$params = (new MatchLiveValidate())->goCheck('detail');
|
||||
$result = MatchLiveLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
$params = (new MatchLiveValidate())->post()->goCheck('add');
|
||||
$result = MatchLiveLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(MatchLiveLogic::getError());
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
$params = (new MatchLiveValidate())->post()->goCheck('edit');
|
||||
$result = MatchLiveLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(MatchLiveLogic::getError());
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$params = (new MatchLiveValidate())->post()->goCheck('delete');
|
||||
$result = MatchLiveLogic::delete($params);
|
||||
if (true === $result) {
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(MatchLiveLogic::getError());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user