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.core.mapper.BaseMapper;
 
import org.jeecg.modules.dnc.dto.ComponentExt;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.dnc.entity.ComponentInfo;
 
import java.util.List;
 
public interface ComponentInfoMapper extends BaseMapper<ComponentInfo> {
    /**
     * 获取所有的部件父子关系
     * @return
     */
    List<ComponentExt> findExtAll();
    /**
     * 根据用户id获取部件信息
     * @param userId
     * @return
     */
    List<ComponentExt> getByUserPerms(@Param("userId") String userId);
 
    /**
     * 根据用户id获取部件信息 向上查询父
     * @param userId
     * @return
     */
    List<ComponentExt> getByUserPermsAs(@Param("userId") String userId);
    /**
     * 根据父节点查询所有子节点数据
     * @return
     */
    List<ComponentExt> findByParentId(@Param("parentId") String parentId);
    /**
     * 根据用户id及父节点id获取部件信息
     * @return
     */
    List<ComponentExt> getByParentIdAndUserPerms(@Param("parentId") String parentId, @Param("userId") String userId);
 
}