瀏覽代碼

yunqi stat

zz 6 年之前
父節點
當前提交
7b38df5508
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      app/Console/Commands/BookTest.php

+ 6 - 0
app/Console/Commands/BookTest.php

@@ -328,11 +328,13 @@ class BookTest extends Command
             $bid_price = Order::where('uid',$item->uid)
                 ->where('status','PAID')
                 ->where('created_at','>=',$item->updated_at)
+                ->where('created_at','<=',date('Y-m-d H:i:s',strtotime($item->updated_at)+86400))
                 ->where('from_bid',$item->bid)
                 ->sum('price');
             $all_price = Order::where('uid',$item->uid)
                 ->where('status','PAID')
                 ->where('created_at','>=',$item->updated_at)
+                ->where('created_at','<=',date('Y-m-d H:i:s',strtotime($item->updated_at)+86400))
                 ->sum('price');
             $chapter_model = new ChapterOrder();
             $chapter_model->setCurrentTable($item->uid);
@@ -367,11 +369,13 @@ class BookTest extends Command
             $all_price = Order::where('uid',$item->uid)
                 ->where('status','PAID')
                 ->where('created_at','>=',$item->updated_at)
+                ->where('created_at','<=',date('Y-m-d H:i:s',strtotime($item->updated_at)+86400))
                 ->sum('price');
             $chapter_model = new ChapterOrder();
             $chapter_model->setCurrentTable($item->uid);
             $all = $chapter_model->where('uid', $item->uid)
                 ->where('created_at','>=',$item->updated_at)
+                ->where('created_at','<=',date('Y-m-d H:i:s',strtotime($item->updated_at)+86400))
                 ->groupBy('bid')
                 ->select(DB::raw('sum(fee) as fee'),'bid','book_name')
                 ->orderBy('fee','desc')
@@ -387,11 +391,13 @@ class BookTest extends Command
             $bid_price = Order::where('uid',$item->uid)
                 ->where('status','PAID')
                 ->where('created_at','>=',$item->updated_at)
+                ->where('created_at','<=',date('Y-m-d H:i:s',strtotime($item->updated_at)+86400))
                 ->where('from_bid',$bid)
                 ->sum('price');
             $chapter_fee = $chapter_model->where('uid', $item->uid)
                 ->where('bid', $bid)
                 ->where('created_at','>=',$item->updated_at)
+                ->where('created_at','<=',date('Y-m-d H:i:s',strtotime($item->updated_at)+86400))
                 ->sum('fee');
             $result[] = [
                 'uid'=>$item->uid,