zxl
2026-03-25 d1dfb6e35f38e27fd960dc3ad0130c8d0f5c39bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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.SysUserVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
@Mapper
public interface SysUserVOMapper extends BaseMapper<SysUserVO> {
 
    @Select("select su.*, sr.id roleId, sr.role_name roleName, sd.id departId, sd.depart_name departName from sys_user su left join sys_user_role sur on su.id = sur.user_id left join sys_role sr on sur.role_id = sr.id left join sys_user_depart sud on sud.user_id = su.id left join sys_depart sd on sud.dep_id = sd.id ${ew.customSqlSegment}")
    IPage<SysUserVO> tables(Page<SysUserVO> page, @Param("ew") QueryWrapper<SysUserVO> queryWrapper);
 
    @Delete("delete from sys_user where org_code like concat(#{orgCode}, '%')")
    void physicalRemove(@Param("orgCode") String orgCode);
}