mrzhssss
2021-12-07 591c676bdd4a3f016fe060e69ff3c1711043bdd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package zy.cloud.wms.system.mapper;
 
import com.baomidou.mybatisplus.mapper.BaseMapper;
import zy.cloud.wms.system.entity.Resource;
import zy.cloud.wms.system.entity.RoleResource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
 
import java.util.List;
 
@Mapper
@Repository
public interface RoleResourceMapper extends BaseMapper<RoleResource> {
 
    @Select("select sr.* from sys_resource sr left join sys_role_resource srr on srr.resource_id = sr.id left join sys_user su on su.role_id = srr.role_id where 1 = 1 and su.id = #{userId} and sr. level = 3 and sr.resource_id = #{fatherResourceId} and sr. status = 1 order by sr.sort")
    List<Resource> getMenuButtomResource(@Param("fatherResourceId") Long fatherResourceId, @Param("userId") Long userId);
 
}