|
@@ -28,13 +28,15 @@ public class ModelFormDelHandler extends DefaultDelHandler<ModelForm> { |
|
|
@Override |
|
|
@Override |
|
|
protected void delDb() { |
|
|
protected void delDb() { |
|
|
EntityDao<ModelForm> dao = DbEngine.getInstance().findDao(ModelForm.class); |
|
|
EntityDao<ModelForm> dao = DbEngine.getInstance().findDao(ModelForm.class); |
|
|
listDeled = new HashSet<>(ModelFormCache.getInstance().getListByModule(id)); |
|
|
|
|
|
if (CommUtil.isEmpty(listDeled)) { |
|
|
|
|
|
|
|
|
Set<ModelForm> list = new HashSet<>(ModelFormCache.getInstance().getListByModule(id)); |
|
|
|
|
|
if (CommUtil.isEmpty(list)) { |
|
|
|
|
|
listDeled = null; |
|
|
dao.deleteEntity(id); |
|
|
dao.deleteEntity(id); |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
listDeled = new HashSet<>(list); |
|
|
List<Long> ids = new ArrayList<>(); |
|
|
List<Long> ids = new ArrayList<>(); |
|
|
ids.add(id); |
|
|
ids.add(id); |
|
|
for (ModelForm form: listDeled) { |
|
|
|
|
|
|
|
|
for (ModelForm form: list) { |
|
|
ids.add(form.getId()); |
|
|
ids.add(form.getId()); |
|
|
} |
|
|
} |
|
|
dao.deleteEntity(ids); |
|
|
dao.deleteEntity(ids); |
|
|