package com.storlead.framework.mybatis.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.storlead.framework.mybatis.entity.SysBaseField;
import com.storlead.framework.mybatis.query.QueryBaseEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MyBaseMapper<T> extends BaseMapper<T> {

    <R extends SysBaseField, E extends QueryBaseEntity> List<R> list(IPage page,E entity);

    <R extends SysBaseField> List<R> list(IPage page,@Param(Constants.WRAPPER) LambdaQueryWrapper<T> entity);

    <R extends SysBaseField, E extends QueryBaseEntity> List<R> list(E entity);

    <R extends SysBaseField> List<R> list(@Param(Constants.WRAPPER) LambdaQueryWrapper<T> entity);
}
