From 6971da1abceef982a53c36d2cd69b4f98d8319ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E6=9F=B3=E7=85=9C?= <101934327+fangliuyu@users.noreply.github.com> Date: Fri, 7 Oct 2022 10:26:23 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#433=20=E4=BF=AE=E5=A4=8D=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E4=B9=8B=E5=90=8E=E7=AC=AC=E4=B8=80=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E5=A8=B6=E7=BE=A4=E5=8F=8B=E4=B8=8D=E7=99=BB=E8=AE=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#435)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update command.go * Update function.go * Update command.go * Update function.go --- plugin/qqwife/function.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugin/qqwife/function.go b/plugin/qqwife/function.go index 60ceaede..6f540588 100644 --- a/plugin/qqwife/function.go +++ b/plugin/qqwife/function.go @@ -86,8 +86,9 @@ func (sql *婚姻登记) 开门时间(gid int64) (ok bool, err error) { // 开门了就拿新的花名册 err = sql.db.Drop("group" + gidstr) if err != nil { - err = sql.db.Create("group"+gidstr, &userinfo{}) - return + if err = sql.db.Create("group"+gidstr, &userinfo{}); err != nil { + return + } } dbinfo.Updatetime = time.Now().Format("2006/01/02") err = sql.db.Insert("updateinfo", &dbinfo) @@ -295,9 +296,7 @@ func (sql *婚姻登记) 花名册(gid int64) (list [][4]string, number int, err list = append(list, dbinfo) return nil }) - if len(list) == 0 { - number = 0 - } + number = len(list) return }