catchAdmin/catch/wechat/command/SyncUsersCommand.php

49 lines
1.1 KiB
PHP
Raw Normal View History

2020-06-20 08:49:16 +08:00
<?php
2020-06-21 10:48:11 +08:00
/**
* @filename GetModuleTrait.php
* @createdAt 2020/2/24
* @project https://github.com/yanwenwu/catch-admin
* @document http://doc.catchadmin.com
* @author JaguarJack <njphper@gmail.com>
* @copyright By CatchAdmin
* @license https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt
*/
namespace catchAdmin\wechat\command;
2020-07-19 16:55:38 +08:00
use catchAdmin\wechat\library\SyncWechatUsers;
2020-06-21 10:48:11 +08:00
use catchAdmin\wechat\model\WechatUsers;
2020-06-21 18:04:30 +08:00
use catcher\exceptions\FailedException;
2020-06-21 10:48:11 +08:00
use catcher\facade\Trie;
use catcher\library\ProgressBar;
use catcher\library\WeChat;
2020-06-21 18:04:30 +08:00
use catcher\Utils;
2020-06-21 10:48:11 +08:00
use think\Collection;
use think\console\Command;
use think\console\Input;
use think\console\Output;
2020-06-21 18:04:30 +08:00
use think\Db;
2020-06-21 10:48:11 +08:00
class SyncUsersCommand extends Command
{
protected $officialAccount;
public function configure()
{
$this->setName('sync:users')
->setDescription('sync wechat users');
}
/**
*
2020-07-19 16:55:38 +08:00
* @time 2020年07月19日
* @param Input $input
* @param Output $output
* @return int|void|null
2020-06-21 10:48:11 +08:00
*/
2020-07-19 16:55:38 +08:00
public function execute(Input $input, Output $output)
2020-06-21 10:48:11 +08:00
{
2020-07-19 16:55:38 +08:00
(new SyncWechatUsers())->start();
2020-06-21 10:48:11 +08:00
}
}