no message
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\controller\lottery;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\lottery\LotteryRegionLists;
|
||||
use app\adminapi\logic\lottery\LotteryRegionLogic;
|
||||
use app\adminapi\validate\lottery\LotteryRegionValidate;
|
||||
|
||||
class LotteryRegionController extends BaseAdminController
|
||||
{
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new LotteryRegionLists());
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
$params = (new LotteryRegionValidate())->post()->goCheck('add');
|
||||
LotteryRegionLogic::add($params);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
$params = (new LotteryRegionValidate())->post()->goCheck('edit');
|
||||
$result = LotteryRegionLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(LotteryRegionLogic::getError());
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$params = (new LotteryRegionValidate())->post()->goCheck('delete');
|
||||
LotteryRegionLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
public function detail()
|
||||
{
|
||||
$params = (new LotteryRegionValidate())->goCheck('detail');
|
||||
$result = LotteryRegionLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user