package com.njcn.harmonic.common.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.harmonic.pojo.param.ReportSearchParam;
import com.njcn.harmonic.pojo.po.ExcelRptTemp;
import com.njcn.harmonic.common.pojo.vo.ReportTemplateVO;
import com.njcn.influx.pojo.dto.StatisticalDataDTO;
import com.njcn.web.pojo.param.BaseParam;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

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

/**
 * pqs
 *
 * @author cdf
 * @date 2022/8/16
 */
@DS("sjzx")
public interface ExcelRptTempMapper extends BaseMapper<ExcelRptTemp> {

    Page<ReportTemplateVO> getReportTemplateListPage(Page<BaseParam> page, @Param("baseParam")BaseParam baseParam);

    List<ReportTemplateVO> getReportTemplateList(@Param("reportSearchParam")ReportSearchParam reportSearchParam);

    List<ReportTemplateVO> getReportTemplateByDept(@Param("ids") List<String> ids);

    List<ReportTemplateVO> getReportTemplateByIds(@Param("ids") List<String> ids);

    @Select("${sqlStr}")
    StatisticalDataDTO dynamicSql(@Param("sqlStr")String sql);

    @Select("${sqlStr}")
    Map<String, Float> dynamicSqlMap(@Param("sqlStr")String sql);
}
