private void getQrImage(String uuid, boolean terminalShow) {
    """
	读取二维码图片
	
	@param uuid         二维码uuid
	@param terminalShow 是否在终端显示输出
    """
        String uid    = null != uuid ? uuid : this.uuid;
        String imgDir = bot.config().assetsDir();

        FileResponse fileResponse = this.client.download(
                new FileRequest(String.format("%s/qrcode/%s", Constant.BASE_URL, uid)));

        InputStream inputStream = fileResponse.getInputStream();
        File        qrCode      = WeChatUtils.saveFile(inputStream, imgDir, "qrcode.png");
        DateUtils.sleep(200);
        try {
            QRCodeUtils.showQrCode(qrCode, terminalShow);
        } catch (Exception e) {
            this.getQrImage(uid, terminalShow);
        }
    }
private void getQrImage(String uuid, boolean terminalShow) {
        String uid    = null != uuid ? uuid : this.uuid;
        String imgDir = bot.config().assetsDir();

        FileResponse fileResponse = this.client.download(
                new FileRequest(String.format("%s/qrcode/%s", Constant.BASE_URL, uid)));

        InputStream inputStream = fileResponse.getInputStream();
        File        qrCode      = WeChatUtils.saveFile(inputStream, imgDir, "qrcode.png");
        DateUtils.sleep(200);
        try {
            QRCodeUtils.showQrCode(qrCode, terminalShow);
        } catch (Exception e) {
            this.getQrImage(uid, terminalShow);
        }
    }
private void getQrImage ( String uuid , boolean terminalShow ) { String uid = null != uuid ? uuid : this . uuid ; String imgDir = bot . config ( ) . assetsDir ( ) ; FileResponse fileResponse = this . client . download ( new FileRequest ( String . format ( "%s/qrcode/%s" , Constant . BASE_URL , uid ) ) ) ; InputStream inputStream = fileResponse . getInputStream ( ) ; File qrCode = WeChatUtils . saveFile ( inputStream , imgDir , "qrcode.png" ) ; DateUtils . sleep ( 200 ) ; try { QRCodeUtils . showQrCode ( qrCode , terminalShow ) ; } catch ( Exception e ) { this . getQrImage ( uid , terminalShow ) ; } }
读取二维码图片

@param uuid         二维码uuid
@param terminalShow 是否在终端显示输出
读取二维码图片