From e0a51b5861c547197af98b20e59999d2fa1db2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=B0=E5=A4=A7=E7=8B=BC?= Date: Thu, 28 Mar 2019 15:33:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=9D=E9=9D=A0url?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E9=87=8D=E5=A4=8D=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/model/Attachment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/common/model/Attachment.php b/application/common/model/Attachment.php index 2149aec71..21fe292d2 100644 --- a/application/common/model/Attachment.php +++ b/application/common/model/Attachment.php @@ -25,7 +25,7 @@ class Attachment extends Model { // 如果已经上传该资源,则不再记录 self::beforeInsert(function ($model) { - if (self::where('url', '=', $model['url'])->find()) { + if (self::where('sha1', '=', $model['sha1'])->find()) { return false; } }); -- Gitee