package digital.laboratory.platform.entrustment.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import digital.laboratory.platform.entrustment.entity.CaseEvent;
import digital.laboratory.platform.entrustment.vo.CaseEventVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 案件事件 Mapper 接口
 *
 * @author Zhang Xiaolong created at  2022-03-22
 * @describe 案件事件 Mapper 类
 */
@Mapper
public interface CaseEventMapper extends BaseMapper<CaseEvent> {
	/**
	 * 按查询条件查询案件VO
	 * @param fromDate
	 * @param toDate
	 * @param caseName
	 * @param caseType
	 * @return
	 */
	List<CaseEventVO> getCaseVoList(@Param("fromDate")String fromDate, @Param("toDate")String toDate,
	                                @Param("caseName")String caseName,
	                                @Param("caseType")String caseType);

	IPage<CaseEventVO> getCaseVoPage(@Param("page") IPage<CaseEvent> page, @Param(Constants.WRAPPER) QueryWrapper<CaseEvent> qw);

	CaseEventVO getCaseVOById(@Param("id") String id);

	String getMaxCaseNo(String prefix);
}
