From 5707781039b9d902ce1d2d6727fba65bbab14574 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期六, 13 九月 2025 17:02:06 +0800 Subject: [PATCH] 异常单回滚 --- WebApi/Gs.Sys/Services/MesFileController.cs | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WebApi/Gs.Sys/Services/MesFileController.cs b/WebApi/Gs.Sys/Services/MesFileController.cs index ae75e24..e02e756 100644 --- a/WebApi/Gs.Sys/Services/MesFileController.cs +++ b/WebApi/Gs.Sys/Services/MesFileController.cs @@ -39,11 +39,13 @@ var _ary = file.FileName.Split("~"); var _parentGuid = _ary[0]; var _fileName = Guid.NewGuid() + _ary[1]; - var savePath = AppContext.BaseDirectory + AppSettingsHelper.getValueByKey("UploadPath"); + var savePath = AppContext.BaseDirectory + + AppSettingsHelper.getValueByKey("UploadPath"); if (!Directory.Exists(savePath)) Directory.CreateDirectory(savePath); if (file == null || file.Length == 0) - return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Exception, "璇烽�夋嫨鏂囦欢"); + return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Exception, + "璇烽�夋嫨鏂囦欢"); var _fullName = Path.Combine(savePath, _fileName); using (var stream = new FileStream(_fullName, FileMode.Create)) { @@ -67,7 +69,6 @@ model.fileGroup = ""; var _bl = base.Insert(model); } - return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Success, "涓婁紶鎴愬姛"); } -- Gitblit v1.9.3