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 { @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 tables(Page page, @Param("ew") QueryWrapper queryWrapper); @Delete("delete from sys_user where org_code like concat(#{orgCode}, '%')") void physicalRemove(@Param("orgCode") String orgCode); }