Browse Source

显示修改

yue 5 năm trước cách đây
mục cha
commit
6c61a0799e
1 tập tin đã thay đổi với 19 bổ sung21 xóa
  1. 19 21
      src/main/java/com/jeeplus/core/persistence/BaseMapper.java

+ 19 - 21
src/main/java/com/jeeplus/core/persistence/BaseMapper.java

@@ -3,15 +3,11 @@
  */
 package com.jeeplus.core.persistence;
 
+import org.apache.ibatis.annotations.*;
+
 import java.util.List;
 import java.util.Map;
 
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-import org.apache.ibatis.annotations.Delete;
-import org.apache.ibatis.annotations.Insert;
-import org.apache.ibatis.annotations.Update;
-
 /**
  * DAO支持类实现
  * @author jeeplus
@@ -41,23 +37,25 @@ public interface BaseMapper<T> {
 	 * @param value
 	 * @return
 	 */
-	public  T findUniqueByProperty(@Param(value="propertyName")String propertyName, @Param(value="value")Object value);
+	public  T findUniqueByProperty(@Param(value = "propertyName") String propertyName, @Param(value = "value") Object value);
+
 
-	
 	/**
 	 * 查询数据列表,如果需要分页,请设置分页对象,如:entity.setPage(new Page<T>());
 	 * @param entity
 	 * @return
 	 */
 	public List<T> findList(T entity);
-	
+
+	public List<T> findListBy(List<T> entity);
+
 	/**
 	 * 查询所有数据列表
 	 * @param entity
 	 * @return
 	 */
 	public List<T> findAllList(T entity);
-	
+
 	/**
 	 * 查询所有数据列表
 	 * @see public List<T> findAllList(T entity)
@@ -65,21 +63,21 @@ public interface BaseMapper<T> {
 	 */
 	@Deprecated
 	public List<T> findAllList();
-	
+
 	/**
 	 * 插入数据
 	 * @param entity
 	 * @return
 	 */
 	public int insert(T entity);
-	
+
 	/**
 	 * 更新数据
 	 * @param entity
 	 * @return
 	 */
 	public int update(T entity);
-	
+
 	/**
 	 * 删除数据(物理删除,从数据库中彻底删除)
 	 * @param id
@@ -88,7 +86,7 @@ public interface BaseMapper<T> {
 	 */
 	@Deprecated
 	public int delete(String id);
-	
+
 	/**
 	 * 删除数据(逻辑删除,更新del_flag字段为1,在表包含字段del_flag时,可以调用此方法,将数据隐藏)
 	 * @param id
@@ -97,31 +95,31 @@ public interface BaseMapper<T> {
 	 */
 	@Deprecated
 	public int deleteByLogic(String id);
-	
+
 	/**
 	 * 删除数据(物理删除,从数据库中彻底删除)
 	 * @param entity
 	 * @return
 	 */
 	public int delete(T entity);
-	
+
 	/**
 	 * 删除数据(逻辑删除,更新del_flag字段为1,在表包含字段del_flag时,可以调用此方法,将数据隐藏)
 	 * @param entity
 	 * @return
 	 */
 	public int deleteByLogic(T entity);
-	
+
 	@Select("${sql}")
-	public List<Map<String, Object>>  execSelectSql(@Param(value="sql")String sql);
+	public List<Map<String, Object>>  execSelectSql(@Param(value = "sql") String sql);
 
 	@Update("${sql}")
-	public void execUpdateSql(@Param(value="sql")String sql);
+	public void execUpdateSql(@Param(value = "sql") String sql);
 
 	@Insert("${sql}")
-	public void execInsertSql(@Param(value="sql")String sql);
+	public void execInsertSql(@Param(value = "sql") String sql);
 
 	@Delete("${sql}")
-	public void execDeleteSql(@Param(value="sql")String sql);
+	public void execDeleteSql(@Param(value = "sql") String sql);
 	
 }