Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public void validateTableExists(String tableName) {
}
}
private String getTableName(String modelId) {
return "dynamic_" + modelId.toLowerCase();
return "dynamic_" + modelId.toLowerCase(Locale.ROOT);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public boolean preHandle(HttpServletRequest request,
} catch (Exception e) {
log.error("Token validation exception: {}", e.getMessage(), e);
DefaultLoginUserContext.clear();
throw new Exception(e.getMessage());
throw new ServiceException(ExceptionEnum.CM336.getResultCode(), ExceptionEnum.CM336.getResultMsg());
}
Comment thread
msslulu marked this conversation as resolved.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ public Model deleteModelById(Integer id) {
try {
dynamicModelService.dropDynamicTable(model);
} catch (Exception e) {
log.error("刪除动态表失败", e);
throw new RuntimeException("刪除动态表失败: " + e.getMessage());
log.error("deleteModelById", e);
throw new ServiceException(ExceptionEnum.CM001.getResultCode(), ExceptionEnum.CM001.getResultCode());

Comment thread
msslulu marked this conversation as resolved.
}
return model;
}
Expand Down Expand Up @@ -188,8 +189,8 @@ public Model updateModelById(Model model) {
try {
dynamicModelService.modifyTableStructure(model);
} catch (Exception e) {
log.error("修改动态表失败", e);
throw new RuntimeException("修改动态表失败: " + e.getMessage());
log.error("updateModelById", e);
throw new ServiceException(ExceptionEnum.CM001.getResultCode(), ExceptionEnum.CM001.getResultCode());
Comment thread
msslulu marked this conversation as resolved.
}
Model modelResult = this.baseMapper.selectById(model.getId());
return modelResult;
Expand Down
Loading