class DataBaseDao extends BaseDao {

    public Long getTotalCountByUserId(Paging<DataBaseInfo> paging, Long userId) throws SQLException {
        String sql = "SELECT count(1) FROM alldbs a " +
                "inner join user_group d on d.group_id =  a.dal_group_id and d.user_id =" + userId +
                " LEFT JOIN dal_group b ON b.id = a.dal_group_id " + appenWhere(paging);
        return this.getCount(sql);
    }

}