|
@@ -5103,14 +5103,30 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
|
|
|
//是否校验密码
|
|
|
if (ObjectUtils.isNotNull(bo.getPasswordSign()) && bo.getPasswordSign() == 1){
|
|
|
- if (!bo.getPassword().equals(EncryptHandler.decrypt(user.getPassword()))){
|
|
|
- throw new CustomException("用户账号密码有误!");
|
|
|
+ String password = null;
|
|
|
+ if(bo.getPassword().length()>20){
|
|
|
+ String rsaPrivate = null;
|
|
|
+ try {
|
|
|
+ InputStream certStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("config/pri.key");
|
|
|
+ rsaPrivate = AES.getStringByInputStream_1(certStream);
|
|
|
+ certStream.close();
|
|
|
+ password = AES.decrypt(bo.getPassword(),rsaPrivate);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ password = bo.getPassword();
|
|
|
+ }
|
|
|
+ if (!SecurityUtils.matchesPassword(password,user.getPassword()))
|
|
|
+ {
|
|
|
+ throw new BaseException("登录信息密码错误");
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
List<UserOrderGoodsListVo> goodsList = baseMapper.getUserOrderGoodsList(user.getUserId());
|
|
|
- if (CollectionUtils.isEmpty(goodsList)) {
|
|
|
- return null;
|
|
|
+ if (CollectionUtils.isNotEmpty(goodsList)) {
|
|
|
+ vo.setGoodsNames(goodsList.stream().limit(3).map(UserOrderGoodsListVo::getCategoryName).collect(Collectors.toList()));
|
|
|
}
|
|
|
|
|
|
//缓存用户信息key
|
|
@@ -5122,7 +5138,6 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
String pcUrl = String.format("%s%s/person-center/my-course?skipPort=%s", URL_PREFIX, sysTenant.getHostPc(), key);
|
|
|
vo.setH5Url(h5Url);
|
|
|
vo.setPcUrl(pcUrl);
|
|
|
- vo.setGoodsNames(goodsList.stream().limit(3).map(UserOrderGoodsListVo::getCategoryName).collect(Collectors.toList()));
|
|
|
UserPhoneBo phoneBo = new UserPhoneBo();
|
|
|
phoneBo.setTelphone(bo.getTelphone());
|
|
|
phoneBo.setTenantId(tenantId);
|