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

📄 userid.java

📁 图书
💻 JAVA
字号:
package thizlinux.linuxhr;import java.sql.*;/** * @author root * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */public class UserId {	private int pid=100000;	private int eid=200000;	public UserId(){		DBconnect dbconn=new DBconnect();		ResultSet rs=null;		String sql="";		try{			sql="select  max(uid) from tbl_user where usertype=0";			rs=dbconn.executeQuery(sql);			rs.next();			int id=rs.getInt(1);			if(id>0)pid=id;			sql="select  max(uid) from tbl_user where usertype=1";			rs=dbconn.executeQuery(sql);			rs.next();			id=rs.getInt(1);			if(id>0)eid=id;		}catch(Exception e){			System.out.println(e+",sql="+sql);		}finally{			try{				if(rs!=null)rs.close();				if(dbconn!=null)dbconn.close();			}catch(Exception e){				System.out.println(e);			}		}	}	public synchronized int getpid()	{		pid=pid+1;		return pid;	}	public synchronized int geteid()	{		eid=eid+1;		return eid;	}}

⌨️ 快捷键说明

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