一、ISmbmsUserDao层
//根据姓名模糊查询 public ListgetUser(); //多条件查询 public List getLikeUser(@Param("userName") String userName , @Param("userCode") String userCode );
二、小配置文件 ISmbmsUserDao.xml
三、测试类
//根据姓名模糊查询 /*ListgetUser=sqlSession.selectList("getUser","马"); for (Smbms users:getUser) { System.out.println(users.getUserName()); }*/ //多条件查询 ISmbmsUserDao mapper=sqlSession.getMapper(ISmbmsUserDao.class); List getUser=mapper.getLikeUser("马","yuan"); for (Smbms users:getUser) { System.out.println(users.getUserName()+"================="+users.getUserpwd()); }