package com.simuwang.daq.service;

import cn.hutool.core.collection.ListUtil;
import com.simuwang.base.common.conts.EmailTypeConst;
import com.simuwang.base.pojo.dto.EmailContentInfoDTO;
import com.simuwang.base.pojo.dto.EmailFundNavDTO;
import com.simuwang.daq.components.report.parser.pdf.AbstractPDReportParser;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author wangzaijun
 * @date 2024/9/25 14:52
 * @description 报告的解析逻辑
 * @see com.simuwang.daq.components.report.parser.ReportParser,com.simuwang.daq.components.report.parser.py.AbstractPyReportParser, AbstractPDReportParser
 */
@Component
public class ReportEmailParser extends AbstractEmailParser {

    @Override
    public boolean isSupport(Integer emailType) {
        return EmailTypeConst.REPORT_EMAIL_TYPE.equals(emailType);
    }

    @Override
    public List<EmailFundNavDTO> parse(EmailContentInfoDTO emailContentInfoDTO, Map<String, List<String>> emailFieldMap) {
        // 目前啥也不做，但是要返回空集合并且支持报告解析
        return ListUtil.empty();
    }
}
