first commit
This commit is contained in:
199
app/adminapi/controller/finance/WithdrawRecordController.php
Normal file
199
app/adminapi/controller/finance/WithdrawRecordController.php
Normal file
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\adminapi\controller\finance;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\finance\{WithdrawRecordLists,AgentWithdrawRecordLists};
|
||||
use app\adminapi\logic\finance\WithdrawRecordLogic;
|
||||
use app\adminapi\validate\finance\WithdrawRecordValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 提现记录控制器
|
||||
* Class WithdrawRecordController
|
||||
* @package app\adminapi\controller\finance
|
||||
*/
|
||||
class WithdrawRecordController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取提现记录列表
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/02/25 12:35
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new WithdrawRecordLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取代理提现记录列表
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function agentLists()
|
||||
{
|
||||
return $this->dataLists(new AgentWithdrawRecordLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 添加提现记录
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/02/25 12:35
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new WithdrawRecordValidate())->post()->goCheck('add');
|
||||
$result = WithdrawRecordLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(WithdrawRecordLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑提现记录
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/02/25 12:35
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new WithdrawRecordValidate())->post()->goCheck('edit');
|
||||
$result = WithdrawRecordLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(WithdrawRecordLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除提现记录
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/02/25 12:35
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new WithdrawRecordValidate())->post()->goCheck('delete');
|
||||
WithdrawRecordLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取提现记录详情
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/02/25 12:35
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new WithdrawRecordValidate())->goCheck('detail');
|
||||
$result = WithdrawRecordLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes udun代付
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function udunPay()
|
||||
{
|
||||
$params = (new WithdrawRecordValidate())->post()->goCheck('udunPay');
|
||||
$result = WithdrawRecordLogic::udunPay($params);
|
||||
if ('success' === $result) {
|
||||
return $this->success('发起成功', [], 1, 1);
|
||||
}
|
||||
|
||||
return $this->fail(WithdrawRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 同意提现
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function agree()
|
||||
{
|
||||
$params = (new WithdrawRecordValidate())->post()->goCheck('agree');
|
||||
$result = WithdrawRecordLogic::agree($params);
|
||||
if (true === $result) {
|
||||
return $this->success('同意成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(WithdrawRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 拒绝提现
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function refuse()
|
||||
{
|
||||
$params = (new WithdrawRecordValidate())->post()->goCheck('refuse');
|
||||
$result = WithdrawRecordLogic::refuse($params);
|
||||
if (true === $result) {
|
||||
return $this->success('拒绝成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(WithdrawRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 备注
|
||||
* @return \think\response\Json
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function remark()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = WithdrawRecordLogic::remark($params);
|
||||
if (true === $result) {
|
||||
return $this->success('备注成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(WithdrawRecordLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 提现统计
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author bd
|
||||
* @date 2024/01/31 14:07
|
||||
*/
|
||||
public function stat()
|
||||
{
|
||||
$result = WithdrawRecordLogic::stat();
|
||||
return $this->success('', $result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user