正在显示
3 个修改的文件
包含
22 行增加
和
1 行删除
| @@ -37,6 +37,8 @@ class Kernel extends ConsoleKernel | @@ -37,6 +37,8 @@ class Kernel extends ConsoleKernel | ||
| 37 | $schedule->command('domain_info')->dailyAt('01:00')->withoutOverlapping(1);// 更新域名|证书结束时间,每天凌晨1点执行一次 | 37 | $schedule->command('domain_info')->dailyAt('01:00')->withoutOverlapping(1);// 更新域名|证书结束时间,每天凌晨1点执行一次 |
| 38 | $schedule->command('last_inquiry')->dailyAt('04:00')->withoutOverlapping(1);// 最近一次询盘信息 | 38 | $schedule->command('last_inquiry')->dailyAt('04:00')->withoutOverlapping(1);// 最近一次询盘信息 |
| 39 | $schedule->command('update_progress')->everyThirtyMinutes()->withoutOverlapping(1);//监控更新 | 39 | $schedule->command('update_progress')->everyThirtyMinutes()->withoutOverlapping(1);//监控更新 |
| 40 | + $schedule->command('website_data')->everyMinute()->withoutOverlapping(1); // 向AICC推送数据 | ||
| 41 | + $schedule->command('project_file_pdf')->everyMinute()->withoutOverlapping(1); // 网站项目数据,生成PDF文件 | ||
| 40 | } | 42 | } |
| 41 | 43 | ||
| 42 | /** | 44 | /** |
| @@ -39,4 +39,23 @@ class AiccWechat extends Model | @@ -39,4 +39,23 @@ class AiccWechat extends Model | ||
| 39 | { | 39 | { |
| 40 | return self::query()->where('project_id', $project_id)->first(); | 40 | return self::query()->where('project_id', $project_id)->first(); |
| 41 | } | 41 | } |
| 42 | + | ||
| 43 | + /** | ||
| 44 | + * @param int $page | ||
| 45 | + * @param int $perPage | ||
| 46 | + * @return array | ||
| 47 | + */ | ||
| 48 | + public function allData(int $page = 1, int $perPage = 15) | ||
| 49 | + { | ||
| 50 | + $status = 1; # 1 - 正常, 0 - 禁用 | ||
| 51 | + $lists = self::query()->where('status', $status) | ||
| 52 | + ->whereNotNull('project_id') | ||
| 53 | + ->whereNotNull('wx_user_id') | ||
| 54 | + ->paginate($perPage, ['project_id', 'wx_id', 'wx_user_id'], 'page', $page); | ||
| 55 | + $items = $lists->Items(); | ||
| 56 | + $totalPage = $lists->lastPage(); | ||
| 57 | + $total = $lists->total(); | ||
| 58 | + $currentPage = $lists->currentPage(); | ||
| 59 | + return compact('total', 'items', 'totalPage', 'currentPage'); | ||
| 60 | + } | ||
| 42 | } | 61 | } |
| @@ -343,7 +343,7 @@ Route::group([], function () { | @@ -343,7 +343,7 @@ Route::group([], function () { | ||
| 343 | Route::any('get_template_detail', [Aside\Template\ATemplateController::class, 'getTemplateDetail'])->name('admin.get_template_detail'); | 343 | Route::any('get_template_detail', [Aside\Template\ATemplateController::class, 'getTemplateDetail'])->name('admin.get_template_detail'); |
| 344 | 344 | ||
| 345 | Route::any('/collect', [Aside\Collect\CollectController::class, 'index'])->name('admin.collect'); | 345 | Route::any('/collect', [Aside\Collect\CollectController::class, 'index'])->name('admin.collect'); |
| 346 | - # AICC与V6.0数据推送 page - 分页 perPage - 分页数量 | 346 | + # AICC与V6.0数据推送 |
| 347 | Route::get('/data_push', [\App\Http\Controllers\Bside\Aicc\AiccWeChatController::class, 'dataPush'])->name('admin.dataPush'); | 347 | Route::get('/data_push', [\App\Http\Controllers\Bside\Aicc\AiccWeChatController::class, 'dataPush'])->name('admin.dataPush'); |
| 348 | }); | 348 | }); |
| 349 | 349 |
-
请 注册 或 登录 后发表评论