|
@@ -14,34 +14,32 @@ import com.baomidou.mybatisplus.core.pagination.Page;
|
|
|
* @author yuxiaobin
|
|
|
* @date 2018/2/7
|
|
|
*/
|
|
|
-public abstract class ISqlRunner {
|
|
|
+public interface ISqlRunner {
|
|
|
|
|
|
- public static final String INSERT = "com.baomidou.mybatisplus.core.mapper.SqlRunner.Insert";
|
|
|
- public static final String DELETE = "com.baomidou.mybatisplus.core.mapper.SqlRunner.Delete";
|
|
|
- public static final String UPDATE = "com.baomidou.mybatisplus.core.mapper.SqlRunner.Update";
|
|
|
- public static final String SELECT_LIST = "com.baomidou.mybatisplus.core.mapper.SqlRunner.SelectList";
|
|
|
- public static final String SELECT_OBJS = "com.baomidou.mybatisplus.core.mapper.SqlRunner.SelectObjs";
|
|
|
- public static final String COUNT = "com.baomidou.mybatisplus.core.mapper.SqlRunner.Count";
|
|
|
- public static final String SQL_SCRIPT = "${sql}";
|
|
|
- public static final String SQL = "sql";
|
|
|
+ String INSERT = "com.baomidou.mybatisplus.core.mapper.SqlRunner.Insert";
|
|
|
+ String DELETE = "com.baomidou.mybatisplus.core.mapper.SqlRunner.Delete";
|
|
|
+ String UPDATE = "com.baomidou.mybatisplus.core.mapper.SqlRunner.Update";
|
|
|
+ String SELECT_LIST = "com.baomidou.mybatisplus.core.mapper.SqlRunner.SelectList";
|
|
|
+ String SELECT_OBJS = "com.baomidou.mybatisplus.core.mapper.SqlRunner.SelectObjs";
|
|
|
+ String COUNT = "com.baomidou.mybatisplus.core.mapper.SqlRunner.Count";
|
|
|
+ String SQL_SCRIPT = "${sql}";
|
|
|
+ String SQL = "sql";
|
|
|
|
|
|
- public static SqlSessionFactory FACTORY;
|
|
|
+ boolean insert(String sql, Object... args);
|
|
|
|
|
|
- public abstract boolean insert(String sql, Object... args);
|
|
|
+ boolean delete(String sql, Object... args);
|
|
|
|
|
|
- public abstract boolean delete(String sql, Object... args);
|
|
|
+ boolean update(String sql, Object... args);
|
|
|
|
|
|
- public abstract boolean update(String sql, Object... args);
|
|
|
+ List<Map<String, Object>> selectList(String sql, Object... args);
|
|
|
|
|
|
- public abstract List<Map<String, Object>> selectList(String sql, Object... args);
|
|
|
+ List<Object> selectObjs(String sql, Object... args);
|
|
|
|
|
|
- public abstract List<Object> selectObjs(String sql, Object... args);
|
|
|
+ Object selectObj(String sql, Object... args);
|
|
|
|
|
|
- public abstract Object selectObj(String sql, Object... args);
|
|
|
+ int selectCount(String sql, Object... args);
|
|
|
|
|
|
- public abstract int selectCount(String sql, Object... args);
|
|
|
+ Map<String, Object> selectOne(String sql, Object... args);
|
|
|
|
|
|
- public abstract Map<String, Object> selectOne(String sql, Object... args);
|
|
|
-
|
|
|
- public abstract Page<Map<String, Object>> selectPage(Page page, String sql, Object... args);
|
|
|
+ Page<Map<String, Object>> selectPage(Page page, String sql, Object... args);
|
|
|
}
|