|
|
@@ -1,19 +1,24 @@
|
|
|
package cn.iocoder.yudao.module.rd.dal.mysql.researchProject;
|
|
|
+
|
|
|
+import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission;
|
|
|
+import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
@Mapper
|
|
|
+@DataPermission(enable = false) // ⭐ 跳过数据权限
|
|
|
+ // ⭐ 跳过多租户(如果类上能加的话)
|
|
|
public interface ApproverQueryMapper {
|
|
|
|
|
|
+ @TenantIgnore
|
|
|
@Select("SELECT u.id FROM system_users u " +
|
|
|
"JOIN system_user_role ur ON ur.user_id = u.id " +
|
|
|
"JOIN system_role r ON r.id = ur.role_id " +
|
|
|
"WHERE r.code = #{roleCode} AND u.deleted = 0 LIMIT 1")
|
|
|
Long selectUserIdByRoleCode(@Param("roleCode") String roleCode);
|
|
|
|
|
|
+ @TenantIgnore
|
|
|
@Select("SELECT u.id FROM system_users u " +
|
|
|
"JOIN system_user_role ur ON ur.user_id = u.id " +
|
|
|
"JOIN system_role r ON r.id = ur.role_id " +
|
|
|
@@ -21,4 +26,4 @@ public interface ApproverQueryMapper {
|
|
|
Long selectUserIdByRoleCodeAndDept(@Param("roleCode") String roleCode,
|
|
|
@Param("deptId") Long deptId);
|
|
|
|
|
|
-}
|
|
|
+}
|