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 { /** * getAllUser * * @return List */ List 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 */ List userPageList(Map map); /** * userPageCount * * @param map map * @return Integer */ Integer userPageCount(Map map); /** * @param requestVM requestVM * @return List */ List userPage(UserPageRequestVM requestVM); /** * insertUser * * @param user user */ void insertUser(User user); /** * insertUsers * * @param users users */ void insertUsers(List users); /** * updateUser * * @param user user */ void updateUser(User user); /** * updateUsersAge * * @param map map */ void updateUsersAge(Map map); /** * deleteUsersByIds * * @param ids ids */ void deleteUsersByIds(List ids); /** * insertUserSql * * @param user user */ void insertUserSql(User user); Integer selectAllCount(); List selectByUserName(String userName); List selectByIds(List ids); User selectByWxOpenId(@Param("wxOpenId") String wxOpenId); User selectByIdName(@Param("id") Integer id, @Param("userName") String userName); List getUserByLevel(@Param("userLevel") Integer userLevel); User getUserByRealName(@Param("realName") String realName); /** * 修改部门管理员标识 * @param ids * @param deptAdmin */ void updateDeptAdmin(@Param("ids") List ids, @Param("deptAdmin") String deptAdmin, @Param("deptId") Integer deptId); List getUserByDept(@Param("query") ExamPaperGradeQuery query); void setStatus(User user); /** * 清除某部门的用户管理员标识 * * @param userIds * @param deptId */ void clearDeptAdmin(List userIds, @Param("deptId") Integer deptId); User getUserByExam(ExamPaper examPaper); void updateUserDeptAdmin(UpdateDeptAdminVO form); void cancelUserDeptAdmin(UpdateDeptAdminVO form); List getDeptAdminIds(Integer id); List getDeptAdmins(Integer id); User getUserByExamByTemplateId(ExamPaper examPaper); List getDeptIds(@Param("userId") Integer userId); }