Bladeren bron

会员升级

Kirin 1 jaar geleden
bovenliggende
commit
2a939acf74
2 gewijzigde bestanden met toevoegingen van 52 en 3 verwijderingen
  1. 39 1
      app/controller/admin/v1/finance/UserExtract.php
  2. 13 2
      route/admin.php

+ 39 - 1
app/controller/admin/v1/finance/UserExtract.php

@@ -13,6 +13,7 @@ namespace app\controller\admin\v1\finance;
 
 use app\controller\admin\AuthController;
 use app\services\user\UserExtractServices;
+use crmeb\services\WithdrawService;
 use think\facade\App;
 use think\Request;
 
@@ -46,7 +47,7 @@ class UserExtract extends AuthController
             ['nireid', '', '', 'like'],
             ['data', '', '', 'time'],
         ]);
-        if(isset($where['extract_type']) && $where['extract_type'] == 'wx'){
+        if (isset($where['extract_type']) && $where['extract_type'] == 'wx') {
             $where['extract_type'] = 'weixin';
         }
         return $this->success($this->services->index($where));
@@ -136,4 +137,41 @@ class UserExtract extends AuthController
         if (!$id) $this->fail('缺少参数');
         return $this->success($this->services->adopt((int)$id) ? '操作成功' : '操作失败');
     }
+
+
+    public function getOrderList()
+    {
+        list($status, $page, $limit) = $this->request->getMore([
+            ['status', 0],
+            ['page', 1],
+            ['limit', 10],
+        ], true);
+        return $this->success(WithdrawService::init()::getOrderList($status, $page, $limit));
+    }
+
+
+    public function getOrderExt($id)
+    {
+        list($page, $limit) = $this->request->getMore([
+            ['page', 1],
+            ['limit', 10],
+        ], true);
+        return $this->success(WithdrawService::init()::getOrderList($id, $page, $limit));
+    }
+
+    public function getOrderTemplate($id)
+    {
+        return $this->success(WithdrawService::init()::getOrderTemplate($id));
+    }
+
+    public function changeOrderStatus($id)
+    {
+        list($apply_img, $seal_img, $status, $remarks) = $this->request->postMore([
+            ['apply_img', ''],
+            ['seal_img', ''],
+            ['status', 1],
+            ['remarks', ''],
+        ], true);
+        return $this->success(WithdrawService::init()::changeOrderStatus($id, $apply_img, $seal_img, $status, $remarks));
+    }
 }

+ 13 - 2
route/admin.php

@@ -673,6 +673,17 @@ Route::group('adminapi', function () {
         Route::put('extract/refuse/:id', 'v1.finance.UserExtract/refuse')->option(['real_name' => '拒绝提现申请']);
         //通过提现申请
         Route::put('extract/adopt/:id', 'v1.finance.UserExtract/adopt')->option(['real_name' => '通过提现申请']);
+
+        //提现审核单
+        Route::get('extract/order', 'v1.finance.UserExtract/getOrderList')->option(['real_name' => '提现审核单']);
+        //提现审核单明细
+        Route::get('extract/order/:id', 'v1.finance.UserExtract/getOrderExt')->option(['real_name' => '提现审核单明细']);
+        //提现审核单明细导出
+        Route::get('extract/order/print/:id', 'v1.finance.UserExtract/getOrderTemplate')->option(['real_name' => '提现审核单明细导出']);
+        //提现审核
+        Route::post('extract/order/:id', 'v1.finance.UserExtract/changeOrderStatus')->option(['real_name' => '提现审核']);
+
+
         //充值记录列表
         Route::get('recharge', 'v1.finance.UserRecharge/index')->option(['real_name' => '充值记录列表']);
         //删除充值记录
@@ -921,9 +932,9 @@ Route::group('adminapi', function () {
         //秒杀商品统计
         Route::get('seckill/statistics/head/:id', 'v1.marketing.seckill.StoreSeckill/seckillStatistics')->option(['real_name' => '秒杀统计']);
         //秒杀商品参与人
-        Route::get('seckill/statistics/people/:id','v1.marketing.seckill.StoreSeckill/seckillPeople')->option(['real_name' => '秒杀活动参与人']);
+        Route::get('seckill/statistics/people/:id', 'v1.marketing.seckill.StoreSeckill/seckillPeople')->option(['real_name' => '秒杀活动参与人']);
         //秒杀商品订单
-        Route::get('seckill/statistics/order/:id','v1.marketing.seckill.StoreSeckill/seckillOrder')->option(['real_name' => '秒杀活动订单']);
+        Route::get('seckill/statistics/order/:id', 'v1.marketing.seckill.StoreSeckill/seckillOrder')->option(['real_name' => '秒杀活动订单']);
 
         //积分日志列表
         Route::get('integral', 'v1.marketing.integral.UserPoint/index')->option(['real_name' => '积分日志列表']);