|
@@ -25,6 +25,7 @@ import com.fdkankan.manage.vo.request.UserParam;
|
|
|
import com.fdkankan.manage.vo.response.ManageLoginResponse;
|
|
|
import com.fdkankan.manage.vo.response.UserVo;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -44,6 +45,7 @@ import java.util.stream.Collectors;
|
|
|
* @since 2022-06-16
|
|
|
*/
|
|
|
@Service
|
|
|
+@Slf4j
|
|
|
public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements IUserService {
|
|
|
|
|
|
@Autowired
|
|
@@ -168,17 +170,21 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public synchronized void addUcenterUser(UserParam param) {
|
|
|
- if( StringUtils.isBlank(param.getPassword())
|
|
|
- || StringUtils.isBlank(param.getRyId()) || StringUtils.isBlank(param.getRyNo())){
|
|
|
+ if( StringUtils.isBlank(param.getRyId()) || StringUtils.isBlank(param.getRyNo())){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
- if("jm".equals(manageConfig.getEnvironment())){
|
|
|
- String password = AesUtil.desEncrypt(param.getPassword());
|
|
|
- if(StringUtils.isBlank(password)){
|
|
|
- throw new BusinessException(ResultCode.PASSWORD_ERROR_G);
|
|
|
+ if(StringUtils.isNotBlank(param.getPassword())){
|
|
|
+ try {
|
|
|
+ String password = AesUtil.desEncrypt(param.getPassword());
|
|
|
+ if(StringUtils.isBlank(password)){
|
|
|
+ throw new BusinessException(ResultCode.PASSWORD_ERROR_G);
|
|
|
+ }
|
|
|
+ String passwordMd52 = SecurityUtil.MD52(password);
|
|
|
+ param.setPassword(passwordMd52);
|
|
|
+ }catch (Exception e){
|
|
|
+ log.info("解密失败:{}",param.getPassword());
|
|
|
}
|
|
|
- String passwordMd52 = SecurityUtil.MD52(password);
|
|
|
- param.setPassword(passwordMd52);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
JyUser jyUser = jyUserService.getByRyId(param.getRyId());
|