@Test public void deleteByProjectAndDbSetIdS() throws Exception { Set<Long> dbsetIds = new HashSet<>(); dbsetIds.add(1L); dbsetIds.add(2L); int count = projectDbsetRelationDao.deleteByProjectAndDbSetIdS(1L, dbsetIds); System.out.println("deleteProjectDbsetRelation :-------> " + count); Assert.assertTrue(count > 0); }
public int deleteByProjectAndDbSetIdS(Long projectId, Set<Long> dbsetIds) throws SQLException { String sql = "DELETE FROM project_dbset_relation WHERE project_id = " + projectId + " and dbset_id in (" + StringUtil.joinCollectByComma(dbsetIds) + ") "; return this.updataBysql(sql); }
ProjectDbsetRelationDao extends BaseDao { public int deleteByProjectAndDbSetIdS(Long projectId, Set<Long> dbsetIds) throws SQLException { String sql = "DELETE FROM project_dbset_relation WHERE project_id = " + projectId + " and dbset_id in (" + StringUtil.joinCollectByComma(dbsetIds) + ") "; return this.updataBysql(sql); } }
ProjectDbsetRelationDao extends BaseDao { public int deleteByProjectAndDbSetIdS(Long projectId, Set<Long> dbsetIds) throws SQLException { String sql = "DELETE FROM project_dbset_relation WHERE project_id = " + projectId + " and dbset_id in (" + StringUtil.joinCollectByComma(dbsetIds) + ") "; return this.updataBysql(sql); }  }
ProjectDbsetRelationDao extends BaseDao { public int deleteByProjectAndDbSetIdS(Long projectId, Set<Long> dbsetIds) throws SQLException { String sql = "DELETE FROM project_dbset_relation WHERE project_id = " + projectId + " and dbset_id in (" + StringUtil.joinCollectByComma(dbsetIds) + ") "; return this.updataBysql(sql); }  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); }
ProjectDbsetRelationDao extends BaseDao { public int deleteByProjectAndDbSetIdS(Long projectId, Set<Long> dbsetIds) throws SQLException { String sql = "DELETE FROM project_dbset_relation WHERE project_id = " + projectId + " and dbset_id in (" + StringUtil.joinCollectByComma(dbsetIds) + ") "; return this.updataBysql(sql); }  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);  }