From af7977dc9c84f3f003c526dfc14072535cb21158 Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Sat, 4 Sep 2021 00:37:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/db.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/db.go b/models/db.go index 0e3237d..673cf36 100644 --- a/models/db.go +++ b/models/db.go @@ -2,7 +2,7 @@ package models import ( "fmt" - "github.com/beego/beego/v2/core/logs" + "github.com/beego/beego/v2/adapter/logs" "strings" "time" @@ -200,6 +200,8 @@ func (ck *JdCookie) InPoolWskey(wskey string) error { date := Date() tx := db.Begin() jp := &JdCookiePool{} + logs.Info(ck.PtPin) + logs.Info(ck.WsKey) if tx.Where(fmt.Sprintf("%s = '%s'", PtPin, ck.PtPin)).First(jp).Error == nil { return tx.Rollback().Error } @@ -211,7 +213,6 @@ func (ck *JdCookie) InPoolWskey(wskey string) error { tx.Rollback() return err } - logs.Info(ck.WsKey) tx.Model(ck).Updates(map[string]interface{}{ Available: True, WsKey: wskey,