<?php


namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Redis;

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

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';


    /**
     * @return bool
     * @throws \GuzzleHttp\Exception\GuzzleException
     */
    public function handle()
    {
//        $data = DB::connection('api_mysql')->table('official_accounts')->select('distribution_channel_id', 'nickname', 'name', 'head_img', 'appid', 'appsecret', 'verify_txt', 'alias', 'qrcode_url', 'principal_name', 'service_type_info', 'func_info', 'authorizer_refresh_token', 'is_auth', 'cancel_auth_time', 'official_account_type', 'verify_type_info', 'subscribe_top_num', 'subscribe_day_maximum', 'sort_no', 'is_enabled')->where('appid', 'wxebcb86ec4b80eaca')->first();
//        $data = (array)$data;
//        Log::info('official_accounts_info: '.json_encode($data));
//        Redis::hset('official_account_info:app_id:wxebcb86ec4b80eaca', 'official_account_info', json_encode($data));

//        $books = \App\Modules\Book\Services\BookConfigService::getBookByRole('叶安');
//        dd($books);

    }

}