Просмотр исходного кода

Merge branch 'refs/heads/dev-sc-260204'

shichen месяцев назад: 5
Родитель
Сommit
e268c864ec
2 измененных файлов с 50 добавлено и 2 удалено
  1. 47 2
      app/controller/api/shareProsperity/Task.php
  2. 3 0
      route/api.php

+ 47 - 2
app/controller/api/shareProsperity/Task.php

@@ -1,7 +1,9 @@
1
 <?php
1
 <?php
2
 
2
 
3
 namespace app\controller\api\shareProsperity;
3
 namespace app\controller\api\shareProsperity;
4
+use app\common\enum\CommonEnum;
4
 use app\common\repositories\shared\SharedProsperityTaskRepository;
5
 use app\common\repositories\shared\SharedProsperityTaskRepository;
6
+use think\facade\Db;
5
 
7
 
6
 class Task
8
 class Task
7
 {
9
 {
@@ -11,8 +13,8 @@ class Task
11
         $get = app()->request->get();
13
         $get = app()->request->get();
12
         /** @var SharedProsperityTaskRepository $repository */
14
         /** @var SharedProsperityTaskRepository $repository */
13
         $repository = app()->make(SharedProsperityTaskRepository::class);
15
         $repository = app()->make(SharedProsperityTaskRepository::class);
14
-        $repository->partner($get);
15
-        return app('json')->success();
16
+        $data = $repository->partner($get);
17
+        return app('json')->success($data);
16
     }
18
     }
17
 
19
 
18
     public function thankProfits()
20
     public function thankProfits()
@@ -23,4 +25,47 @@ class Task
23
         $repository->thank($get);
25
         $repository->thank($get);
24
         return app('json')->success();
26
         return app('json')->success();
25
     }
27
     }
28
+
29
+    public function groupProfits()
30
+    {
31
+        $get = app()->request->get();
32
+        /** @var SharedProsperityTaskRepository $repository */
33
+        $repository = app()->make(SharedProsperityTaskRepository::class);
34
+        $data = $repository->group($get);
35
+        return app('json')->success($data);
36
+    }
37
+
38
+    public function testProfits()
39
+    {
40
+        $bill = [
41
+            'uid' => 2393,
42
+            'link_id' => 0,
43
+            'pm' => 1,
44
+            'title' => '直推奖',
45
+            'category' => 'now_money',
46
+            'type' => 'commission',
47
+            'number' => 82.8,
48
+            'balance' => 0,
49
+            'mark' => '线下消费直推奖补发',
50
+            'create_time' => date('Y-m-d H:i:s'),
51
+            'status' => 1,
52
+            'commission_type' => CommonEnum::COMMISSION_TYPE['DIRECT_REFERRAL']['code'],
53
+            'order_sn' => 0,
54
+            'tripartite' => 0,
55
+            'type_shop' => 0,
56
+            'mer_id' => 0,
57
+            'source' => 0,
58
+            'order_type' => 1,
59
+            'is_red_brokerage' => 0,
60
+            'gzc' => 3,
61
+            'take_time' => time(),
62
+            'district_id' => '',
63
+            'street_id' => '',
64
+            'month' => '',
65
+        ];
66
+
67
+        $res = Db::name('user_bill')->insert($bill);
68
+        dd($res);
69
+
70
+    }
26
 }
71
 }

+ 3 - 0
route/api.php

@@ -1383,6 +1383,9 @@ Route::group('/pages', function () {
1383
 Route::get('share_prosperity_partner', 'api.shareProsperity.Task/partnerProfits');
1383
 Route::get('share_prosperity_partner', 'api.shareProsperity.Task/partnerProfits');
1384
 // 共富感恩奖
1384
 // 共富感恩奖
1385
 Route::get('share_prosperity_thank', 'api.shareProsperity.Task/thankProfits');
1385
 Route::get('share_prosperity_thank', 'api.shareProsperity.Task/thankProfits');
1386
+// 共富奖
1387
+Route::get('share_prosperity_group', 'api.shareProsperity.Task/groupProfits');
1388
+Route::get('share_prosperity_test', 'api.shareProsperity.Task/testProfits');
1386
 
1389
 
1387
 // 测试接口
1390
 // 测试接口
1388
 Route::get('/test', 'api.Test/test');
1391
 Route::get('/test', 'api.Test/test');