/*
package cn.sikey.hmd.service.tuling;

import cn.hutool.json.JSONUtil;
import cn.sikey.framework.common.exception.ServiceException;
import cn.sikey.hmd.api.hmd.tuling.ApiResponse;
import cn.sikey.hmd.api.hmd.tuling.DataRequest;
import cn.sikey.hmd.api.hmd.tuling.QueryUpgradeRequest;
import cn.sikey.hmd.api.hmd.tuling.QueryUpgradeResponse;
import cn.sikey.hmd.config.HttpUtil;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpStatus;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

*/
/**
 * @Author: qin
 * @Date: 2025/4/21
 * @Description: 调用图灵API
 *//*

@Slf4j
@Service
public class TuLingServiceImpl implements TuLingService {

    @Value("${tuling.url}")
    private String url;

    @Value("${tuling.upgradeDevicePath}")
    private String upgradeDevicePath;

    @Value("${tuling.getDeviceMenuPath}")
    private String getDeviceMenuPath;

    */
/*@Value("${tuling.apiKey}")
    private String apiKey;*//*


    */
/*@Value("${tuling.secret}")
    private String secret;*//*


    @Resource
    private HttpUtil httpUtil;

    */
/**
     * 升级
     *
     * @param deviceId 设备编号
     * @param level    级别
     * @param apiKey   apiKey
     * @param secret   secret
     *                 <p>
     *                 固定值1,2,3 分别对应的是下面这三个套餐
     *                 （1） 基础包：每天调用次数 ≤ 5次
     *                 （2）年包： 每天调用次数 > 5次（无限制次数） 启用日期起，365天内有效
     *                 （3）终身包：每天调用次数 > 5次（无限制次数） 启用日期起，8年使用周期
     * @return
     *//*

    @Override
    public ApiResponse<QueryUpgradeResponse> upgradeDevice(String deviceId, Integer level, String apiKey, String secret) {
        try {
            // 构造请求数据
            DataRequest dataRequest = new DataRequest();
            dataRequest.setDeviceId(deviceId);
            dataRequest.setLevel(level);

            QueryUpgradeRequest request = setRequest(dataRequest, secret, apiKey);
            // 发送请求
            return httpUtil.postRequest(url + upgradeDevicePath, JSONUtil.toJsonStr(request));
        } catch (Exception e) {
            log.error("[调用图灵API]升级，异常：{0}", e);
            throw new ServiceException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "请求处理失败");
        }
    }

    */
/**
     * 获取设备菜单
     *
     * @param deviceId 设备编号
     * @param apiKey   apiKey
     * @param secret   secret
     * @return
     *//*

    @Override
    public ApiResponse<QueryUpgradeResponse> getDeviceMenu(String deviceId, String apiKey, String secret) {
        try {
            // 构造请求数据
            DataRequest dataRequest = new DataRequest();
            dataRequest.setDeviceId(deviceId);

            QueryUpgradeRequest request = setRequest(dataRequest, secret, apiKey);
            // 发送请求
            return httpUtil.postRequest(url + getDeviceMenuPath, JSONUtil.toJsonStr(request));
        } catch (Exception e) {
            log.error("[调用图灵API]获取设备菜单，异常：{0}", e);
            throw new ServiceException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "请求处理失败");
        }
    }

}
*/
