All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.hmtools.mapper.plus.mysql.select.IMysqlSelectMapperPlus Maven / Gradle / Ivy

package top.hmtools.mapper.plus.mysql.select;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import tk.mybatis.mapper.annotation.RegisterMapper;

@RegisterMapper
public interface IMysqlSelectMapperPlus {


	
	//####################################  查
	
	/**
	 * 获取所有数据
	 * @return
	 */
	@SelectProvider(type = SelectMapperPlusProvider.class,method="dynamicSQL")
	List getAll();

	/**
	 * 指定主键名称(Java类字段名字符串),主键集合,获取指定记录集合。入参为空,会返回所有数据
	 * 
为能够结合pagehelper分页插件使用,本方法输出的SQL语句不含“limit” * @param key * @param ids * @return */ @SelectProvider(type = SelectMapperPlusProvider.class,method="dynamicSQL") List getSomeByPk(@Param(value="key")String key,@Param(value="ids")String... ids); /** * 指定主键名称(Java类字段名字符串),主键集合,获取指定记录总数。入参为空,会返回所有数据 * @param key * @param ids * @return */ @SelectProvider(type = SelectMapperPlusProvider.class,method="dynamicSQL") int getCountByPk(@Param(value="key")String key,@Param(value="ids")String... ids); /** * 根据条件获取对应数据 *
为能够结合pagehelper分页插件使用,本方法输出的SQL语句不含“limit” * @param condition * @return */ @SelectProvider(type = SelectMapperPlusProvider.class,method="dynamicSQL") List getSomeByCondition(T condition); /** * 根据条件获取对应数据总数 * @param condition * @return */ @SelectProvider(type = SelectMapperPlusProvider.class,method="dynamicSQL") int getCountByCondition(T condition); /** * 根据指定的主键名称、主键集合,获取数据库中存在的主键集合数据 *
为能够结合pagehelper分页插件使用,本方法输出的SQL语句不含“limit” * @param key * @param ids * @return */ @SelectProvider(type = SelectMapperPlusProvider.class,method="dynamicSQL") List getExistPksByPk(@Param(value="key")String key,@Param(value="ids")String... ids); /** * 根据指定的主键名称、主键集合,获取数据库中存在的主键集合数据总数 * @param key * @param ids * @return */ @SelectProvider(type = SelectMapperPlusProvider.class,method="dynamicSQL") int getExistPksCountByPk(@Param(value="key")String key,@Param(value="ids")String... ids); }