Commit f143c0cf authored by jianghaiming's avatar jianghaiming

update:Set

parent a724aa39
...@@ -28,6 +28,26 @@ class MarketingService ...@@ -28,6 +28,26 @@ class MarketingService
$goodsSkuId = !empty($params['goods_sku_id']) ? $params['goods_sku_id'] : ''; $goodsSkuId = !empty($params['goods_sku_id']) ? $params['goods_sku_id'] : '';
$lifeAccountId = !empty($params['life_account_id']) ? $params['life_account_id'] : ''; $lifeAccountId = !empty($params['life_account_id']) ? $params['life_account_id'] : '';
if (empty($startTime)) {
throw new MarketingException(['cus'=>8]);
}
if (empty($endTime)) {
throw new MarketingException(['cus'=>9]);
}
// if ($startTime <= date("Y-m-d")) {
// throw new MarketingException(['cus'=>10]);
// }
if ($endTime <= date("Y-m-d")) {
throw new MarketingException(['cus'=>11]);
}
if ($startTime >= $endTime) {
throw new MarketingException(['cus'=>14]);
}
$goodsData = [ $goodsData = [
"OR" => [ "OR" => [
"start_time[>=]" => $startTime, "start_time[>=]" => $startTime,
...@@ -50,6 +70,7 @@ class MarketingService ...@@ -50,6 +70,7 @@ class MarketingService
$where = [ $where = [
'online_status' => 1, 'online_status' => 1,
'rule_refund' => 2,
]; ];
if (!empty($tmpGoodsSkuId)) { if (!empty($tmpGoodsSkuId)) {
...@@ -188,9 +209,9 @@ class MarketingService ...@@ -188,9 +209,9 @@ class MarketingService
throw new MarketingException(['cus'=>9]); throw new MarketingException(['cus'=>9]);
} }
if ($startTime <= date("Y-m-d")) { // if ($startTime <= date("Y-m-d")) {
throw new MarketingException(['cus'=>10]); // throw new MarketingException(['cus'=>10]);
} // }
if ($endTime <= date("Y-m-d")) { if ($endTime <= date("Y-m-d")) {
throw new MarketingException(['cus'=>11]); throw new MarketingException(['cus'=>11]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment