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
173
174
175
176
177
178
179
180
181
package com.mindskip.xzs.repository;
 
import com.mindskip.xzs.domain.Department;
import com.mindskip.xzs.domain.ExamPaper;
import com.mindskip.xzs.domain.ExamPaperAnswer;
import com.mindskip.xzs.domain.User;
import com.mindskip.xzs.domain.other.KeyValue;
import com.mindskip.xzs.domain.vo.UpdateDeptAdminVO;
import com.mindskip.xzs.viewmodel.admin.paper.ExamPaperGradeQuery;
import com.mindskip.xzs.viewmodel.admin.user.UserPageRequestVM;
import com.mindskip.xzs.viewmodel.admin.user.UserResponseVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
import java.util.Map;
 
 
@Mapper
public interface UserMapper extends BaseMapper<User> {
 
    /**
     * getAllUser
     *
     * @return List<User>
     */
    List<User> getAllUser();
 
    /**
     * getUserById
     *
     * @param id id
     * @return User
     */
    User getUserById(Integer id);
 
    /**
     * getUserByUserName
     *
     * @param username username
     * @return User
     */
    User getUserByUserName(String username);
 
    /**
     * getUserByUserNamePwd
     *
     * @param username username
     * @param pwd      pwd
     * @return User
     */
    User getUserByUserNamePwd(@Param("username") String username, @Param("pwd") String pwd);
 
    /**
     * getUserByUuid
     *
     * @param uuid uuid
     * @return User
     */
    User getUserByUuid(String uuid);
 
    /**
     * userPageList
     *
     * @param map userPageList
     * @return List<User>
     */
    List<User> userPageList(Map<String, Object> map);
 
 
    /**
     * userPageCount
     *
     * @param map map
     * @return Integer
     */
    Integer userPageCount(Map<String, Object> map);
 
 
    /**
     * @param requestVM requestVM
     * @return List<User>
     */
    List<UserResponseVM> userPage(UserPageRequestVM requestVM);
 
 
    /**
     * insertUser
     *
     * @param user user
     */
    void insertUser(User user);
 
    /**
     * insertUsers
     *
     * @param users users
     */
    void insertUsers(List<User> users);
 
    /**
     * updateUser
     *
     * @param user user
     */
    void updateUser(User user);
 
    /**
     * updateUsersAge
     *
     * @param map map
     */
    void updateUsersAge(Map<String, Object> map);
 
    /**
     * deleteUsersByIds
     *
     * @param ids ids
     */
    void deleteUsersByIds(List<Integer> ids);
 
    /**
     * insertUserSql
     *
     * @param user user
     */
    void insertUserSql(User user);
 
    Integer selectAllCount();
 
    List<KeyValue> selectByUserName(String userName);
 
    List<User> selectByIds(List<Integer> ids);
 
 
    User selectByWxOpenId(@Param("wxOpenId") String wxOpenId);
 
    User selectByIdName(@Param("id") Integer id, @Param("userName") String userName);
 
    List<User> getUserByLevel(@Param("userLevel") Integer userLevel);
 
    User getUserByRealName(@Param("realName") String realName);
 
    /**
     * 修改部门管理员标识
     * @param ids
     * @param deptAdmin
     */
    void updateDeptAdmin(@Param("ids") List<Integer> ids, @Param("deptAdmin") String deptAdmin, @Param("deptId") Integer deptId);
 
 
    List<ExamPaperAnswer> getUserByDept(@Param("query") ExamPaperGradeQuery query);
 
    void setStatus(User user);
 
    /**
     * 清除某部门的用户管理员标识
     *
     * @param userIds
     * @param deptId
     */
    void clearDeptAdmin(List<Integer> userIds, @Param("deptId") Integer deptId);
 
    User getUserByExam(ExamPaper examPaper);
 
    void updateUserDeptAdmin(UpdateDeptAdminVO form);
 
    void cancelUserDeptAdmin(UpdateDeptAdminVO form);
 
    List<Integer> getDeptAdminIds(Integer id);
 
    List<Department> getDeptAdmins(Integer id);
 
    User getUserByExamByTemplateId(ExamPaper examPaper);
 
    List<Integer> getDeptIds(@Param("userId") Integer userId);
 
    List<User> getFailExamUser(Integer examPaperId);
 
    List<User> getFailTemplateUser(Integer templateId);
}