| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- namespace App\Http\Controllers\Admin;
- use App\Services\Common\BalanceLogsService;
- /**
- * 统一余额日志管理控制器(充值/提现)
- */
- class BalanceLogsController extends Backend
- {
- /**
- * 获取列表(支持所有账户类型)
- */
- public function index()
- {
- $service = new BalanceLogsService();
- return $service->getList(request()->all());
- }
- /**
- * 获取详情
- */
- public function info()
- {
- $id = request()->input('id');
- if (empty($id)) {
- return ['code' => 1, 'msg' => '参数错误'];
- }
- $service = new BalanceLogsService();
- return $service->getInfo($id);
- }
- /**
- * 审核(仅提现)
- */
- public function audit()
- {
- $id = request()->input('id');
- $status = request()->input('status'); // 2-通过,3-驳回
- $remark = request()->input('remark', '');
- $payImg = request()->input('pay_img', '');
- if (empty($id) || !in_array($status, [2, 3])) {
- return ['code' => 1, 'msg' => '参数错误'];
- }
- $service = new BalanceLogsService();
- return $service->audit($id, $status, $remark, $payImg);
- }
- /**
- * 删除记录
- */
- public function delete()
- {
- $id = request()->input('id');
- if (empty($id)) {
- return ['code' => 1, 'msg' => '参数错误'];
- }
- $service = new BalanceLogsService();
- return $service->delete($id);
- }
- /**
- * 批量删除
- */
- public function deleteAll()
- {
- $ids = request()->input('ids');
- if (empty($ids) || !is_array($ids)) {
- return ['code' => 1, 'msg' => '参数错误'];
- }
- $service = new BalanceLogsService();
- return $service->deleteAll($ids);
- }
- }
|