LighterQueriesTransition::queryActivityIdsToLightCounters

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. LighterQueriesTransition
  4. queryActivityIdsToLightCounters
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/counter/lighter/lighterqueriestransition.php
  • Класс: Bitrix\Crm\Counter\Lighter\LighterQueriesTransition
  • Вызов: LighterQueriesTransition::queryActivityIdsToLightCounters
public function queryActivityIdsToLightCounters(): array
{
	$fakeLightTime = new DateTime();
	$fakeLightTime->add('PT15M');

	$subQ = ActCounterLightTimeTable::query()
		->setSelect(['ACTIVITY_ID'])
		->where('IS_LIGHT_COUNTER_NOTIFIED', '=', 'N');

	$query = ActivityTable::query()
		->setSelect(['ID'])
		->where('COMPLETED', '=', 'N')
		->where('DEADLINE', '<', $fakeLightTime)
		->whereIn('ID', $subQ)
		->setLimit(100);

	return array_column($query->fetchAll(), 'ID');
}

Добавить комментарий