xiangpei
2025-05-14 47cd9ecc0eff38ffe6b3b794b2bf197e958f4403
src/main/java/com/mindskip/xzs/repository/UserMapper.java
@@ -1,8 +1,14 @@
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.other.KeyValue;
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;
@@ -27,6 +33,7 @@
     * @return User
     */
    User getUserById(Integer id);
    User getUserInfoById(Integer id);
    /**
     * getUserByUserName
@@ -75,7 +82,7 @@
     * @param requestVM requestVM
     * @return List<User>
     */
    List<User> userPage(UserPageRequestVM requestVM);
    List<UserResponseVM> userPage(UserPageRequestVM requestVM);
    /**
@@ -128,4 +135,56 @@
    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(List<Integer> userIds);
    List<Integer> getDeptAdminIds(@Param("userId") Integer userId);
    List<Department> getDeptAdmins(List<Integer> ids);
    User getUserByExamByTemplateId(ExamPaper examPaper);
    List<Integer> getDeptIds(@Param("userId") Integer userId);
    List<User> getFailExamUser(Integer examPaperId);
    List<User> getFailTemplateUser(Integer templateId);
    /**
     * 获取用户管理的部门信息
     *
     * @param userId
     * @return
     */
    List<Department> getDeptAdminIdAndInfo(@Param("userId") Integer userId);
}