//新增的所有数据
List<Admin> adminList = new ArrayList<>();
//数据库中的所有数据
List<Admin> adList = adminDao.find(new Admin());
//新增数据的所有id
List<String> adminIdList = new ArrayList<>();
for (Admin admin : adminList) {
adminIdList.add(admin.getId());
}
for (Admin admin : adList) {
if (!adminIdList.contains(admin.getId())) {
adminDao.delete(admin);
}
}