From 027a25199162110392a917fe3855fd5a61795ae8 Mon Sep 17 00:00:00 2001 From: TripleZ Date: Tue, 17 Sep 2024 12:00:15 +0800 Subject: [PATCH] fix: check error rule Signed-off-by: TripleZ --- pkg/analyser/wechat/wechat.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/analyser/wechat/wechat.go b/pkg/analyser/wechat/wechat.go index f3912c6..72def07 100644 --- a/pkg/analyser/wechat/wechat.go +++ b/pkg/analyser/wechat/wechat.go @@ -102,6 +102,9 @@ func (w Wechat) GetAccountsAndTags(o *ir.Order, cfg *config.Config, target, prov log.Fatalf("Error in SplitFindTimeStampInterval: %v", err) } } + if r.MinPrice != nil && r.MaxPrice != nil && *r.MinPrice > *r.MaxPrice { + log.Fatalf("Error rule: minPrice > maxPrice!") + } if r.MinPrice != nil && o.Money < *r.MinPrice { match = false }