|
|
@@ -1,7 +1,9 @@
|
|
1
|
1
|
<?php
|
|
2
|
2
|
|
|
3
|
3
|
namespace app\controller\api\shareProsperity;
|
|
|
4
|
+use app\common\enum\CommonEnum;
|
|
4
|
5
|
use app\common\repositories\shared\SharedProsperityTaskRepository;
|
|
|
6
|
+use think\facade\Db;
|
|
5
|
7
|
|
|
6
|
8
|
class Task
|
|
7
|
9
|
{
|
|
|
@@ -11,8 +13,8 @@ class Task
|
|
11
|
13
|
$get = app()->request->get();
|
|
12
|
14
|
/** @var SharedProsperityTaskRepository $repository */
|
|
13
|
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
|
20
|
public function thankProfits()
|
|
|
@@ -23,4 +25,47 @@ class Task
|
|
23
|
25
|
$repository->thank($get);
|
|
24
|
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
|
}
|