34 lines
731 B
Java
34 lines
731 B
Java
package com.greenorange.promotion.mapper;
|
||
|
||
import com.greenorange.promotion.model.entity.UserInfo;
|
||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||
|
||
import java.util.List;
|
||
|
||
/**
|
||
* @author 35880
|
||
* @description 针对表【user_info(用户基本信息表)】的数据库操作Mapper
|
||
* @createDate 2025-04-24 11:47:37
|
||
* @Entity com.greenorange.promotion.model.entity.UserInfo
|
||
*/
|
||
public interface UserInfoMapper extends BaseMapper<UserInfo> {
|
||
|
||
|
||
/**
|
||
* 查询从 userId 一路到根节点的所有 id,按 depth 倒序(根先出)
|
||
*/
|
||
List<Long> findPathToRoot(Long userId);
|
||
|
||
|
||
/**
|
||
* 查询当前用户的所有下级用户(包括间接)
|
||
*/
|
||
List<Long> findAllSubUser(Long userId);
|
||
|
||
|
||
}
|
||
|
||
|
||
|
||
|