|
@@ -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,
|