first commit
This commit is contained in:
110
app/adminapi/controller/withdraw/WithdrawBankController.php
Normal file
110
app/adminapi/controller/withdraw/WithdrawBankController.php
Normal file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\withdraw;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\withdraw\WithdrawBankLists;
|
||||
use app\adminapi\logic\withdraw\WithdrawBankLogic;
|
||||
use app\adminapi\validate\withdraw\WithdrawBankValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 可提现银行控制器
|
||||
* Class WithdrawBankController
|
||||
* @package app\adminapi\controller\withdraw
|
||||
*/
|
||||
class WithdrawBankController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取可提现银行列表
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/02/25 12:19
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new WithdrawBankLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加可提现银行
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/02/25 12:19
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new WithdrawBankValidate())->post()->goCheck('add');
|
||||
$result = WithdrawBankLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(WithdrawBankLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑可提现银行
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/02/25 12:19
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new WithdrawBankValidate())->post()->goCheck('edit');
|
||||
$result = WithdrawBankLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(WithdrawBankLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除可提现银行
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/02/25 12:19
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new WithdrawBankValidate())->post()->goCheck('delete');
|
||||
WithdrawBankLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取可提现银行详情
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/02/25 12:19
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new WithdrawBankValidate())->goCheck('detail');
|
||||
$result = WithdrawBankLogic::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/25 12:19
|
||||
*/
|
||||
public function allByLang()
|
||||
{
|
||||
$params = (new WithdrawBankValidate())->goCheck('allByLang');
|
||||
$result = WithdrawBankLogic::allByLang($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user