108 lines
2.7 KiB
PHP
108 lines
2.7 KiB
PHP
<?php
|
|
namespace app\adminapi\controller\withdraw;
|
|
|
|
|
|
use app\adminapi\controller\BaseAdminController;
|
|
use app\adminapi\lists\withdraw\WithdrawMethodLists;
|
|
use app\adminapi\logic\withdraw\WithdrawMethodLogic;
|
|
use app\adminapi\validate\withdraw\WithdrawMethodValidate;
|
|
|
|
|
|
/**
|
|
* 提现方式控制器
|
|
* Class WithdrawMethodController
|
|
* @package app\adminapi\controller\withdraw
|
|
*/
|
|
class WithdrawMethodController extends BaseAdminController
|
|
{
|
|
|
|
|
|
/**
|
|
* @notes 获取提现方式列表
|
|
* @return \think\response\Json
|
|
* @author BD
|
|
* @date 2024/02/23 14:34
|
|
*/
|
|
public function lists()
|
|
{
|
|
return $this->dataLists(new WithdrawMethodLists());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 添加提现方式
|
|
* @return \think\response\Json
|
|
* @author BD
|
|
* @date 2024/02/23 14:34
|
|
*/
|
|
public function add()
|
|
{
|
|
$params = (new WithdrawMethodValidate())->post()->goCheck('add');
|
|
$result = WithdrawMethodLogic::add($params);
|
|
if (true === $result) {
|
|
return $this->success('添加成功', [], 1, 1);
|
|
}
|
|
return $this->fail(WithdrawMethodLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑提现方式
|
|
* @return \think\response\Json
|
|
* @author BD
|
|
* @date 2024/02/23 14:34
|
|
*/
|
|
public function edit()
|
|
{
|
|
$params = (new WithdrawMethodValidate())->post()->goCheck('edit');
|
|
$result = WithdrawMethodLogic::edit($params);
|
|
if (true === $result) {
|
|
return $this->success('编辑成功', [], 1, 1);
|
|
}
|
|
return $this->fail(WithdrawMethodLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 删除提现方式
|
|
* @return \think\response\Json
|
|
* @author BD
|
|
* @date 2024/02/23 14:34
|
|
*/
|
|
public function delete()
|
|
{
|
|
$params = (new WithdrawMethodValidate())->post()->goCheck('delete');
|
|
WithdrawMethodLogic::delete($params);
|
|
return $this->success('删除成功', [], 1, 1);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 获取提现方式详情
|
|
* @return \think\response\Json
|
|
* @author BD
|
|
* @date 2024/02/23 14:34
|
|
*/
|
|
public function detail()
|
|
{
|
|
$params = (new WithdrawMethodValidate())->goCheck('detail');
|
|
$result = WithdrawMethodLogic::detail($params);
|
|
return $this->data($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 获取全部提现方式
|
|
* @return \think\response\Json
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
* @author BD
|
|
* @date 2024/02/23 14:34
|
|
*/
|
|
public function all()
|
|
{
|
|
$result = WithdrawMethodLogic::getAllData();
|
|
return $this->data($result);
|
|
}
|
|
|
|
} |