?? loginaction.java
字號(hào):
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.parddu.crm.web.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.parddu.crm.biz.IempBiz;
import com.parddu.crm.biz.IimpowerBiz;
import com.parddu.crm.entity.Employee;
import com.parddu.crm.entity.MenuInfo;
import com.parddu.crm.util.MyFinal;
import com.parddu.crm.web.form.EmpForm;
/**
* MyEclipse Struts
* Creation date: 12-06-2008
*
* XDoclet definition:
* @struts.action path="/login" name="empForm" scope="request" validate="true"
*/
public class LoginAction extends Action {
private IempBiz empBiz;
private IimpowerBiz impowerBiz;
/**
* 用戶登陸
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
EmpForm empForm = (EmpForm) form;// TODO Auto-generated method stub
ActionForward af = mapping.findForward("login");
Employee emp = this.getEmpBiz().userLoginQuery(empForm.getEmp().getEmpName(), empForm.getEmp().getEmpPwd());
if(emp!=null){
//查詢出用戶所擁有的權(quán)限菜單
List<MenuInfo> menuList = this.getImpowerBiz().queryMenuByEmpIdQuery(emp.getEmpId());
request.getSession().setAttribute(MyFinal.SESSION_USER_ALL_MENU_LIST, menuList);
request.getSession().setAttribute(MyFinal.SESSION_LOGIN_USERINFO, emp);
af = mapping.findForward("index");
}
return af;
}
public IempBiz getEmpBiz() {
return empBiz;
}
public void setEmpBiz(IempBiz empBiz) {
this.empBiz = empBiz;
}
public IimpowerBiz getImpowerBiz() {
return impowerBiz;
}
public void setImpowerBiz(IimpowerBiz impowerBiz) {
this.impowerBiz = impowerBiz;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -