zz 6 gadi atpakaļ
vecāks
revīzija
24e2dcdfd4
1 mainītis faili ar 1 papildinājumiem un 2 dzēšanām
  1. 1 2
      app/Console/Commands/BookTest.php

+ 1 - 2
app/Console/Commands/BookTest.php

@@ -334,7 +334,7 @@ class BookTest extends Command
         $result = [];
         $chapter_model = new ChapterOrder();
         foreach ($info as $item){
-            $to_bids = YqUserBidRelation::where('uid',$item->uid)->select('to_bid','created_at')->get();
+            $to_bids = YqUserBidRelation::where('uid',$item->uid)->where('to_bid','>',0)->select('to_bid','created_at')->get();
             $from_bids = YqUserBidRelation::where('uid',$item->uid)->where('from_bid','>',0)->select('from_bid','created_at')->get();
             $chapter_model->setCurrentTable($item->uid);
             if($to_bids){
@@ -373,7 +373,6 @@ class BookTest extends Command
                 foreach ($from_bids as $from_bid){
                     $bid = $from_bid->from_bid;
                     $time = $from_bid->created_at->format('Y-m-d H:i:s');
-                    if(!$to_bid) continue;
                     $fee = $chapter_model->where('uid',$item->uid)
                         ->where('bid',$bid)
                         ->where('created_at','>=',$time)