@Override public void update(SysParamItem sysParamItem) { dao.update(sysParamItem); // 更新缓存 // noticeBroker(sysParamItem.getType()); ParameterContainer.getInstance().reloadSystem(sysParamItem.getType()); }
@Override public String save(SysParamItem sysParamItem) { String id = dao.save(sysParamItem); // 更新缓存 // noticeBroker(sysParamItem.getType()); ParameterContainer.getInstance().reloadSystem(sysParamItem.getType()); return id; }
@Override public void deleteByIds(String... ids) { if (ids == null || ids.length == 0) return; for (String id : ids) { SysParamItem item = dao.findById(id); if (item == null) { throw new EntityNotFoundException(id); } // 删除或更改状态 String status = item.getStatus(); if (CommonStatus.ACTIVE.getValue().equals(status)) { item.setStatus(CommonStatus.CANCELED.getValue()); } else if (CommonStatus.INACTIVE.getValue().equals(status)) { dao.delete(item); } // 更新缓存 // noticeBroker(item.getType()); ParameterContainer.getInstance().reloadSystem(item.getType()); } }