zxl
2026-03-23 74af7e7e3ee39e25f73525391b13face373e350e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.tievd.jyz.mapper;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tievd.jyz.entity.vo.SysDepartVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
@Mapper
public interface SysDepartVOMapper extends BaseMapper<SysDepartVO> {
 
    /**
     * 自定义查询
     * @param page
     * @param queryWrapper
     * @return
     */
    @Select("select a.*, sd.depart_name parentName from (select * from sys_depart ${ew.customSqlSegment}) a left join sys_depart sd on a.parent_id = sd.id")
    IPage<SysDepartVO> tables(Page page, @Param("ew") QueryWrapper queryWrapper);
}