package com.base.track.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.base.track.model.dto.request.QueryEphListDTO;
import com.base.track.model.entity.EphData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface EphDataMapper extends BaseMapper<EphData> {

    void batch(@Param("list") List<EphData> list,@Param("code") String code);

    void creatTable(@Param("code") String code);

    @Select("select count(*) as count from information_schema.`TABLES` where TABLE_NAME = ${tableName}")
    Integer checkTable(@Param("tableName") String tableName);

    List<EphData> getList(@Param("dto") QueryEphListDTO queryEphListDTO);

    void delData(@Param("dto") QueryEphListDTO queryEphListDTO);

}
