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

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.util.AESUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.stereotype.Service;

*/
/**
 * @Author: qin
 * @Date: 2025/4/21
 * @Description: 升级
 *//*

@Service
public interface TuLingService {
    ApiResponse<QueryUpgradeResponse> upgradeDevice(String deviceId, Integer level,String apiKey, String secret);

    ApiResponse<QueryUpgradeResponse> getDeviceMenu(String deviceId,String apiKey, String secret);

    */
/**
     * 设置请求参数
     *
     * @param dataRequest 数据请求
     * @param secret      秘钥
     * @param apiKey      key
     * @return
     * @throws Exception
     *//*

    default QueryUpgradeRequest setRequest(DataRequest dataRequest, String secret, String apiKey) throws Exception {
        // AES加密
        String encryptedData = AESUtil.encrypt(
                new ObjectMapper().writeValueAsString(dataRequest), secret);

        // 构建请求参数
        QueryUpgradeRequest request = new QueryUpgradeRequest();
        request.setData(encryptedData);
        request.setApiKey(apiKey);
        request.setTimestamp(String.valueOf(System.currentTimeMillis()));

        return request;
    }

}
*/
