diff --git a/base.go b/base.go index 7d6a690..f12bd75 100644 --- a/base.go +++ b/base.go @@ -106,7 +106,7 @@ func (b *BaseDao) setTxCondition(tx *gorm.DB, table string, optionFuncList ...Se } // 设置where条件 - if nil != o.Where { + if nil != o.Where && len(o.Where) > 0 { tx.Where(o.Where) }