hrjy 3 tahun lalu
induk
melakukan
2181394f40
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      app/api/controller/user/UserController.php

+ 2 - 2
app/api/controller/user/UserController.php

@@ -633,8 +633,8 @@ class UserController
         foreach ($user as $item){
         foreach ($user as $item){
             $uids = get_downline(User::select(), $item['uid']);// 总团队
             $uids = get_downline(User::select(), $item['uid']);// 总团队
             $uids1 = get_downlines(User::select(), $item['uid']);// 总团队
             $uids1 = get_downlines(User::select(), $item['uid']);// 总团队
-            $number = StoreOrder::where('paid', 1)->where('uid', 'in', $uids)->whereBetweenTime('add_time', strtotime('today'), strtotime('tomorrow'))->sum('pay_price');
-            $number1 = StoreOrder::where('paid', 1)->where('uid', 'in', $uids1)->whereBetweenTime('add_time', strtotime('today'), strtotime('tomorrow'))->sum('pay_price');
+            $number = StoreOrder::where('paid', 1)->where('uid', 'in', $uids)->whereBetweenTime('add_time',$start_time,$end_time)->sum('pay_price');
+            $number1 = StoreOrder::where('paid', 1)->where('uid', 'in', $uids1)->whereBetweenTime('add_time',$start_time,$end_time)->sum('pay_price');
             $percent = 0;//佣金比例
             $percent = 0;//佣金比例
             for ($i = 0; $i < count($config); $i++){
             for ($i = 0; $i < count($config); $i++){
                 if ($i < count($config) - 1){
                 if ($i < count($config) - 1){