Class ItemPageService


  • @Service
    public class ItemPageService
    extends Object
    • Constructor Detail

      • ItemPageService

        public ItemPageService​(@Qualifier("jdbcTemplate4Tenant")
                               org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
    • Method Detail

      • count

        public int count​(String countSql,
                         Object[] countArgs)
      • list

        public <T> List<T> list​(String sql,
                                Map<String,​Object> sqlMap,
                                org.springframework.jdbc.core.RowMapper<T> rowMapper)
      • list

        public <T> List<T> list​(String sql,
                                Object[] queryArgs,
                                org.springframework.jdbc.core.RowMapper<T> rowMapper)
      • page

        public <T> ItemPage<T> page​(String sql,
                                    Object[] queryArgs,
                                    org.springframework.jdbc.core.RowMapper<T> rowMapper,
                                    String countSql,
                                    Object[] countArgs,
                                    int currPage,
                                    int size)
        返回分页对象
        Type Parameters:
        T - entity
        Parameters:
        sql - 查询sql
        queryArgs - 查询参数
        rowMapper - entity mapper
        countSql - 总量sql
        countArgs - 总量参数
        currPage - 当前页
        size - 每页大小
        Returns:
        分页对象