@@ -0,0 +1,1757 @@
+package cn.updev.Action.Event;%0A%0Aimport cn.updev.Events.Event.EventDAO;%0Aimport cn.updev.Events.Group.EventGroupDAO;%0Aimport cn.updev.Events.Group.UserEventGroup;%0Aimport cn.updev.Events.Static.IEvent;%0Aimport com.opensymphony.xwork2.ActionSupport;%0Aimport org.apache.struts2.ServletActionContext;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0A/**%0A * Created by hypo on 15-11-22.%0A */%0Apublic class EventManageAction extends ActionSupport %7B%0A%0A    private Integer groupId;%0A%0A    public String execute() throws Exception %7B%0A        System.out.println(new Date());%0A        //%E8%8E%B7%E5%BE%97%E5%BD%93%E5%89%8D%E7%94%A8%E6%88%B7%0A        Integer userId = 1;%0A%0A        EventGroupDAO groupDAO = new EventGroupDAO();%0A        List%3CUserEventGroup%3E groups = groupDAO.getAllUserEventGroup(userId);%0A%0A        HttpServletRequest request = ServletActionContext.getRequest();%0A%0A        // %E6%8A%8A%E8%AF%A5%E7%94%A8%E6%88%B7%E7%9A%84%E6%89%80%E6%9C%89%E4%BA%8B%E4%BB%B6%E7%BB%84%E6%94%BE%E5%85%A5request%0A        request.setAttribute(%22groups%22, groups);%0A%0A        EventDAO eventDAO = new EventDAO();%0A        List%3CIEvent%3E events = null;%0A        if(this.groupId == null %7C%7C this.groupId %3C 1)%7B%0A%0A            events = eventDAO.getSingleEventByUserId(userId);%0A            request.setAttribute(%22groupId%22, 0);%0A        %7Delse if(groups != null)%7B%0A%0A            // %E7%A1%AE%E4%BF%9D%E8%BF%94%E5%9B%9E%E7%9A%84%E4%BA%8B%E4%BB%B6%E7%BB%84%E4%BA%8B%E4%BB%B6%E6%98%AF%E8%AF%A5%E7%94%A8%E6%88%B7%E5%88%9B%E5%BB%BA%E7%9A%84%0A            for(UserEventGroup group : groups)%7B%0A                if(group.getGroupInfo().getGroupId() == groupId)%7B%0A%0A                    events = eventDAO.getEventByEventGroupId(groupId);%0A                %7D%0A            %7D%0A            request.setAttribute(%22groupId%22, groupId);%0A        %7D%0A%0A        request.setAttribute(%22events%22, events);%0A%0A        return SUCCESS;%0A    %7D%0A%0A    public Integer getGroupId() %7B%0A        return groupId;%0A    %7D%0A%0A    public void setGroupId(Integer groupId) %7B%0A        this.groupId = groupId;%0A    %7D%0A%7D%0A

add Action