| | |
| | | package com.ycl.jxkg.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.qiniu.util.Md5; |
| | | import com.ycl.jxkg.domain.entity.UserEventLog; |
| | | import com.ycl.jxkg.domain.form.UpdatePwdForm; |
| | | import com.ycl.jxkg.enums.RoleEnum; |
| | | import com.ycl.jxkg.enums.UserStatusEnum; |
| | | import com.ycl.jxkg.domain.form.RegisterForm; |
| | | import com.ycl.jxkg.domain.other.KeyValue; |
| | | import com.ycl.jxkg.domain.vo.StudentVO; |
| | | import com.ycl.jxkg.enums.general.YesOrNoEnum; |
| | | import com.ycl.jxkg.event.UserEvent; |
| | | import com.ycl.jxkg.exception.BusinessException; |
| | | import com.ycl.jxkg.domain.entity.User; |
| | | import com.ycl.jxkg.event.OnRegistrationCompleteEvent; |
| | | import com.ycl.jxkg.mapper.UserMapper; |
| | | import com.ycl.jxkg.service.AuthenticationService; |
| | | import com.ycl.jxkg.service.UserService; |
| | | import com.ycl.jxkg.domain.vo.admin.user.UserPageRequestVO; |
| | | import com.github.pagehelper.PageHelper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.*; |
| | | |
| | | |
| | |
| | | |
| | | private final UserMapper userMapper; |
| | | private final ApplicationEventPublisher eventPublisher; |
| | | private final AuthenticationService authenticationService; |
| | | |
| | | |
| | | public List<User> getUsers() { |
| | |
| | | public List<StudentVO> classesStudent(Integer classesId) { |
| | | return userMapper.classesStudent(classesId); |
| | | } |
| | | |
| | | @Override |
| | | public void updatePassword(UpdatePwdForm form) { |
| | | new LambdaUpdateChainWrapper<>(baseMapper) |
| | | .eq(User::getId, form.getUserId()) |
| | | .set(User::getPassword, authenticationService.pwdEncode(form.getNewPassword())) |
| | | .set(User::getNeedUpdatePassword, YesOrNoEnum.NO) |
| | | .set(User::getLastUpdatePasswordTime, new Date()) |
| | | .update(); |
| | | } |
| | | } |