WithdrawController.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace App\Http\Controllers\Admin;
  12. use App\Services\Common\BalanceLogService;
  13. /**
  14. * 提现管理-控制器
  15. * @author laravel开发员
  16. * @since 2020/11/11
  17. * @package App\Http\Controllers
  18. */
  19. class WithdrawController extends Backend
  20. {
  21. /**
  22. * 构造函数
  23. * @author laravel开发员
  24. * @since 2020/11/11
  25. */
  26. public function __construct()
  27. {
  28. parent::__construct();
  29. $this->service = new BalanceLogService();
  30. }
  31. /**
  32. * 列表
  33. * @return array
  34. */
  35. public function index()
  36. {
  37. $pageSize = request()->get('limit', 10);
  38. $list = $this->service->getDataList(request()->all(), $pageSize);
  39. $message = array(
  40. "msg" => '操作成功',
  41. "code" => 0,
  42. "data" => isset($list['list'])? $list['list']:[],
  43. "count" => isset($list['total'])? $list['total']:0,
  44. );
  45. return $message;
  46. }
  47. /**
  48. * 统计
  49. * @return array
  50. */
  51. public function count()
  52. {
  53. $datas = $this->service->count(request()->all());
  54. $message = array(
  55. "msg" => '操作成功',
  56. "code" => 0,
  57. "data" => $datas,
  58. );
  59. return $message;
  60. }
  61. /**
  62. * 统计
  63. * @return array
  64. */
  65. public function checkCount()
  66. {
  67. $data = $this->service->checkCount();
  68. $message = array(
  69. "msg" => '操作成功',
  70. "code" => 0,
  71. "data" => $data,
  72. );
  73. return $message;
  74. }
  75. /**
  76. * 审核
  77. * @return mixed
  78. */
  79. public function auth(){
  80. $params = request()->post();
  81. if(!$result = BalanceLogService::make()->withdrawAuth($params)){
  82. return showJson(BalanceLogService::make()->getError(), false);
  83. }else{
  84. return showJson(BalanceLogService::make()->getError(), true);
  85. }
  86. }
  87. }