test_lgq/niucloud/app/adminapi/controller/member/CashOut.php
2024-01-24 17:36:08 +08:00

102 lines
2.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\member;
use app\dict\member\MemberCashOutDict;
use app\dict\pay\TransferDict;
use app\service\admin\member\MemberCashOutService;
use core\base\BaseAdminController;
use think\Response;
class CashOut extends BaseAdminController
{
/**
* 提现列表
* @return Response
*/
public function lists()
{
$data = $this->request->params([
['member_id', ''],
['status', ''],
['transfer_type', ''],
['create_time', []],
['audit_time', []],
['transfer_time', []],
['cash_out_no', ''],
['keywords', '']
]);
return success((new MemberCashOutService())->getPage($data));
}
/**
* 提现详情
* @param int $id
* @return Response
*/
public function info(int $id)
{
return success((new MemberCashOutService())->getInfo($id));
}
public function audit($id, $action)
{
$data = $this->request->params([
['refuse_reason', ''],
]);
(new MemberCashOutService())->audit($id, $action, $data);
return success();
}
/**
* 转账方式
* @return Response
*/
public function getTransferType()
{
return success(TransferDict::getTransferType([], false));
}
/**
* 转账方式
* @param $id
* @return Response
*/
public function transfer($id)
{
$data = $this->request->params([
['transfer_voucher', ''],
['transfer_remark', ''],
['transfer_type', '']
]);
(new MemberCashOutService())->transfer($id, $data);
return success();
}
/**
* 状态
* @return Response
*/
public function getStatusList()
{
return success(MemberCashOutDict::getStatus());
}
/**
* 统计数据
*/
public function stat()
{
return success((new MemberCashOutService())->stat());
}
}