| | |
| | | package com.mes.userinfo.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.common.utils.JwtUtil; |
| | | import com.mes.common.utils.RedisUtil; |
| | | import com.mes.common.utils.UserInfoUtils; |
| | | import com.mes.entity.request.GeneralRequest; |
| | | import com.mes.menu.mapper.SysMenuMapper; |
| | |
| | | import com.mes.userinfo.mapper.SysUserRoleMapper; |
| | | import com.mes.userinfo.service.SysUserRoleService; |
| | | import com.mes.userinfo.service.SysUserService; |
| | | import com.mes.utils.RedisUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.security.authentication.AuthenticationManager; |
| | | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; |
| | | import org.springframework.security.core.Authentication; |
| | |
| | | |
| | | @Resource |
| | | BCryptPasswordEncoder passwordEncoder; |
| | | @Autowired |
| | | @Resource |
| | | private SysUserRoleMapper sysUserRoleMapper; |
| | | |
| | | @Override |
| | |
| | | public String saveUser(SysUserVO user) { |
| | | log.info("保存用户信息"); |
| | | // 默认密码 |
| | | String password = passwordEncoder.encode(Const.DEFULT_PASSWORD); |
| | | String password = passwordEncoder.encode(user.getPassword()); |
| | | user.setPassword(password); |
| | | SysUser sysUser = new SysUser(); |
| | | BeanUtils.copyProperties(user, sysUser); |