use Yii;
use yii\base\StaticInstanceInterface;
+use yii\helpers\BaseConsole;
/**
* This is the model class for table "users".
->select('phone')
->column();
+ if (!empty($excludeSalesPhone)) {
+ $updatedCount = SentKogort::updateAll(
+ ['purchase' => 1], // Устанавливаем покупка
+ [
+ 'target_date' => $targetDate,
+ 'kogort_number' => SentKogort::KOGORT_NUMBERS['target'],
+ 'phone' => $excludeSalesPhone,
+ ]
+ );
+ }
+
$whatsappPhones = array_diff(array_diff($targetPhones, $excludeRegistered), $excludeSalesPhone);
$secondTarget = array_diff($excludeRegistered, $excludeSalesPhone);
->select('phone')
->column();
+ if (!empty($excludeSalesPhone)) {
+ $updatedCount = SentKogort::updateAll(
+ ['purchase' => 1], // Устанавливаем покупка
+ [
+ 'target_date' => $targetDate,
+ 'kogort_number' => SentKogort::KOGORT_NUMBERS['target'],
+ 'phone' => $excludeSalesPhone,
+ ]
+ );
+ }
return array_diff($whatsappPhones, $excludeSalesPhone);
}