From 65f062b860a47ce1f6195a8574c7cdea62b39bd3 Mon Sep 17 00:00:00 2001 From: hoteas Date: Wed, 31 Aug 2022 11:20:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=93=8D=E4=BD=9Cbu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/hotimedb.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/db/hotimedb.go b/db/hotimedb.go index 71cdcd3..b004d89 100644 --- a/db/hotimedb.go +++ b/db/hotimedb.go @@ -165,11 +165,8 @@ func (that *HotimeDBBuilder) And(qu ...interface{}) *HotimeDBBuilder { } if that.lastWhere != nil { - if that.lastWhere["AND"] != nil { - where["AND"] = that.lastWhere["AND"] - } that.lastWhere["AND"] = where - //that.lastWhere = where + that.lastWhere = where return that } that.lastWhere = where @@ -199,11 +196,8 @@ func (that *HotimeDBBuilder) Or(qu ...interface{}) *HotimeDBBuilder { } if that.lastWhere != nil { - if that.lastWhere["OR"] != nil { - where["OR"] = that.lastWhere["OR"] - } that.lastWhere["OR"] = where - //that.lastWhere = where + that.lastWhere = where return that } that.lastWhere = where @@ -234,11 +228,8 @@ func (that *HotimeDBBuilder) Where(qu ...interface{}) *HotimeDBBuilder { } if that.lastWhere != nil { - if that.lastWhere["AND"] != nil { - where["AND"] = that.lastWhere["AND"] - } that.lastWhere["AND"] = where - //that.lastWhere = where + that.lastWhere = where return that } that.lastWhere = where