From 2fb6ce8021d707464617817b3e86613606f0f4ce Mon Sep 17 00:00:00 2001 From: zzpuser Date: Wed, 3 Aug 2016 19:36:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E5=BB=B6=E8=BF=9F?= =?UTF-8?q?=E9=80=92=E5=87=8F=E6=97=B6=E5=AE=9E=E9=99=85=E4=B8=BA=E9=80=92?= =?UTF-8?q?=E5=A2=9E=E7=9A=84=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 由于在缓存中存放的递减值为负值,所以这里在拿出这个缓存值(缓存值本身为负值)后运算符应该为+,否则的话运算结果是错误的。 --- library/think/db/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 33d2d1f6..049afea4 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -596,7 +596,7 @@ class Query return true; // 等待下次写入 } } - return $this->setField($field, ['exp', $field . '-' . $step]); + return $this->setField($field, ['exp', $field . '+' . $step]); } /**