package com.fs.aiTongueApi;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.fs.aiTongueApi.config.AiTongueConfig;
import com.fs.aiTongueApi.domain.AITongueResult;
import com.fs.aiTongueApi.domain.QueryAiTongue;
import com.fs.aiTongueApi.domain.QueryQuanXi;
import com.fs.aiTongueApi.domain.inner.ConfidenceData;
import com.fs.aiTongueApi.domain.inner.TongueData;
import com.fs.aiTongueApi.service.AiTongueService;
import com.fs.aiTongueApi.service.impl.AiTongueServiceImpl;
import com.fs.company.domain.CompanyConfig;
import com.fs.qwApi.domain.QWCompanyConfig;
import com.fs.tzBankPay.doman.RefundResult;
import com.fs.tzBankPay.doman.TzBankResult;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.qcloud.cos.endpoint.SuffixEndpointBuilder;
import org.apache.hc.core5.net.URIBuilder;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

import java.io.File;
import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import java.nio.charset.StandardCharsets;

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

    }

    //判断是否存在舌苔
    public static void checkTongue(){
        AiTongueService aiTongueService = new AiTongueServiceImpl();
        AITongueResult<ConfidenceData> result = aiTongueService.checkTongue("https://cos.his.cdwjyyh.com/fs/20240912/df70009f87c54ef28faed21577d06f98.jpg");
        System.out.println(result);
    }
    //全息舌苔
    public static void AiTongue(){
        AiTongueService aiTongueService = new AiTongueServiceImpl();
        QueryQuanXi queryQuanXi = new QueryQuanXi();
        queryQuanXi.setAge("24");//必填
        queryQuanXi.setMale("1");//必填
        queryQuanXi.setIsYuejin("0");
        queryQuanXi.setName("装三");
        queryQuanXi.setFile("https://cos.his.cdwjyyh.com/fs/20240912/df70009f87c54ef28faed21577d06f98.jpg");
        AITongueResult<TongueData> tongueDataAITongueResult = aiTongueService.quanXiTongue(queryQuanXi);
        System.out.println(tongueDataAITongueResult);
    }
    //获取舌苔记录
    public static void getHistoryTongue(){
        AiTongueService aiTongueService = new AiTongueServiceImpl();
        QueryAiTongue queryAiTongue = new QueryAiTongue();
        queryAiTongue.setId(192960);
        queryAiTongue.setName("阿德撒旦");
        AITongueResult<TongueData> historyTongue = aiTongueService.getHistoryTongue(queryAiTongue);
        System.out.println(historyTongue);
    }

}
