增加文件上传日志定位到哪个方法报错

master
孙亮 12 months ago
parent b4e65f0b17
commit 6ee82a8a39

@ -69,7 +69,7 @@ namespace IBKLinker_Minio.Common
} }
catch (Exception ex) catch (Exception ex)
{ {
logger.InfoFormat(ex.ToString()); logger.InfoFormat("MinioBusinessLogic/Download方法错误" + ex.ToString());
throw; throw;
} }
} }
@ -81,17 +81,26 @@ namespace IBKLinker_Minio.Common
/// </summary> /// </summary>
public void MinioOperationLog(string OperateUser, string FileName, string Operate, string FilePk, string FileUPk, IDbContext db) //传参为操作人、文件名、操作、数据库连接上下文对象 public void MinioOperationLog(string OperateUser, string FileName, string Operate, string FilePk, string FileUPk, IDbContext db) //传参为操作人、文件名、操作、数据库连接上下文对象
{ {
MinioOperationlog MOdata = new MinioOperationlog(); try
DateTime time = DateTime.Now;//时间 {
MOdata.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_OPERATIONLOG.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk; MinioOperationlog MOdata = new MinioOperationlog();
MOdata.OperateUser = OperateUser;//操作者 DateTime time = DateTime.Now;//时间
MOdata.OperateTime = time;//操作时间 MOdata.Pk = Convert.ToInt32(db.QueryScalar("select S_MINIO_OPERATIONLOG.nextval from dual"));///拿到表自增长的值赋值给自增长主键pk;
MOdata.FilePk = FilePk.ToString();//文件pk MOdata.OperateUser = OperateUser;//操作者
MOdata.FileUPk = FileUPk.ToString();//文件父级pk MOdata.OperateTime = time;//操作时间
MOdata.FileName = FileName;//文件名 MOdata.FilePk = FilePk.ToString();//文件pk
MOdata.Operater = OperateUser + Operate + FileName;//操作(操作人,加操作,加文件名称) MOdata.FileUPk = FileUPk.ToString();//文件父级pk
MOdata.CreationTime = time;//创建时间 MOdata.FileName = FileName;//文件名
db.Insert<MinioOperationlog>(MOdata);//写入数据库 MOdata.Operater = OperateUser + Operate + FileName;//操作(操作人,加操作,加文件名称)
MOdata.CreationTime = time;//创建时间
db.Insert<MinioOperationlog>(MOdata);//写入数据库
}
catch (Exception ex)
{
logger.InfoFormat("MinioBusinessLogic/MinioOperationLog方法错误" + ex.ToString());
throw;
}
} }
#endregion #endregion

Loading…
Cancel
Save