|
...
|
...
|
@@ -51,13 +51,12 @@ class lyhDemo extends Command |
|
|
|
|
|
|
|
public function handle(){
|
|
|
|
echo 'start.'. PHP_EOL;
|
|
|
|
$ticketLogModel = new TicketLog();
|
|
|
|
$list = $ticketLogModel->list(['end_at'=>['!=',null]],'id',['id','ticket_id','created_at','end_at']);
|
|
|
|
$ticketModel = new Tickets();
|
|
|
|
$list = $ticketModel->list(['id'=>['!=',0]],'id',['id','plan_end_at']);
|
|
|
|
foreach ($list as $item){
|
|
|
|
$plan_end_at = $ticketModel->getValue(['id'=>$item['ticket_id']],'plan_end_at');
|
|
|
|
echo '执行的任务id:'.$item['id'].PHP_EOL;
|
|
|
|
$ticketLogModel->edit(['plan_end_at'=>$plan_end_at],['id'=>$item['id']]);
|
|
|
|
echo '执行数据id:'.$item['id'].PHP_EOL;
|
|
|
|
$ticketLogModel = new TicketLog();
|
|
|
|
$ticketLogModel->edit(['plan_end_at'=>$item['plan_end_at']],['ticket_id'=>$item['id']]);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
...
|
...
|
|