|
@@ -24,9 +24,7 @@ public class WholesaleUserServiceImpl extends ServiceImpl<WholesaleUserMapper, W
|
|
|
throw new BusinessRuntimeException("用户不存在.");
|
|
throw new BusinessRuntimeException("用户不存在.");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- String encodePasscode = Codec.DoDigest.custom().setAlgorithm(Codec.DoDigest.Algorithm.SHA256).setStringData(password).toBase64String();
|
|
|
|
|
-
|
|
|
|
|
- if (!StringUtils.equals(wholesaleUser.getPassword(), encodePasscode)) {
|
|
|
|
|
|
|
+ if (!StringUtils.equals(wholesaleUser.getPassword(), password)) {
|
|
|
throw new BusinessRuntimeException("密码有误.");
|
|
throw new BusinessRuntimeException("密码有误.");
|
|
|
}
|
|
}
|
|
|
wholesaleUser.setPassword(null);
|
|
wholesaleUser.setPassword(null);
|
|
@@ -43,8 +41,9 @@ public class WholesaleUserServiceImpl extends ServiceImpl<WholesaleUserMapper, W
|
|
|
wholesaleUser = new WholesaleUser();
|
|
wholesaleUser = new WholesaleUser();
|
|
|
wholesaleUser.setWholesaleId(wholesaleId);
|
|
wholesaleUser.setWholesaleId(wholesaleId);
|
|
|
wholesaleUser.setUsername(username);
|
|
wholesaleUser.setUsername(username);
|
|
|
- String encodePasscode = Codec.DoDigest.custom().setAlgorithm(Codec.DoDigest.Algorithm.SHA256).setStringData(password).toBase64String();
|
|
|
|
|
- wholesaleUser.setPassword(encodePasscode);
|
|
|
|
|
|
|
+ wholesaleUser.setPassword(password);
|
|
|
|
|
+ //String encodePasscode = Codec.DoDigest.custom().setAlgorithm(Codec.DoDigest.Algorithm.SHA256).setStringData(password).toBase64String();
|
|
|
|
|
+ //wholesaleUser.setPassword(encodePasscode);
|
|
|
baseMapper.insert(wholesaleUser);
|
|
baseMapper.insert(wholesaleUser);
|
|
|
return wholesaleUser;
|
|
return wholesaleUser;
|
|
|
}
|
|
}
|