diff --git a/application/PreorderProduct/PreorderProduct.php b/application/PreorderProduct/PreorderProduct.php index c9330be1e..67b547faf 100644 --- a/application/PreorderProduct/PreorderProduct.php +++ b/application/PreorderProduct/PreorderProduct.php @@ -129,7 +129,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => $campaign_id, "preorderproduct_id" => $this->id, "start_date<=" => $date, - "end_date>" => $date, + "end_date>=" => $date, ], "start_date DESC, end_date ASC, `create` DESC"); if(!$price) { @@ -229,7 +229,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => null, "preorderproduct_id" => $this->id, "start_date<=" => date($this->today_date), - "end_date>" => date($this->today_date), + "end_date>=" => date($this->today_date), ], "start_date DESC, end_date ASC, `create` DESC"); if(!$price) { $price = PreorderProductPrice::getFirst([ @@ -324,7 +324,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => $this->filter_campaign_id, "preorderproduct_id" => $this->id, "start_date>=" => null, - "end_date>" => null, + "end_date>=" => null, ], "`create` ASC"); if(!$price) { $price = PreorderProductPrice::getFirst([ @@ -332,8 +332,8 @@ class PreorderProduct extends mfBaseModel { "netoperator_id" => $this->filter_netoperator_id, "campaign_id" => null, "preorderproduct_id" => $this->id, - "start_date>=" => null, - "end_date>" => null, + "start_date" => null, + "end_date" => null, ], "`create` ASC"); } if(!$price) { @@ -342,8 +342,8 @@ class PreorderProduct extends mfBaseModel { "netoperator_id" => null, "campaign_id" => null, "preorderproduct_id" => $this->id, - "start_date>=" => null, - "end_date>" => null, + "start_date" => null, + "end_date" => null, ], "`create` ASC"); } if($price) { @@ -363,7 +363,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => $this->filter_campaign_id, "preorderproduct_id" => $this->id, "start_date<=" => date($this->today_date), - "end_date>" => null, + "end_date" => null, ], "`create` ASC"); if($price) { @@ -385,7 +385,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => $this->filter_campaign_id, "preorderproduct_id" => $this->id, "start_date<=" => date($this->today_date), - "end_date>" => date($this->today_date), + "end_date>=" => date($this->today_date), ], "start_date DESC, end_date ASC, `create` DESC"); if(!$price) { @@ -417,7 +417,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => null, "preorderproduct_id" => $this->id, "start_date<=" => date($this->today_date), - "end_date>" => date($this->today_date), + "end_date>=" => date($this->today_date), ], "start_date DESC, end_date ASC, `create` DESC"); }