package org.jeecg.modules.database.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.database.entity.Experiment;
import org.jeecg.modules.system.entity.SysUser;

/**
 * @Description: 试验管理
 * @Author: jeecg-boot
 * @Date: 2024-08-30
 * @Version: V1.0
 */
public interface ExperimentMapper extends BaseMapper<Experiment> {

    IPage<Experiment> join(Page<Experiment> page, Experiment experiment, SysUser loginUser);

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

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