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.
yanzong/app/command/SyncGoodsToEs.php

28 lines
531 B

6 months ago
<?php
namespace app\command;
6 months ago
use app\common\service\GoodsEs;
6 months ago
use think\console\Command;
6 months ago
use think\console\Output;
use think\console\Input;
6 months ago
class SyncGoodsToEs extends Command
{
protected function configure()
{
// 指令配置
$this->setName('syncGoodsToEs')
->setDescription('同步商品数据到ES');
}
protected function execute(Input $input, Output $output)
{
6 months ago
$goodsService = new GoodsEs();
$goods = $goodsService->list();
6 months ago
var_dump($goods);
6 months ago
}
}