ProjectDbsetRelationDao extends BaseDao { public Long getCountByRelation(Long dbsetId, Long projectId) throws SQLException { return this.getCount("SELECT count(1) FROM project_dbset_relation WHERE dbset_id=" + dbsetId + " and project_id=" + projectId); }  Long insertProjectDbsetRelation(ProjectDbsetRelation projectDbsetRelation); int[] insertRelationList(List<ProjectDbsetRelation> projectDbsetRelations); int updateProjectDbsetRelation(ProjectDbsetRelation projectDbsetRelation); int deleteProjectDbsetRelation(ProjectDbsetRelation projectDbsetRelation); int deleteByProjectAndDbSetIdS(Long projectId, Set<Long> dbsetIds); int deleteByProjectId(Long projectId); ProjectDbsetRelation getProjectDbsetRelationById(Long id); List<ProjectDbsetRelation> getAllProjectDbsetRelation(Long projectId); Long getCountByRelation(Long dbsetId, Long projectId);  }
@Test public void getCountByRelation() throws Exception { Long count = projectDbsetRelationDao.getCountByRelation(234L,88L); System.out.println("getCountByRelation :-------> " + count); Assert.assertTrue(count > 0); }