<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Models\StrategyTask;

class CreatedTaskCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'command:CreatedTaskCommand';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '每天早上6点创建任务';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        //新建任务、失败原任务重呼3次，接口调用失败重试3次
        $taskInfo = StrategyTask::where('is_created',0)->get()->toArray(); //获取需要新建任务的数据
        //dd($taskInfo);
        foreach ($taskInfo as $k=>$v){//批量调用接口新建任务
            
        }
    }
}
