DatabaseSetDao extends BaseDao { public Long getDbSetTotalCountByAppid(Paging<DatabaseSet> paging) throws SQLException { String sql = "SELECT count(1) \n" + "FROM databaseset t1 \n" + "inner join project_dbset_relation t2 on t2.dbset_id = t1.id \n" + "inner join dal_group t3 on t1.group_id = t3.id\n" + "inner join project t4 on t2.project_id = t4.id\n" + "where t4.app_id = " + paging.getData().getApp_id(); return this.getCount(sql); }  Long insertDatabaseSet(DatabaseSet dbset); int updateDatabaseSet(DatabaseSet dbset); int deleteDatabaseSetById(Long dbsetId); int deleteDatabaseSetEntryByDbsetId(Long dbsetId); DatabaseSet getDatabaseSetById(Long id); DatabaseSet getDatabaseSetByName(String name); List<DatabaseSet> getAllDatabaseSetByName(String name); List<DatabaseSet> getAllDatabaseSetByNames(List<String> names); List<DatabaseSet> getAllDatabaseSetById(Long id); List<DatabaseSetView> getAllDatabaseSetByProjectId(Long projectId); List<DatabaseSet> getAllDatabaseSetByGroupId(Long groupId); DatabaseSetEntry getMasterDatabaseSetEntryByDatabaseSetId(Long dbset_id); Long getDbSetTotalCount(Paging<DatabaseSet> paging); List<DatabaseSetView> findDbSetPageList(Paging<DatabaseSet> paging); Long getDbSetTotalCountByAppid(Paging<DatabaseSet> paging); List<DatabaseSetView> findDbSetPageListByAppid(Paging<DatabaseSet> paging);  }
@Test public void getDbSetTotalCountByAppid() throws Exception { databaseSetModel.setApp_id("1000002397"); Long count = databaseSetDao.getDbSetTotalCountByAppid(paging); System.out.println("getDbSetTotalCountByAppid :-------> " + count); Assert.assertTrue(count > 0); }