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

📄 logincrmemployeedao.java

📁 基于SSH (struts+spring+hibernate)框架设计的 CRM客户关系管理系统
💻 JAVA
字号:
package com.csu.crm.login.dao;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.csu.crm.common.vo.CrmEmployee;

public class LoginCrmEmployeeDAO extends HibernateDaoSupport{
	
	public CrmEmployee findbyidandpass(String loginid,String pass){
		System.out.println("begin");
		CrmEmployee crmEmployee;
		List list = null;
		String hql="from CrmEmployee as crmemployee where crmemployee.loginId='"+loginid+"' and crmemployee.pwd='"+pass+"'";
		System.out.println("sdsd");
		list = this.getHibernateTemplate().find(hql);
		System.out.println("select is  ok");
		if(!list.isEmpty()){
			crmEmployee=(CrmEmployee)list.get(0);
			return crmEmployee;
		}
		return null;
	}
	public static LoginCrmEmployeeDAO getFromApplicationContext(
			ApplicationContext ctx) {
		return (LoginCrmEmployeeDAO) ctx.getBean("LoginCrmEmployeeDAO");
	}
}

⌨️ 快捷键说明

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