This commit is contained in:
ZJY 2021-09-04 00:41:01 +08:00
parent af7977dc9c
commit ca553bbe5d

View File

@ -201,13 +201,13 @@ func (ck *JdCookie) InPoolWskey(wskey string) error {
tx := db.Begin()
jp := &JdCookiePool{}
logs.Info(ck.PtPin)
logs.Info(ck.WsKey)
logs.Info(wskey)
if tx.Where(fmt.Sprintf("%s = '%s'", PtPin, ck.PtPin)).First(jp).Error == nil {
return tx.Rollback().Error
}
if err := tx.Create(&JdCookiePool{
PtPin: ck.PtPin,
WsKey: wskey,
WsKey: ck.WsKey,
CreateAt: date,
}).Error; err != nil {
tx.Rollback()