日期:2014-05-19 浏览次数:20872 次
/**
 * 删除
 */
public void remove(int id) throws Exception {
    Session session = getSession();
    session.delete(session.load(Usergroup.class, id));
}
    /**
     * 删除
     */
    public Map<String, Object> remove(int id) {
        Map<String, Object> map = new HashMap<String, Object>();
        try {
            userGroupDao.remove(id);
            map.put("isSuccess", true);
        } catch (Exception e) {
            map.put("isSuccess", false);
            map.put("errorMsg", e.getMessage());
        }
        return map;
    }