hrjy 3 anos atrás
pai
commit
2181394f40
1 arquivos alterados com 2 adições e 2 exclusões
  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){
             $uids = get_downline(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;//佣金比例
             for ($i = 0; $i < count($config); $i++){
                 if ($i < count($config) - 1){