From 6ee82a8a39de2d508d1b8cbf7fec598cb6c48bb9 Mon Sep 17 00:00:00 2001 From: sunliang <593170460@qq.com> Date: Mon, 4 Dec 2023 17:07:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=97=A5=E5=BF=97=E5=AE=9A=E4=BD=8D=E5=88=B0=E5=93=AA?= =?UTF-8?q?=E4=B8=AA=E6=96=B9=E6=B3=95=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IBKLinker-Minio/Common/MinioBusinessLogic.cs | 33 +++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/IBKLinker-Minio/Common/MinioBusinessLogic.cs b/IBKLinker-Minio/Common/MinioBusinessLogic.cs index bc151e0..0a3da8d 100644 --- a/IBKLinker-Minio/Common/MinioBusinessLogic.cs +++ b/IBKLinker-Minio/Common/MinioBusinessLogic.cs @@ -69,7 +69,7 @@ namespace IBKLinker_Minio.Common } catch (Exception ex) { - logger.InfoFormat(ex.ToString()); + logger.InfoFormat("MinioBusinessLogic/Download方法错误:" + ex.ToString()); throw; } } @@ -81,17 +81,26 @@ namespace IBKLinker_Minio.Common /// public void MinioOperationLog(string OperateUser, string FileName, string Operate, string FilePk, string FileUPk, IDbContext db) //传参为操作人、文件名、操作、数据库连接上下文对象 { - MinioOperationlog MOdata = new MinioOperationlog(); - DateTime time = DateTime.Now;//时间 - MOdata.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_OPERATIONLOG.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk; - MOdata.OperateUser = OperateUser;//操作者 - MOdata.OperateTime = time;//操作时间 - MOdata.FilePk = FilePk.ToString();//文件pk - MOdata.FileUPk = FileUPk.ToString();//文件父级pk - MOdata.FileName = FileName;//文件名 - MOdata.Operater = OperateUser + Operate + FileName;//操作(操作人,加操作,加文件名称) - MOdata.CreationTime = time;//创建时间 - db.Insert(MOdata);//写入数据库 + try + { + MinioOperationlog MOdata = new MinioOperationlog(); + DateTime time = DateTime.Now;//时间 + MOdata.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_OPERATIONLOG.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk; + MOdata.OperateUser = OperateUser;//操作者 + MOdata.OperateTime = time;//操作时间 + MOdata.FilePk = FilePk.ToString();//文件pk + MOdata.FileUPk = FileUPk.ToString();//文件父级pk + MOdata.FileName = FileName;//文件名 + MOdata.Operater = OperateUser + Operate + FileName;//操作(操作人,加操作,加文件名称) + MOdata.CreationTime = time;//创建时间 + db.Insert(MOdata);//写入数据库 + } + catch (Exception ex) + { + logger.InfoFormat("MinioBusinessLogic/MinioOperationLog方法错误:" + ex.ToString()); + throw; + } + } #endregion