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

Merge branch 'master' of https://git.bjtdba.com/shop/php

xialei 1 год назад
Родитель
Сommit
a7f162468c
2 измененных файлов с 22 добавлено и 22 удалено
  1. 21 21
      app/controller/api/Auth.php
  2. 1 1
      app/controller/api/user/User.php

+ 21 - 21
app/controller/api/Auth.php

@@ -913,28 +913,28 @@ class Auth extends BaseController
913
 
913
 
914
     public function getteamsnum($teamid){
914
     public function getteamsnum($teamid){
915
 
915
 
916
-        $subordinate_members = Db::name('user')
917
-            ->alias('u')
918
-            ->join('store_order so', 'u.uid = so.uid', 'LEFT')
919
-            ->where("u.spread_uid", $teamid)
920
-            ->where("so.mer_id", 496)
921
-            ->group('u.uid')
922
-
923
-            ->select();
924
-
925
-
926
-        $total_amount_pv_team = 0;
927
-        $team_count_total = 0;
928
-
929
-        foreach ($subordinate_members as $k => $v) {
930
-            $t_teams_pv = $this->calculatePerformance($v['uid']);
931
-            $total_amount_pv_team += $t_teams_pv['total_performance'];
932
-            $team_count_total += $t_teams_pv['team_count'];
933
-
934
-
935
-        }
916
+//        $subordinate_members = Db::name('user')
917
+//            ->alias('u')
918
+//            ->join('store_order so', 'u.uid = so.uid', 'LEFT')
919
+//            ->where("u.spread_uid", $teamid)
920
+//            ->where("so.mer_id", 496)
921
+//            ->group('u.uid')
922
+//
923
+//            ->select();
924
+//
925
+//
926
+//        $total_amount_pv_team = 0;
927
+//        $team_count_total = 0;
928
+//
929
+//        foreach ($subordinate_members as $k => $v) {
930
+//            $t_teams_pv = $this->calculatePerformance($v['uid']);
931
+//            $total_amount_pv_team += $t_teams_pv['total_performance'];
932
+//            $team_count_total += $t_teams_pv['team_count'];
933
+//
934
+//
935
+//        }
936
 
936
 
937
-        return $team_count_total;
937
+        return Db::name('user')->where(['spread_uid'=>$teamid])->count();
938
 
938
 
939
     }
939
     }
940
 
940
 

+ 1 - 1
app/controller/api/user/User.php

@@ -1590,7 +1590,7 @@ class User extends BaseController
1590
             foreach($child_nums_Tree[0]['children'] as $k=>$v){
1590
             foreach($child_nums_Tree[0]['children'] as $k=>$v){
1591
                 $child_nums = $this->getdepartmentStatistics($v['uid']);
1591
                 $child_nums = $this->getdepartmentStatistics($v['uid']);
1592
                 $uid_list = array_column($child_nums, 'uid');
1592
                 $uid_list = array_column($child_nums, 'uid');
1593
-                $new_performance_child = Db::name("user_pv_log")->where([['uid','in',$uid_list],['settlement_time','>',$end_time]])->sum('pv');
1593
+                $new_performance_child = Db::name("user_pv_log")->where([['uid','in',array_push($uid_list,$v['uid'])],['settlement_time','>',$end_time]])->sum('pv');
1594
                 if($k == $maxBalanceIndex){
1594
                 if($k == $maxBalanceIndex){
1595
                     $person_list[] = [
1595
                     $person_list[] = [
1596
                         "uid" => $v["uid"],
1596
                         "uid" => $v["uid"],