|
|
@@ -913,28 +913,28 @@ class Auth extends BaseController
|
|
913
|
913
|
|
|
914
|
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
|
|