|
|
@@ -1,6 +1,8 @@
|
|
1
|
1
|
<?php
|
|
2
|
2
|
|
|
3
|
3
|
namespace app\controller\api;
|
|
|
4
|
+use app\common\dao\shared\SharedProsperityUserDao;
|
|
|
5
|
+use app\common\model\shared\SharedProsperityUser;
|
|
4
|
6
|
use app\common\repositories\shared\SharedProsperityUserRepository;
|
|
5
|
7
|
use app\common\repositories\user\UserRepository;
|
|
6
|
8
|
use app\traits\GzcApiRequest;
|
|
|
@@ -9,15 +11,59 @@ class Test
|
|
9
|
11
|
{
|
|
10
|
12
|
public function test()
|
|
11
|
13
|
{
|
|
12
|
|
- /** @var SharedProsperityUserRepository $userRepository */
|
|
13
|
|
- $userRepository = app()->make(SharedProsperityUserRepository::class);
|
|
14
|
|
- $list = $userRepository->getUserTree(43);
|
|
15
|
|
- var_dump(json_encode($list));
|
|
16
|
|
- // $field = request()->param('field');
|
|
17
|
|
- // /** @var UserRepository $userRepository */
|
|
18
|
|
- // $userRepository = app()->make(UserRepository::class);
|
|
19
|
|
- // $list = $userRepository->getUserForTree($field,43);
|
|
|
14
|
+
|
|
|
15
|
+
|
|
|
16
|
+ // 18201226770 4858下的单 改成 13716268932 5064下单
|
|
|
17
|
+
|
|
|
18
|
+ // 上下级关系正确
|
|
|
19
|
+
|
|
|
20
|
+ // 订单所属已修改
|
|
|
21
|
+
|
|
|
22
|
+ // 订单产生的共富奖励已修改
|
|
|
23
|
+
|
|
|
24
|
+ // 佣金修改
|
|
|
25
|
+
|
|
|
26
|
+
|
|
|
27
|
+
|
|
|
28
|
+
|
|
|
29
|
+
|
|
|
30
|
+
|
|
|
31
|
+
|
|
|
32
|
+
|
|
|
33
|
+
|
|
|
34
|
+
|
|
|
35
|
+
|
|
|
36
|
+
|
|
|
37
|
+
|
|
|
38
|
+
|
|
|
39
|
+
|
|
|
40
|
+ // 查询团队业绩
|
|
|
41
|
+ // $ids = [
|
|
|
42
|
+ // 1213
|
|
|
43
|
+ // ];
|
|
|
44
|
+ // $res = [];
|
|
|
45
|
+ // foreach ($ids as $id) {
|
|
|
46
|
+ // /** @var SharedProsperityUserDao $dao */
|
|
|
47
|
+ // $dao = app()->make(SharedProsperityUserDao::class);
|
|
|
48
|
+ // $userIds = $dao->getAllSubordinateUserIds($id,true,5);
|
|
|
49
|
+ // /** @var SharedProsperityUser $model */
|
|
|
50
|
+ // $sum = SharedProsperityUser::getDB()
|
|
|
51
|
+ // ->whereIn('user_id', $userIds)
|
|
|
52
|
+ // ->sum('pv');
|
|
|
53
|
+ // $res[$id] = $sum;
|
|
|
54
|
+ // }
|
|
|
55
|
+ // dd($res);
|
|
|
56
|
+
|
|
|
57
|
+
|
|
|
58
|
+ // /** @var SharedProsperityUserRepository $userRepository */
|
|
|
59
|
+ // $userRepository = app()->make(SharedProsperityUserRepository::class);
|
|
|
60
|
+ // $list = $userRepository->getUserTree(2393);
|
|
20
|
61
|
// var_dump(json_encode($list));
|
|
|
62
|
+ $field = request()->param('field');
|
|
|
63
|
+ /** @var UserRepository $userRepository */
|
|
|
64
|
+ $userRepository = app()->make(UserRepository::class);
|
|
|
65
|
+ $list = $userRepository->getUserForTree($field,31);
|
|
|
66
|
+ var_dump(json_encode($list));
|
|
21
|
67
|
// return app('json')->success($list);
|
|
22
|
68
|
}
|
|
23
|
69
|
}
|