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

/**
 * @Description: 试验报告
 * @Author: jeecg-boot
 * @Date: 2024-08-30
 * @Version: V1.0
 */
public interface ExperimentReportMapper extends BaseMapper<ExperimentReport> {

    @Select("SELECT r.* " +
            "FROM experiment_report r LEFT JOIN experiment e ON r.experiment_id = e.id " +
            "WHERE e.status = #{report.status}")
    IPage<ExperimentReport> join(Page page, ExperimentReport report);

}
