2022-07-23 17:07:13 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
|
2024-07-25 17:54:14 +08:00
|
|
|
use App\Console\Commands\CheckPrice;
|
2024-07-27 16:51:00 +08:00
|
|
|
use App\Console\Commands\CheckSkuQualityPeriod;
|
2024-03-15 16:58:25 +08:00
|
|
|
use App\Console\Commands\DailySalesReport;
|
2024-02-04 17:20:06 +08:00
|
|
|
use App\Console\Commands\GoodsSkuDailyReport;
|
2022-08-10 16:39:25 +08:00
|
|
|
use App\Console\Commands\Inventory;
|
2024-08-05 16:54:19 +08:00
|
|
|
use App\Console\Commands\KttOrderAfterSaleQuery;
|
2024-11-25 13:51:50 +08:00
|
|
|
use App\Console\Commands\KttOrderSyncStatus;
|
2022-07-23 17:07:13 +08:00
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
2022-08-30 15:49:15 +08:00
|
|
|
use App\Console\Commands\KttOrderQuery;
|
2022-08-30 23:36:26 +08:00
|
|
|
use App\Console\Commands\DeleteKttQuery;
|
2022-07-23 17:07:13 +08:00
|
|
|
|
|
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The Artisan commands provided by your application.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $commands = [
|
|
|
|
|
//
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the application's command schedule.
|
|
|
|
|
*
|
2022-08-30 23:36:26 +08:00
|
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
2022-07-23 17:07:13 +08:00
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function schedule(Schedule $schedule)
|
|
|
|
|
{
|
2022-10-21 13:09:30 +08:00
|
|
|
// 服务器/etc/crontab添加cron入口
|
2023-06-01 20:09:59 +08:00
|
|
|
// * * * * * cd /home/wwwroot/erp.chutang66.com && php artisan schedule:run >> /dev/null 2>&1
|
2024-03-15 16:58:25 +08:00
|
|
|
$schedule->command(KttOrderQuery::class)->everyMinute();
|
|
|
|
|
|
2024-02-04 17:20:06 +08:00
|
|
|
$schedule->command(GoodsSkuDailyReport::class)->dailyAt('06:00');
|
2022-08-10 16:39:25 +08:00
|
|
|
$schedule->command(Inventory::class)->dailyAt('07:00');
|
2024-03-15 16:58:25 +08:00
|
|
|
|
|
|
|
|
$schedule->command(DailySalesReport::class, ['S1'])->dailyAt('12:00');
|
|
|
|
|
$schedule->command(DailySalesReport::class, ['S2'])->dailyAt('13:30');
|
|
|
|
|
$schedule->command(DailySalesReport::class, ['S3'])->dailyAt('15:00');
|
|
|
|
|
$schedule->command(DailySalesReport::class, ['S4'])->dailyAt('16:00');
|
|
|
|
|
$schedule->command(DailySalesReport::class, ['S5'])->dailyAt('17:30');
|
|
|
|
|
$schedule->command(DailySalesReport::class, ['S6'])->dailyAt('20:00');
|
|
|
|
|
$schedule->command(DailySalesReport::class, ['S7'])->dailyAt('09:30');
|
|
|
|
|
|
2022-08-30 23:36:26 +08:00
|
|
|
$schedule->command(DeleteKttQuery::class)->daily();
|
2024-07-25 17:54:14 +08:00
|
|
|
//新增价格校验
|
2024-07-27 16:51:00 +08:00
|
|
|
$schedule->command(CheckPrice::class)->everyFifteenMinutes();
|
2024-08-05 16:54:19 +08:00
|
|
|
//保质期
|
|
|
|
|
$schedule->command(CheckSkuQualityPeriod::class)->dailyAt('05:30');
|
|
|
|
|
//快团团售后单拉取
|
|
|
|
|
$schedule->command(KttOrderAfterSaleQuery::class)->everyFifteenMinutes();
|
2024-11-01 15:42:23 +08:00
|
|
|
//同步售卖信息和报损相关数据
|
|
|
|
|
$schedule->command(GoodsSkuDailyReport::class)->dailyAt('03:30');
|
2024-07-27 16:51:00 +08:00
|
|
|
|
2024-11-25 13:51:50 +08:00
|
|
|
//新增价格校验
|
|
|
|
|
$schedule->command(KttOrderSyncStatus::class)->everyTenMinutes();
|
|
|
|
|
|
2022-07-23 17:07:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register the commands for the application.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function commands()
|
|
|
|
|
{
|
2022-08-30 23:36:26 +08:00
|
|
|
$this->load(__DIR__ . '/Commands');
|
2022-07-23 17:07:13 +08:00
|
|
|
|
|
|
|
|
require base_path('routes/console.php');
|
|
|
|
|
}
|
|
|
|
|
}
|