toDateString(); // 缓存键名 $cacheKey = 'api_alone_date_' . $currentDate; // 检查缓存中是否存在该键 if (Cache::has($cacheKey)) { return jerr("该接口今天已经执行过,请1小时后再试!"); } Cache::set($cacheKey, time(), 2400); $SourceCategoryModel = new SourceCategoryModel(); $map[] = ['is_update', '=', 1]; $data = $SourceCategoryModel->where($map)->column('source_category_id'); $ids = implode(',', $data); $quarkPlugin = new QuarkPlugin(); $quarkPlugin->transferAll($ids,2); return jok('已提交任务,稍后查看结果'); } }