1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package org.jeecg.modules.dnc.mapper;
 
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.dnc.entity.PermissionStreamNew;
import org.jeecg.modules.dnc.entity.ProductMix;
 
import java.util.List;
 
public interface PermissionStreamNewMapper extends BaseMapper<PermissionStreamNew> {
 
    /**
     * 根据用户id与部门列表获取结构树权限
     * @param userId
     * @return
     */
    List<ProductMix> loadProductMix(@Param("userId") String userId,@Param("productIdList")List<String> productIdList);
 
    /**
     * 根据用户id、部门列表、id、业务类型获取对应结构树权限
     * @param userId
     * @param productIdList
     * @param businessId
     * @param businessType
     * @return
     */
    @InterceptorIgnore(
            tenantLine = "true",   // 忽略多租户条件
            blockAttack = "true", // 绕过全表操作检查
            illegalSql = "true"   // 禁用 SQL 注入检查
    )
    List<ProductMix> loadProductMixByBusinessId(@Param("userId") String userId,@Param("productIdList")List<String> productIdList,
                                                @Param("businessId")String businessId,@Param("businessType")String businessType);
 
    /**
     * 管理员获取所有权限
     * @return
     */
    List<ProductMix> loadProductMixAll(String userId);
}