You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
515 B
25 lines
515 B
<?php
|
|
|
|
namespace App\Crontab;
|
|
|
|
use App\Service\v3\Interfaces\OrderOnlineServiceInterface;
|
|
use Hyperf\Crontab\Annotation\Crontab;
|
|
use Hyperf\Di\Annotation\Inject;
|
|
|
|
/**
|
|
* @Crontab(name="autocancelorder", rule="*\/5 * * * * *", callback="execute", memo="自定取消15分钟过期订单")
|
|
*/
|
|
class AutoCancelOrder
|
|
{
|
|
/**
|
|
* @Inject
|
|
* @var OrderOnlineServiceInterface
|
|
*/
|
|
protected $orderOnlineService;
|
|
|
|
public function execute()
|
|
{
|
|
$this->orderOnlineService->autoCancel();
|
|
}
|
|
|
|
}
|