Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into 4.X
Browse files Browse the repository at this point in the history
  • Loading branch information
JavaLionLi committed Sep 13, 2022
2 parents d2774d3 + 7135a91 commit 8f34644
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
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;
Expand Down Expand Up @@ -78,6 +79,9 @@ public static Dict parseMap(String text) {
}
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public void invoke(SysUserImportVo userVo, AnalysisContext context) {
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);
Expand Down

0 comments on commit 8f34644

Please sign in to comment.