package cn.wisenergy.mapper; import cn.wisenergy.model.app.Users; import cn.wisenergy.model.dto.UsersInfoDto; import cn.wisenergy.model.vo.UserVo; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; /** * @author 86187 * @ Description: * @ Author : 86187 * @ Date : 2021/1/6 15:32 */ @Mapper public interface UsersMapper extends BaseMapper { /** * 添加 * * @param users 用户信息 * @return 用户信息 */ int add(Users users); /** * 编辑 * * @param users 用户信息 * @return 修改是否成功 */ int edit(Users users); /** * 删除 * * @param id 用户id * @return 删除是否成功 */ int delById(@Param("id") Integer id); Users getById(@Param("id") Long id); /** * 获取所有用户的下一级信息 * @param parentId 父id * @return */ List getLastUser(@Param("parentId") Integer parentId); /** * 向下最深层级层级数 * @param id 用户id * @return 层级数 */ Double getDownLevel(@Param("id") Long id,@Param("userId") Long userId); /** * 伞下人员总和 * @param id 用户id * @return 伞下人员总和 */ Integer getTotal(@Param("id") Long id); /*************** chenqi****************/ List getDownUsersById(Long userId); UsersInfoDto getUsersById(Long userId); }