package com.sckw.slope.detection.dao.mysql;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sckw.slope.detection.model.dos.mysql.KwsReportTemplate;
import com.sckw.slope.detection.model.param.StatementQuery;
import com.sckw.slope.detection.model.vo.DeviceVo;
import com.sckw.slope.detection.model.vo.ReportDetailVO;
import com.sckw.slope.detection.model.vo.ReportStatementVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
@DS("mysql")
public interface KwsReportTemplateMapper extends BaseMapper<KwsReportTemplate> {
    int deleteByPrimaryKey(Long id);

    int insertSelective(KwsReportTemplate record);

    KwsReportTemplate selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(KwsReportTemplate record);

    int updateByPrimaryKey(KwsReportTemplate record);

    List<ReportStatementVO> selectListByReportNameAndProjectIdAndCompany(@Param("query") StatementQuery query, @Param("companyId") String companyId);

    List<ReportStatementVO> selectListByReportNameAndProjectId(@Param("query") StatementQuery query, @Param("companyId") String companyId);

    ReportDetailVO selectDataAndTemplate(@Param("id") Long id);

    List<DeviceVo> selectDeviceByProjectId(@Param("projectId") String projectId,@Param("list") List<String> list);
}