Skip to content

Commit

Permalink
fix: issues#3372
Browse files Browse the repository at this point in the history
  • Loading branch information
sirius19 committed Apr 25, 2024
1 parent cd02b1d commit e0c13cf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
Expand Down Expand Up @@ -73,7 +74,10 @@ public Result<List<FlowRuleEntity>> apiQueryMachineRules(@RequestParam String ap
return Result.ofFail(-1, "app can't be null or empty");
}
try {
List<FlowRuleEntity> rules = ruleProvider.getRules(app);
List<FlowRuleEntity> rules = repository.findAllByApp(app);
if (CollectionUtils.isEmpty(rules)) {
rules = ruleProvider.getRules(app);
}
if (rules != null && !rules.isEmpty()) {
for (FlowRuleEntity entity : rules) {
entity.setApp(app);
Expand Down

0 comments on commit e0c13cf

Please sign in to comment.