public void prepare() throws Exception { if (isNullOrEmptyString(id)) { cmsRequestlog = new CmsRequestlog(); } else { cmsRequestlog = (CmsRequestlog) cmsRequestlogManager.getById(id); } }
/** 删除对象 */ public String delete() { if (items != null) for (String ids : items) { String[] idArray = ids.split(","); for (String id : idArray) { if (StringUtils.isNotEmpty(id) && StringUtils.isNumeric(id)) { cmsRequestlog = cmsRequestlogManager.getById(Long.parseLong(id)); if (cmsRequestlog != null) { // cmsRequestlog.setStatus(-1); // cmsRequestlogManager.update(cmsRequestlog); cmsRequestlogManager.removeById(cmsRequestlog.getId()); } } } // cmsRequestlogManager.removeById(Long.parseLong(id)); } if ("ajax".equalsIgnoreCase(Utils.getParam(getRequest(), "ajax"))) { Map map = new HashMap(); map.put("re", 1); return writeAjaxResponse(Json.toJson(map)); } else { return LIST_ACTION; } }