Merge remote-tracking branch 'origin/dev' into 4.X
This commit is contained in:
commit
8f34644692
@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.exc.MismatchedInputException;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -78,6 +79,9 @@ public class JsonUtils {
|
||||
}
|
||||
try {
|
||||
return OBJECT_MAPPER.readValue(text, OBJECT_MAPPER.getTypeFactory().constructType(Dict.class));
|
||||
} catch (MismatchedInputException e) {
|
||||
// 类型不匹配说明不是json
|
||||
return null;
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@ -62,6 +62,9 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
|
||||
successNum++;
|
||||
successMsg.append("<br/>").append(successNum).append("、账号 ").append(user.getUserName()).append(" 导入成功");
|
||||
} else if (isUpdateSupport) {
|
||||
Long userId = user.getUserId();
|
||||
user = BeanUtil.toBean(userVo, SysUser.class);
|
||||
user.setUserId(userId);
|
||||
ValidatorUtils.validate(user);
|
||||
user.setUpdateBy(operName);
|
||||
userService.updateUser(user);
|
||||
|
Loading…
x
Reference in New Issue
Block a user