月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-06-02 c31e03f0e51214a524d3fc34d30f3459698ff625
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
package com.moon.server.mapper.sys;
 
import com.moon.server.entity.sys.RoleEntity;
import com.moon.server.entity.sys.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
 
import java.util.List;
 
/**
 * 用户管理
 * @author sws
 * @date 2022-09-27
 */
@Mapper
@Repository
public interface UserMapper {
    /**
     * 查询记录数
     *
     * @param uname   用户名
     * @param depcode 单位编码
     * @return 记录数
     */
    public Integer selectCount(String uname, String depcode);
 
    /**
     * 分页查询
     *
     * @param uname   用戶名
     * @param depcode 单位编码
     * @param limit   记录数
     * @param offset  偏移量
     * @return 列表
     */
    public List<UserEntity> selectByPage(String uname, String depcode, Integer limit, Integer offset);
 
    /**
     * 根据token有效期查询
     *
     * @param token
     * @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);
 
    /**
     * 插入一条
     *
     * @param userEntity
     * @return
     */
    public Integer insertUser(UserEntity userEntity);
 
    /**
     * 插入多条
     *
     * @param userEntity
     * @return
     */
    public Integer insertUsers(List<UserEntity> userEntity);
 
    /**
     * 删除一条
     *
     * @param id
     * @return
     */
    public Integer deleteUser(int id);
 
    /**
     * 删除多条
     *
     * @param ids
     * @return
     */
    public Integer deleteUsers(List<Integer> ids);
 
    /**
     * 更新一条
     *
     * @param userEntity
     * @return
     */
    public Integer updateUser(UserEntity userEntity);
 
    /**
     * 查询单条数据
     *
     * @param id
     * @return
     */
    public UserEntity selectUser(int id);
 
    /**
     * 根据uid查询
     *
     * @param uid
     * @return
     */
    public UserEntity selectByUid(String uid);
 
    /**
     * 查询所有
     *
     * @return
     */
    public List<UserEntity> selectUserAll();
 
    /**
     * 根据角色+单位查询记录数
     *
     * @param uname
     * @param roleid
     * @param depcode
     * @return
     */
    public Integer selectCountForRole(String uname, Integer roleid, String depcode);
 
    /**
     * 根据角色+单位分页查询
     *
     * @param uname
     * @param roleid
     * @param depcode
     * @param limit
     * @param offset
     * @return
     */
    public List<UserEntity> selectByPageForRole(String uname, Integer roleid, String depcode, Integer limit, Integer offset);
 
    /**
     * 更新多个用户密码
     *
     * @param updateUser
     * @param pwd
     * @param ids
     * @return
     */
    public Integer updateUsersPwd(Integer updateUser, String pwd, List<Integer> ids);
}