Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #67] Fix HealthCheckResultMapper which leads to application error #68

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Changes from all commits
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 @@ -58,11 +58,18 @@ List<HealthCheckResultEntity> selectByClusterIdAndCreateTimeRange(@Param("cluste

@Insert({
"<script>",
" INSERT INTO health_check_result(type, type_id, cluster_id, state, result_desc) VALUES ",
" <foreach collection='list' item='healthCheckResultEntity' index='index' separator=','>",
" (#{healthCheckResultEntity.type}, #{healthCheckResultEntity.typeId}, #{healthCheckResultEntity.clusterId},",
" #{healthCheckResultEntity.state}, #{healthCheckResultEntity.resultDesc})",
" </foreach>",
" <choose>",
" <when test='list.size() > 0'>",
" INSERT INTO health_check_result(type, type_id, cluster_id, state, result_desc) VALUES ",
" <foreach collection='list' item='healthCheckResultEntity' index='index' separator=','>",
" (#{healthCheckResultEntity.type}, #{healthCheckResultEntity.typeId}, #{healthCheckResultEntity.clusterId},",
" #{healthCheckResultEntity.state}, #{healthCheckResultEntity.resultDesc})",
" </foreach>",
" </when>",
" <otherwise>",
" SELECT 1 FROM DUAL WHERE FALSE",
" </otherwise>",
" </choose>",
"</script>"
})
void batchInsert(List<HealthCheckResultEntity> healthCheckResultEntityList);
Expand Down
Loading