Skip to content

Commit

Permalink
'aaa'
Browse files Browse the repository at this point in the history
  • Loading branch information
XueSong committed Jun 14, 2014
1 parent bbfadc9 commit cd20324
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 31 deletions.
38 changes: 38 additions & 0 deletions src/com/oa/action/PersonalInfoAction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.oa.action;

import javax.annotation.Resource;

import org.apache.struts2.ServletActionContext;

import com.oa.model.Person;
import com.oa.model.Users;
import com.oa.service.PersonService;
import com.opensymphony.xwork2.ActionSupport;

public class PersonalInfoAction extends ActionSupport {

private static final long serialVersionUID = -2247441234534761377L;
private PersonService personService;
private String returns;

public String selfModify(){
Users user=(Users) ServletActionContext.getRequest().getSession().getAttribute("admin");
System.out.println(user.toString());
System.out.println("=======+++++=====");
Person person=personService.getPerson(user.getPersonid().getId());
System.out.println(person.toString());
ServletActionContext.getRequest().setAttribute("person", person);
returns="JSP/gerenxinxi.jsp";

return "modify";
}

public PersonService getPersonService() {
return personService;
}

@Resource
public void setPersonService(PersonService personService) {
this.personService = personService;
}
}
13 changes: 2 additions & 11 deletions src/com/oa/action/UserAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,8 @@ public String exits(){
return null;
}

public String selfModify(){
Users user=(Users) ServletActionContext.getRequest().getSession().getAttribute("admin");
System.out.println(user.toString());
System.out.println("=======+++++=====");
Person person=personService.getPerson(user.getPersonid().getId());
System.out.println(person.toString());
ServletActionContext.getRequest().setAttribute("person", person);
returns="JSP/gerenxinxi.jsp";

return "modify";
}


public String modifyPassword() throws IOException{
Users users=(Users) ServletActionContext.getRequest().getSession().getAttribute("admin");
PrintWriter writer=ServletActionContext.getResponse().getWriter();
Expand Down
18 changes: 0 additions & 18 deletions src/com/oa/extend/PrivilegeInterceptor.java
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
package com.oa.extend;

import java.io.PrintWriter;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;

import sun.launcher.resources.launcher;

import com.oa.dao.SuperDaoInte;
import com.oa.dao.impl.SuperDao;
import com.oa.model.Acl;
import com.oa.model.Module;
import com.oa.model.Role;
import com.oa.model.Users;
import com.oa.model.UsersRoles;
import com.oa.service.UserService;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
Expand Down
2 changes: 1 addition & 1 deletion src/com/oa/service/impl/PerformanceExamineServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void updatePerformanceExamine(PerformanceExamine pement) {
}

public List<PerformanceExamine> selectPerformanceExamine(ListPerformanceExamine clazz) {
List<Object> pe = superDao.find("from PerformanceExamine pe where pe.name = '" + clazz.getName() + "'");
List<Object> pe = superDao.find("from ListPerformanceExamine pe where pe.name = '" + clazz.getName() + "'");
return convertToPerformanceExamine(pe);
}

Expand Down
2 changes: 1 addition & 1 deletion src/jdbc.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jdbc.driverClassName = com.mysql.jdbc.Driver
jdbc.url = jdbc\:mysql\:https://localhost/myoa
jdbc.username =admin
jdbc.username =root
jdbc.password =mysql
3 changes: 3 additions & 0 deletions src/struts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@
<result name="addPerformanceExamine">/JSP/addPerformanceExamine.jsp</result>
<result name="showSpecialPerformanceExamine">/JSP/showSpecialPerformanceExamine.jsp</result>
</action>
<action name="PersonalInfoAction" class="com.oa.action.PersonalInfoAction">
<result name="modify">/JSP/yuangong.jsp</result>
</action>
<action name="FindAction" class="com.oa.action.FindAction">
<result name="userList">/JSP/userManage.jsp</result>
<result name="personList">/JSP/listyuangong.jsp</result>
Expand Down

0 comments on commit cd20324

Please sign in to comment.