This commit is contained in:
邓皓元 2019-03-15 20:46:25 +08:00
parent e9b2c38179
commit e2092e4cce

View File

@ -88,8 +88,8 @@ class AddedOrderSync extends Command
$endtime = $this->datetime->copy()->endOfMonth()->endOfDay();
$orders = DB::table($virtualTable)->selectRaw('sim,MAX(order_id)')
->where('created_at', '>=', $starttime)
->where('created_at', '<=', $endtime)
->where('created_at', '>=', $starttime->format('Y-m-d H:i:s'))
->where('created_at', '<=', $endtime->format('Y-m-d H:i:s'))
->whereIn('sim', array_pluck($data, 'sim'))
->groupBy('sim')->get()->pluck('order_id', 'sim');