使用oracle做的数据上传系统后台
kongdeqiang
2026-03-21 b63977ec7120e8d5f8e5b7d1ac9b85be76ad62a8
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.example.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
import java.util.List;
 
@Mapper
public interface UserMapper extends BaseMapper<User> {
 
    @Select("SELECT u.*, d.dept_name FROM sys_user u LEFT JOIN sys_department d ON u.dept_code = d.dept_code WHERE u.deleted = 0 AND u.id = #{id}")
    User selectUserWithDeptById(@Param("id") Long id);
 
    IPage<User> selectUserPage(Page<User> page, @Param("username") String username, @Param("realName") String realName, @Param("deptCode") String deptCode, @Param("permissionDeptCodes") List<String> permissionDeptCodes);
 
    @Select("SELECT * FROM sys_user WHERE deleted = 0 AND dept_code = #{deptCode}")
    List<User> selectByDeptCode(@Param("deptCode") String deptCode);
}