mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-04-25 13:08:35 +08:00
update 优化 excel导入 适配异常结构
This commit is contained in:
@@ -80,7 +80,11 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、账号 " + userVo.getUserName() + " 导入失败:";
|
||||
failureMsg.append(msg).append(e.getMessage());
|
||||
String message = e.getMessage();
|
||||
if (e instanceof ConstraintViolationException cvException) {
|
||||
message = StreamUtils.join(cvException.getConstraintViolations(), ConstraintViolation::getMessage, ", ");
|
||||
}
|
||||
failureMsg.append(msg).append(message);
|
||||
log.error(msg, e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user