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

master
孙亮 12 months ago
parent b4e65f0b17
commit 6ee82a8a39

@ -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
/// </summary>
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<MinioOperationlog>(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<MinioOperationlog>(MOdata);//写入数据库
}
catch (Exception ex)
{
logger.InfoFormat("MinioBusinessLogic/MinioOperationLog方法错误" + ex.ToString());
throw;
}
}
#endregion

Loading…
Cancel
Save