|
|
@ -157,8 +157,9 @@ class Goods extends GoodsModel |
|
|
|
$end_time = date('Y-m-d'); |
|
|
|
$end_time = date('Y-m-d'); |
|
|
|
$start_time = date('Y-m-d', strtotime($end_time . ' - 15 days')); |
|
|
|
$start_time = date('Y-m-d', strtotime($end_time . ' - 15 days')); |
|
|
|
$list = $model->with(['sku', 'goods', 'images.file']) |
|
|
|
$list = $model->with(['sku', 'goods', 'images.file']) |
|
|
|
->where('ctime', '>=', $start_time) |
|
|
|
->whereBetween('ctime', [$start_time, $end_time]) |
|
|
|
->where('ctime', '<=', $end_time) |
|
|
|
// ->where('ctime', '>=', $start_time) |
|
|
|
|
|
|
|
// ->where('ctime', '<=', $end_time) |
|
|
|
->order('ctime', 'desc') |
|
|
|
->order('ctime', 'desc') |
|
|
|
->where(['user_id' => $userId]) |
|
|
|
->where(['user_id' => $userId]) |
|
|
|
->select(); |
|
|
|
->select(); |
|
|
|