From 4b61e7102e75bf6b48687a3c8faf5714d8011f7c Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Fri, 28 Mar 2025 19:58:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dfile=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=9C=AA=E8=AE=BE=E7=BD=AE=E5=88=B0=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/vcs.xml | 6 ++++++ handler/file.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/handler/file.go b/handler/file.go index a66ec15..397d64d 100644 --- a/handler/file.go +++ b/handler/file.go @@ -259,7 +259,7 @@ func UploadFileV2(c *gin.Context) { } //添加用户文件 fileAuth := service.CreateUserFile(id1, file_record.FileName, int(file_record.ID), uploadType) - if fileAuth.ID != 0 { + if fileAuth.ID == 0 { c.JSON(http.StatusOK, gin.H{"error": "save user file info failed", "code": proto.SaveFileInfoFailed, "message": "failed"}) return }