管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-12-29 1d53dd8f501a98ddcce8146443b51b357ef5f9b1
src/main/java/com/lf/server/mapper/sys/UserMapper.java
@@ -1,5 +1,6 @@
package com.lf.server.mapper.sys;
import com.lf.server.entity.sys.RoleEntity;
import com.lf.server.entity.sys.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@@ -26,7 +27,7 @@
     * 分页查询
     *
     * @param uname  用戶名
     * @param limit  记录表
     * @param limit  记录数
     * @param offset 偏移量
     * @return 列表
     */
@@ -41,6 +42,38 @@
    public UserEntity selectByToken(String token);
    /**
     * 查询是/否为Admin
     *
     * @param id ID
     * @return 统计数
     */
    public Integer selectForIsAdmin(Integer id);
    /**
     * 查询管理员用户
     *
     * @param type 管理员类别
     * @return
     */
    public List<UserEntity> selectAdminUsers(Integer type);
    /**
     * 根据用户ID查询角色
     *
     * @param id 用户ID
     * @return 角色集合
     */
    public List<RoleEntity> selectRoleByUserId(Integer id);
    /**
     * 根据角色查询用户
     *
     * @param roleId 角色ID
     * @return 用户集合
     */
    public List<UserEntity> selectUserByRoleId(Integer roleId);
    /**
     * 插入一条
     *
     * @param userEntity