package org.jeecg.modules.database.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.database.entity.HistoricalDatabase;

import java.util.List;

/**
 * @Description: 历史一期记录
 * @Author: jeecg-boot
 * @Date: 2025-02-24
 * @Version: V1.0
 */
public interface HistoricalDatabaseMapper extends BaseMapper<HistoricalDatabase> {

    @Select("SELECT SUM(total_count_lhs) FROM historical_database where total_count_lhs is not null")
    Long sumLhs();

    @Select("SELECT SUM(total_count_xhy) FROM historical_database where total_count_xhy is not null")
    Long sumXhy();

    List<HistoricalDatabase> search(@Param("keyWord") String keyWord);
}
