From 67df0852f9b649241811e560fc1a1e8cca6af7f4 Mon Sep 17 00:00:00 2001 From: naiba Date: Sun, 17 Jan 2021 18:27:29 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=E5=8F=96=E5=8E=86?= =?UTF-8?q?=E5=8F=B2SSL=E9=87=87=E6=A0=B7=E5=AF=BC=E8=87=B4=E9=A2=91?= =?UTF-8?q?=E7=B9=81=E9=87=8D=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/rpc/nezha.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/rpc/nezha.go b/service/rpc/nezha.go index 64ea257..368026f 100644 --- a/service/rpc/nezha.go +++ b/service/rpc/nezha.go @@ -29,7 +29,7 @@ func (s *NezhaHandler) ReportTask(c context.Context, r *pb.TaskResult) (*pb.Rece errMsg = r.GetData() } else { var last model.MonitorHistory - if err := dao.DB.Where("monitor_id = ? AND data NOT LIKE ?", r.GetId(), "SSL证书错误:%").Order("id DESC").First(&last).Error; err == nil { + if err := dao.DB.Where("monitor_id = ? AND data LIKE ?", r.GetId(), "%|%").Order("id DESC").First(&last).Error; err == nil { var oldCert = strings.Split(last.Data, "|") var newCert = strings.Split(r.GetData(), "|") expiresOld, _ := time.Parse("2006-01-02 15:04:05 -0700 MST", oldCert[1])