package com.fs.app.controller;

import com.alibaba.fastjson.JSON;
import com.fs.common.annotation.Excel;
import com.fs.fastGpt.domain.FastGptChatSession;
import com.fs.fastgptApi.util.AiImgUtil;
import com.fs.qw.domain.QwExternalContact;
import com.fs.qw.domain.QwExternalContactInfo;
import com.fs.wxwork.dto.WxwSilkVoceDTO;
import com.fs.wxwork.utils.WxWorkHttpUtil;

import javax.validation.constraints.Null;
import java.lang.reflect.Field;
import java.util.Date;
import java.util.HashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class test {
    public static void main(String[] args) {

        AiImgUtil aiImgUtil = new AiImgUtil();
        String imageParse = aiImgUtil.getImageParse("https://cos.his.cdwjyyh.com/fs/20250606/098d6e12acf747548372ad61bdade4e3.jpg");
        System.out.println(imageParse);
    }

    private static String imgEmoticon(String imageParse) {
        Pattern img = Pattern.compile("【表情包：(.*?)】", Pattern.DOTALL);
        Matcher imgMatcher = img.matcher(imageParse);
        while  (imgMatcher.find()) {
            String imgTag = imgMatcher.group(1).trim();
            if(imgTag!=null&&!imgTag.equals("")){
                return imgTag;
            }

        }
        return null;
    }


    void voice(){
        String  url="http://162.14.193.126:8009/app/common/voice?voice="+"你好"+"&id="+2020;
        String json = WxWorkHttpUtil.get(url);
        System.out.println(json);
        WxwSilkVoceDTO wxwSilkVoceDTO = JSON.parseObject(json, WxwSilkVoceDTO.class);
    }


    void img(){
        AiImgUtil aiImgUtil = new AiImgUtil();
        String imageParse = aiImgUtil.getImageParse("https://cos.his.cdwjyyh.com/fs/20250604/e8458ed36e534135b50e7459e67b19af.jpg");
        System.out.println(imageParse);
    }

}
