package dao.impl;
import java.util.List;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import org.apache.catalina.User;
import bean.UserInfo;
import bean.Users;
import dao.IUserDao;
import tools.DBTools;
public class UserDaoImpl implements IUserDao{
@Override
public Users getUserByNameAndPwd(String name, String pwd) {
String sql="select users.name as users_name,users.pwd as users_pwd,users.id as users_id, users.roleid as users_roleid,roles.id as roles_id,roles.name as roles_name from users,roles where users.name=? and users.pwd=? and users.roleid=roles.id";
List