diff --git a/GDZZ.Core/GDZZ.Core.xml b/GDZZ.Core/GDZZ.Core.xml
index 7b49196..3ff130b 100644
--- a/GDZZ.Core/GDZZ.Core.xml
+++ b/GDZZ.Core/GDZZ.Core.xml
@@ -6047,6 +6047,11 @@
文件类型
+
+
+ 课程ID
+
+
文件Id
@@ -6079,6 +6084,13 @@
+
+
+ 分页获取MP文件列表
+
+
+
+
分页获取MP文件列表
diff --git a/GDZZ.Core/Service/File/Dto/FileInput.cs b/GDZZ.Core/Service/File/Dto/FileInput.cs
index 591b416..458a760 100644
--- a/GDZZ.Core/Service/File/Dto/FileInput.cs
+++ b/GDZZ.Core/Service/File/Dto/FileInput.cs
@@ -53,6 +53,11 @@ public class FileInput : PageInputBase
/// 文件类型
///
public int FileType { get; set; }
+
+ ///
+ /// 课程ID
+ ///
+ public long CID { get; set; }
}
public class DeleteFileInfoInput
diff --git a/GDZZ.Core/Service/File/SysFileService.cs b/GDZZ.Core/Service/File/SysFileService.cs
index 140ee82..11df905 100644
--- a/GDZZ.Core/Service/File/SysFileService.cs
+++ b/GDZZ.Core/Service/File/SysFileService.cs
@@ -56,6 +56,31 @@ public class SysFileService : ISysFileService, IDynamicApiController, ITransient
}
+ ///
+ /// 分页获取MP文件列表
+ ///
+ ///
+ ///
+ [HttpGet("/Mini/sysFileInfo/list")]
+ public async Task QueryMP4FileInfoList([FromQuery] FileInput input)
+ {
+ var fileBucket = !string.IsNullOrEmpty(input.FileBucket?.Trim());
+ var fileOriginName = !string.IsNullOrEmpty(input.FileOriginName?.Trim());
+
+ //rmrf-
+
+ var files = await _sysFileInfoRep.AsQueryable()
+ .WhereIF(input.FileLocation > 0, u => u.FileLocation == input.FileLocation)
+ .Where(u => u.FileSuffix == "MP4")
+ .WhereIF(!input.CID.IsNullOrZero(), u => u.CID == input.CID)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.FileBucket), u => u.FileBucket.Contains(input.FileBucket.Trim()))
+ .WhereIF(!string.IsNullOrWhiteSpace(input.FileOriginName), u => u.FileOriginName.Contains(input.FileOriginName.Trim()))
+ .Select()
+ .ToListAsync();
+ return files;
+ }
+
+
///
/// 分页获取MP文件列表
///
@@ -72,9 +97,9 @@ public class SysFileService : ISysFileService, IDynamicApiController, ITransient
var files = await _sysFileInfoRep.AsQueryable()
.WhereIF(input.FileLocation > 0, u => u.FileLocation == input.FileLocation)
.Where(u=>u.FileSuffix =="MP4")
- .WhereIF(input.FileType == 1,u=> u.CID == 0)
- .WhereIF(input.FileType == 2, u => u.CID != 0)
- .WhereIF(!UserManager.IsSuperAdmin, u => u.CreatedUserId == UserManager.UserId)
+ .WhereIF(input.FileType == 1,u=> u.CID == 0 )
+ .WhereIF(input.FileType == 2, u => u.CID == input.CID )
+ .WhereIF(!UserManager.IsSuperAdmin && input.FileType == 2, u => u.CreatedUserId == UserManager.UserId)
.WhereIF(!string.IsNullOrWhiteSpace(input.FileBucket), u => u.FileBucket.Contains(input.FileBucket.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.FileOriginName), u => u.FileOriginName.Contains(input.FileOriginName.Trim()))
.Select()
diff --git a/GDZZ.Web.Entry/appsettings.json b/GDZZ.Web.Entry/appsettings.json
index bd75b94..bd5986d 100644
--- a/GDZZ.Web.Entry/appsettings.json
+++ b/GDZZ.Web.Entry/appsettings.json
@@ -1,5 +1,5 @@
{
- "MaxRequestBodySize": 41943040, //单位是字节(byte) 1kb=1024byte,此处限制40M
+ "MaxRequestBodySize": 104857600, //单位是字节(byte) 1kb=1024byte,此处限制40M
//"Serilog": {
// "MinimumLevel": {
// "Default": "Information",