|
|
|
@ -56,6 +56,31 @@ public class SysFileService : ISysFileService, IDynamicApiController, ITransient
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 分页获取MP文件列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/Mini/sysFileInfo/list")]
|
|
|
|
|
public async Task<dynamic> 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<FileOutput>()
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
return files;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 分页获取MP文件列表
|
|
|
|
|
/// </summary>
|
|
|
|
@ -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<FileOutput>()
|
|
|
|
|