From 6622c9698de21c3a486b967e600222179c456390 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 20 Aug 2016 22:04:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/traits/model/SoftDelete.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/traits/model/SoftDelete.php b/library/traits/model/SoftDelete.php index 8e36aa43..621cc8ce 100644 --- a/library/traits/model/SoftDelete.php +++ b/library/traits/model/SoftDelete.php @@ -106,7 +106,7 @@ trait SoftDelete // 恢复删除 $name = static::$deleteTime; $this->change[] = $name; - $this->data[$name] = ['exp', 'null']; + $this->data[$name] = null; return $this->isUpdate()->save(); } return false; @@ -120,7 +120,7 @@ trait SoftDelete protected static function base($query) { if (static::$deleteTime) { - $query->where(static::$deleteTime, 'exp', 'is null'); + $query->where(static::$deleteTime, 'null'); } }