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.LocalDatabase;

import java.util.List;

/**
 * @Description: 当期数据库记录
 * @Author: jeecg-boot
 * @Date: 2025-02-24
 * @Version: V1.0
 */
public interface LocalDatabaseMapper extends BaseMapper<LocalDatabase> {
    @Select("SELECT SUM(total_count_lhs) FROM local_database where total_count_lhs is not null")
    Long sumLhs();

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

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