From 805f3195784c4e13de826b6f4cbff25d3bf3724b Mon Sep 17 00:00:00 2001 From: pixelmaxQM Date: Sat, 6 Dec 2025 15:46:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=97=B6=E7=9A=84=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/service/example/exa_file_upload_download.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/service/example/exa_file_upload_download.go b/server/service/example/exa_file_upload_download.go index 536734eee..1a3426272 100644 --- a/server/service/example/exa_file_upload_download.go +++ b/server/service/example/exa_file_upload_download.go @@ -110,7 +110,7 @@ func (e *FileUploadAndDownloadService) UploadFile(header *multipart.FileHeader, if noSave == "0" { // 检查是否已存在相同key的记录 var existingFile example.ExaFileUploadAndDownload - err = global.GVA_DB.Where("`key` = ?", key).First(&existingFile).Error + err = global.GVA_DB.Where(&example.ExaFileUploadAndDownload{Key: key}).First(&existingFile).Error if errors.Is(err, gorm.ErrRecordNotFound) { return f, e.Upload(f) }