提交 f82cbd4c 编写于 作者: Dichotomy_'s avatar Dichotomy_

Merge branch 'dev' of https://gitee.com/minsim/pig into dev

......@@ -22,7 +22,7 @@
| Spring Cloud Alibaba | 2021.1 |
| Spring Security OAuth2 | 2.3.6 |
| Mybatis Plus | 3.4.3 |
| hutool | 5.7.6 |
| hutool | 5.7.7 |
| Avue | 2.6.18 |
### 模块说明
......
......@@ -17,6 +17,7 @@
package com.pig4cloud.pig.gateway.filter;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
......@@ -121,12 +122,9 @@ public class ValidateCodeGatewayFilter extends AbstractGatewayFilterFactory<Obje
Object codeObj = redisTemplate.opsForValue().get(key);
if (codeObj == null) {
throw new ValidateCodeException("验证码不合法");
}
redisTemplate.delete(key);
if (!code.equals(codeObj)) {
if (ObjectUtil.isEmpty(codeObj) || !code.equals(codeObj)) {
throw new ValidateCodeException("验证码不合法");
}
}
......
......@@ -166,6 +166,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Override
@CacheEvict(value = CacheConstants.USER_DETAILS, key = "#userDto.username")
@Transactional(rollbackFor = Exception.class)
public Boolean updateUser(UserDTO userDto) {
SysUser sysUser = new SysUser();
BeanUtils.copyProperties(userDto, sysUser);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册