标签:adl find let array 删除 dao Nid list mini
//新增的所有数据
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);
}
}
标签:adl find let array 删除 dao Nid list mini
原文地址:https://www.cnblogs.com/last-xy/p/12936172.html