zy-asrs-wcs/src/main/resources/mapper/sys/UserRoleMapper.xml
@@ -2,4 +2,14 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.zy.asrs.wcs.sys.mapper.UserRoleMapper"> <select id="selectByUserId" resultType="com.zy.asrs.wcs.sys.entity.Role"> SELECT * FROM sys_role WHERE role_id IN ( SELECT role_id FROM sys_user_role WHERE user_id = #{userId} ) AND deleted = 0 </select> </mapper>