package com.persagy.adm.server.algorithm.service.impl;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ZipUtil;
import com.alibaba.fastjson.JSONObject;
import com.persagy.adm.server.algorithm.constant.AdmModelFileStatusEnum;
import com.persagy.adm.server.algorithm.entity.AdmModelFile;
import com.persagy.adm.server.algorithm.service.AdmModelBackService;
import com.persagy.adm.server.algorithm.service.AdmModelFileService;
import com.persagy.adm.server.backstage.service.impl.AdmAnalysisFacade;
import com.persagy.dmp.file.utils.FileStorageHelper;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.zip.GZIPInputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

/**
 * 模型解析后台逻辑处理接口
 * @author : lijie
 * Update By 2022/1/17 10:34
 */
@Service
@RequiredArgsConstructor
@Slf4j
public class AdmModelBackServiceImpl implements AdmModelBackService {

    private final AdmModelFileService admModelFileService;

    /**
     * 后台解析模型文件
     * return : void
     * @author : lijie
     * Update By 2022/1/17 10:35
     */
    @Override
    public void analysisModelBack() {


        // 1.查询状态为3的文件
        List<AdmModelFile> admModelFiles = admModelFileService
                .listByStatus(AdmModelFileStatusEnum.SYNC_DATA_COMPLETED.getValue());
        if (CollUtil.isEmpty(admModelFiles)){
            return;
        }


    }

}
