public async Task <ApiResult <string> > Edit(CmsDownload parm) { parm.SiteGuid = SiteTool.CurrentSite?.Guid; //处理文件类型 parm.FileType = FileHelper.GetFileExt(parm.FileUrl); return(await _downloadService.UpdateAsync(parm)); }
public async Task <IActionResult> Edit([FromBody] CmsDownload parm) { parm.SiteGuid = SiteTool.CurrentSite?.Guid; //处理文件类型 parm.FileType = FileHelper.GetFileExt(parm.FileUrl); return(Ok(await _downloadService.UpdateAsync(parm))); }
public async Task <IActionResult> Add([FromBody] CmsDownload parm) { parm.SiteGuid = SiteGuid; //处理文件类型 parm.FileType = FileHelper.GetFileExt(parm.FileUrl); return(Ok(await _downloadService.AddAsync(parm))); }
public void OnGet(int id = 0, int column = 0) { Download = _downservice.GetModelAsync(m => m.Id == id).Result.data; if (Download.Id == 0 && column != 0) { Download.ColumnId = column; } }
public async Task <ApiResult <string> > Edit(CmsDownload parm) { //处理文件类型 parm.FileType = FileHelper.GetFileExt(parm.FileUrl); return(await _downloadService.UpdateAsync(parm)); }