管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-02-03 9bce48a9f30f7d80c43f43f46d40df20fcb00e15
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 列表
     */
@@ -39,6 +40,38 @@
     * @return
     */
    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);
    /**
     * 插入一条
@@ -124,4 +157,14 @@
     * @return
     */
    public List<UserEntity> selectByPageForRole(String uname, Integer roleid, Integer depid, Integer limit, Integer offset);
    /**
     * 更新多个用户密码
     *
     * @param updateUser
     * @param pwd
     * @param ids
     * @return
     */
    public Integer updateUsersPwd(Integer updateUser, String pwd, List<Integer> ids);
}