/** * 删除动作 * * @param ids * @return */ public boolean delete(Long[] ids, Map<String, Object> context) { for (Long id : ids) { Weight w = OverrideUtils.overrideToWeight(overrideService.findById(id)); if (!super.currentUser.hasServicePrivilege(w.getService())) { context.put("message", getMessage("HaveNoServicePrivilege", w.getService())); return false; } } for (Long id : ids) { overrideService.deleteOverride(id); } return true; }
/** * load weight对象供编辑操作 * * @param id * @param context */ public void show(Long id, Map<String, Object> context) { Weight weight = OverrideUtils.overrideToWeight(overrideService.findById(id)); context.put("weight", weight); }