作者 lyh

gx

... ... @@ -62,6 +62,9 @@ class BlogController extends BaseController
}
});
}
if(isset($this->map['status']) && !empty($this->map['status'])){
$query = $query->where('status',$this->map['status']);
}
if(!empty($this->map['start_at']) && !empty($this->map['end_at'])){
$query->whereBetween('created_at', [$this->map['start_at'],$this->map['end_at']]);
}
... ...
... ... @@ -62,6 +62,9 @@ class NewsController extends BaseController
}
});
}
if(isset($this->map['status']) && !empty($this->map['status'])){
$query = $query->where('status',$this->map['status']);
}
if(!empty($this->map['start_at']) && !empty($this->map['end_at'])){
$query->whereBetween('created_at', [$this->map['start_at'],$this->map['end_at']]);
}
... ...
... ... @@ -87,6 +87,9 @@ class ProductController extends BaseController
if(isset($this->map['title']) && !empty($this->map['title'])){
$query = $query->where('title','like','%'.$this->map['title'].'%');
}
if(isset($this->map['status']) && !empty($this->map['status'])){
$query = $query->where('status',$this->map['status']);
}
if(!empty($this->map['start_at']) && !empty($this->map['end_at'])){
$query->whereBetween('created_at', [$this->map['start_at'],$this->map['end_at']]);
}
... ...