| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- namespace App\Http\Controllers\Admin;
- use App\Services\Common\AgentWithdrawService;
- /**
- * 代理提现管理控制器
- */
- class AgentWithdrawController extends Backend
- {
- /**
- * 获取提现列表
- */
- public function index()
- {
- $service = new AgentWithdrawService();
- return $service->getList(request()->all());
- }
- /**
- * 获取提现详情
- */
- public function info()
- {
- $id = request()->input('id');
- if (empty($id)) {
- return ['code' => 1, 'msg' => '参数错误'];
- }
- $service = new AgentWithdrawService();
- return $service->getInfo($id);
- }
- /**
- * 审核提现
- */
- public function audit()
- {
- $id = request()->input('id');
- $status = request()->input('status'); // 2-通过,3-驳回
- $remark = request()->input('remark', '');
- if (empty($id) || !in_array($status, [2, 3])) {
- return ['code' => 1, 'msg' => '参数错误'];
- }
- $service = new AgentWithdrawService();
- return $service->audit($id, $status, $remark);
- }
- /**
- * 删除提现记录
- */
- public function delete()
- {
- $id = request()->input('id');
- if (empty($id)) {
- return ['code' => 1, 'msg' => '参数错误'];
- }
- $service = new AgentWithdrawService();
- return $service->delete($id);
- }
- /**
- * 批量删除
- */
- public function deleteAll()
- {
- $ids = request()->input('ids');
- if (empty($ids) || !is_array($ids)) {
- return ['code' => 1, 'msg' => '参数错误'];
- }
- $service = new AgentWithdrawService();
- return $service->deleteAll($ids);
- }
- }
|