Commit 29b3c4a4 authored by Shakarim Sapa's avatar Shakarim Sapa

- Внесены небольшие корректировки и комментарии

parent 1cadc4fb
......@@ -134,7 +134,7 @@ class DefaultController extends BaseController
shuffle($cases);
// Перебираем в цикле пользователей
foreach($users as $user) {
// Если пользователь подписан и дата соответствует требованиям
// Если пользователь подписан
if (Bid::find()->where(['email' => $user->email])->exists()) {
// Перебираем все case-ы
foreach($cases as $case) {
......@@ -186,7 +186,7 @@ class DefaultController extends BaseController
// Получили кейс
/** @var CoContent $case */
$case = $record->getCase();
// Если кейс есть
// Если кейс есть и у него есть шаблон
if (!is_null($case) && !is_null($case->template_id)) {
// Заносим урл в переменную
$url = $case->url;
......@@ -213,6 +213,7 @@ class DefaultController extends BaseController
$model = CasesSchedule::findOne($record->id);
$model->sended_date = $date->format('Y-m-d H:i:s');
$model->sended = 1;
$model->save();
}
}
}
......
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