- Рассылка теперь будет (помимо остальных проверок) срабатывать только если...

- Рассылка теперь будет (помимо остальных проверок) срабатывать только если дата отправки сегодня или ранее
parent ea6e84fd
......@@ -126,7 +126,8 @@ class DefaultController extends BaseController
$urls = ArrayHelper::map(CoContent::find()->where(['category_id'=>$category_id])->all(), 'id', 'url');
foreach($users as $user) {
if (Bid::find()->where(['email' => $user->email])->exists() && $user->delivery_date==$date->format('Y-m-d')) {
$deliveryDate = new \DateTime($user->delivery_date);
if (Bid::find()->where(['email' => $user->email])->exists() && $deliveryDate<=$date) {
foreach($urls as $url) {
$watchingtime = TriggerLogs::getSummaryTimeByUrl($url, $user->id);
if ((int)$watchingtime<(int)$neededTime) {
......
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