目录文件清单获取代码
private readonly IFileDirManagerProvider _fileDirManagerProvider;
public async Task<IActionResult> QueryDataListByDir([FromBody] DatabasePo body)
{
var templateRootDir = body.TemplateRootDir;
if (string.IsNullOrEmpty(templateRootDir))
{
throw new BizException(ErrorCodeConst.FILE_17001.ErrorCode, $"【templateRootDir】未传递。");
}
var pf = new PFGlobalParameter { AppId = RequestPFUtil.GetFromAppIdByHeader(this.HttpContext), OwnerId = RequestPFUtil.GetOwnerId(this.HttpContext), SysId = RequestPFUtil.GetSysId(this.HttpContext) };
ResultPager<FileData> result = new ResultPager<FileData>();
result.Success = true;
result.Data = await _fileDirManagerProvider.QueryAsync(pf, $"~/App_Export/{pf.OwnerId}/AiCode/{templateRootDir}", null, null, null, null);
return new JsonResult(result);
}
文档更新时间: 2024-06-19 07:31 作者:admin