From c809922fd5a8b91c8b65668ea549f92d350ace25 Mon Sep 17 00:00:00 2001 From: timerzz Date: Sat, 29 Mar 2025 20:35:03 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=B8=8A=E4=B8=AA=E6=9C=80=E4=BD=8E?= =?UTF-8?q?=E4=BB=B7=E4=BE=9B=E5=BA=94=E5=95=86=E8=83=BD=E4=B9=B0=EF=BC=8C?= =?UTF-8?q?=E8=BF=99=E4=B8=AA=E4=BE=9B=E5=BA=94=E5=95=86=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=B9=B0=EF=BC=8C=E9=82=A3=E4=B9=88=E5=8D=B3=E4=BD=BF=E7=8E=B0?= =?UTF-8?q?=E5=9C=A8=E7=9A=84=E4=BE=9B=E5=BA=94=E5=95=86=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E6=9B=B4=E4=BD=8E=EF=BC=8C=E4=B9=9F=E4=B8=8D=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rate/rate.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rate/rate.go b/rate/rate.go index 0d0ef89..6db179f 100644 --- a/rate/rate.go +++ b/rate/rate.go @@ -70,6 +70,10 @@ func (c *Controller) rate(ctx context.Context, idString string) error { for _, provider := range article.Providers { final := provider.Cost.FinalPrice if final > 0 && (final < cost || cost == 0) && !provider.Exclude { + if available && !provider.Available { + // 上个最低价供应商能买,这个供应商不能买,那么即使现在的供应商价格更低,也不使用 + continue + } cost = final } available = available || provider.Available