UsersMapper.java package org.jxnd.mapper;import java.util.List;import org.apache.ibatis.annotations.Param;import org.apache.ibatis.annotations.Select;import org.jxnd.bean.Systems;import org.jxnd.bean.Users;public interface UsersMapper {//根据
package org.jxnd.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.jxnd.bean.Systems; import org.jxnd.bean.Users; public interface UsersMapper { //根据用户名和密码查询用户信息 @Select("select * from users where uname=#{uname} and upassword=#{upassword}") Users getUserByNameAndPwd(@Param("uname")String uname,@Param("upassword")String upassword); //查询角色所有权限 @Select("select * from systems where id in(select sid from rolesystems where rid=#{rid})") ListgetSystemsByRid(int rid); }