123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace App\Console\DyReport;
- use App\Cache\StatisticCache;
- use Illuminate\Console\Command;
- use Illuminate\Support\Facades\DB;
- class ResetSendOrderReportDataCommand extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'DyReport:ResetSendOrderReportData';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = '每日0点重置所有派单链接的回传记录数';
- /**
- * Create a new command instance.
- *
- * @return void
- */
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * Execute the console command.
- *
- * @return mixed
- */
- public function handle()
- {
- dLog('command_logs')->info('~~~~~~~~~~~~~~~~~~~~~~~~~~开始重置所有派单链接的回传记录数~~~~~~~~~~~~~~~~~~~~~~~~~~');
- $executeStart = microtime(true);
- $result = DB::table('send_orders')->update([
- 'report_receive_num' => 0,
- 'report_post_num' => 0
- ]);
- dLog('command_logs')->info('执行结果: ', ['result'=>$result]);
- $executeEnd = microtime(true);
- dLog('command_logs')->info('脚本运行时间: ', ['execute_time'=>round(($executeEnd - $executeStart), 6).'s']);
- dLog('command_logs')->info('~~~~~~~~~~~~~~~~~~~~~~~~~~结束重置所有派单链接的回传记录数~~~~~~~~~~~~~~~~~~~~~~~~~~');
- }
- }
|