Skip to content

Commit

Permalink
[manager] fix: can query by tags when tagValue is null (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
l646505418 authored Jul 21, 2023
1 parent be136ec commit 35d306f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ public ResponseEntity<Message<Page<Monitor>>> getMonitors(
if (StringUtils.hasText(tag)) {
String[] tagArr = tag.split(":");
String tagName = tagArr[0];
String tagValue = tagArr[1];
ListJoin<Monitor, org.dromara.hertzbeat.common.entity.manager.Tag> tagJoin = root
.join(root.getModel()
.getList("tags", org.dromara.hertzbeat.common.entity.manager.Tag.class), JoinType.LEFT);
if (tagArr.length == TAG_LENGTH) {
String tagValue = tagArr[1];
andList.add(criteriaBuilder.equal(tagJoin.get("name"), tagName));
andList.add(criteriaBuilder.equal(tagJoin.get("value"), tagValue));
} else {
Expand Down

0 comments on commit 35d306f

Please sign in to comment.