From 072fe83e200219cc7b1f013a43f80de21b8bb2a1 Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Mon, 27 Sep 2021 16:22:24 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=E9=99=90=E5=88=B6=E7=AD=89=E5=90=84=E7=A7=8D?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/SendLimit.go | 2 -- models/command.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/models/SendLimit.go b/models/SendLimit.go index 57355f6..b371ab9 100644 --- a/models/SendLimit.go +++ b/models/SendLimit.go @@ -17,7 +17,6 @@ func getLimit(uid int, typ int) bool { if Config.Lim == 0 { return true } - logs.Info("开始限制") u := &Limit{} err := db.Where("number = ? and typ = ? and active_at = ?", uid, typ, time.Now().Format("2006-01-02")).First(&u).Error if err == nil { @@ -31,7 +30,6 @@ func getLimit(uid int, typ int) bool { return false } } else { - logs.Info("开始进入创建") begin := db.Begin() begin.Create(&Limit{ ActiveAt: time.Now().Format("2006-01-02"), diff --git a/models/command.go b/models/command.go index 1acdff5..e459734 100644 --- a/models/command.go +++ b/models/command.go @@ -296,7 +296,7 @@ var codeSignals = []CodeSignal{ sender.Reply(ck.Query()) }) } else { - sender.Reply("超过今日查询次数") + sender.Reply(fmt.Sprintf("鉴于东哥对接口限流,为了不影响大家的任务正常运行,即日起每日限流%d次,已超过今日限制", Config.Lim)) } return nil },