|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.system.mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.entity.Role; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.entity.UserRole; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Param; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | @Repository | 
|---|
|  |  |  | public interface UserRoleMapper extends BaseMapper<UserRole> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<Role> selectByUserId(@Param("userId") Long userId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | package com.zy.asrs.wms.system.mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.InterceptorIgnore; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.entity.Role; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.entity.UserRole; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Param; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | @Repository | 
|---|
|  |  |  | public interface UserRoleMapper extends BaseMapper<UserRole> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @InterceptorIgnore(tenantLine = "true") // 忽略多租户拦截器 | 
|---|
|  |  |  | List<Role> selectByUserId(@Param("userId") Long userId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|