⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 employeelogin.java

📁 spring+struts+hibernate做的银行系统
💻 JAVA
字号:
/*
 * Created on 2006-3-25
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package cn.com.tym.pub;

/**
 * @author jack_booth
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */


import javax.servlet.http.HttpServletRequest;
/**�û���½�ӿ� 
 * @author Administrator
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class EmployeeLogin {
    /**
     * �û���½�ж�
     * @author		wukai			
     * @param 		employeeID���û���
     * @param 		password������
     * @return		0��ʧ�ܣ�1���ɹ�
     */
	/**
    public static int login(HttpServletRequest req,String employeeID,String password) throws SQLException{
		OperateDBBean odbb = new OperateDBBean();
		String sql = "select * from Ssd_HR_FuzzList where employeeid='"+employeeID+"' and pwd='"+password+"'";
		try {
			ResultSet rs = odbb.executeQuery(sql);
			if(rs.next()){
				int EMPLOYEE_SERIALNO = rs.getInt("EMPLOYEE_SERIALNO");
				req.getSession().setAttribute("EmployeeID",employeeID);
				SystemLog.operateLog(req,SystemLog.SQL_LOGIN,"Ssd_HR_FuzzList",String.valueOf(EMPLOYEE_SERIALNO),SystemLog.OPERATE_TYPE_DIRECT);
				return 1;
			}
		} catch (SQLException e) {
			throw e;
		}finally{
			odbb.close();
		}
		
		
		return 0;
 
    }
    
*/
	/**�Ƿ��½
	 * @param req �������session��ȡEmployeeID���ԣ����Ϊ�ձ�ʾ�Ѿ���½
	 * @return 0��δ��½��1���Ѿ���½
	 */
	public static int isLogin(HttpServletRequest req){
    	Object objEmployeeID = req.getSession().getAttribute("user");
    	if(objEmployeeID==null){
    		return 0;
    	}
    	return 1;
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -