代码规范性优化

This commit is contained in:
qimiao
2021-09-16 10:19:54 +08:00
parent bca1bcb42d
commit 98c5e8d774
19 changed files with 72 additions and 9 deletions

View File

@@ -58,6 +58,9 @@ func (e *FileUploadAndDownloadService) DeleteFileChunk(fileMd5 string, fileName
var chunks []example.ExaFileChunk
var file example.ExaFile
err := global.GVA_DB.Where("file_md5 = ? AND file_name = ?", fileMd5, fileName).First(&file).Update("IsFinish", true).Update("file_path", filePath).Error
if err != nil {
return err
}
err = global.GVA_DB.Where("exa_file_id = ?", file.ID).Delete(&chunks).Unscoped().Error
return err
}