|
|
@ -17,6 +17,7 @@ |
|
|
|
|
|
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
@ -29,6 +30,7 @@ import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.dao.OperUserDao; |
|
|
|
import com.epmet.dto.OperUserDTO; |
|
|
|
import com.epmet.dto.PasswordDTO; |
|
|
|
import com.epmet.entity.OperUserEntity; |
|
|
|
import com.epmet.entity.UserEntity; |
|
|
|
import com.epmet.feign.OperRoleUserFeignClient; |
|
|
@ -40,6 +42,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
@ -142,4 +145,16 @@ public class OperUserServiceImpl extends BaseServiceImpl<OperUserDao, OperUserEn |
|
|
|
return operUserDao.selectOperUserInfoById(id); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void updatePwd(String userId, PasswordDTO dto) { |
|
|
|
OperUserEntity param = new OperUserEntity(); |
|
|
|
param.setUserId(userId); |
|
|
|
param.setPassword(PasswordUtils.encode(dto.getNewPassword())); |
|
|
|
param.setUpdatedTime(new Date()); |
|
|
|
param.setUpdatedBy(userId); |
|
|
|
LambdaQueryWrapper<OperUserEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
lambdaQueryWrapper.eq(OperUserEntity::getUserId,userId); |
|
|
|
baseDao.update(param, lambdaQueryWrapper); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|