callback = $callback; } /** * 格式化日期 * @param int $value * @param string $format * @return Carbon|false|string */ public static function transformDateTime(int $value, string $format = 'Y-m-d H:i:s') { if (!$value) { return ''; } $value--; return date($format, strtotime("1900-01-00 00:00:00 +$value day")); } /** * @param Collection $collection */ public function collection(Collection $collection) { if ($this->readRows == 0) { //unset($collection[0]); $this->readRows += count($collection); } $this->callback->call($this, $collection); } /** * @return int */ public function chunkSize(): int { return 2000; } }