| | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.sales.service.ICommonFileService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | |
| | | */ |
| | | @Log(title = "附件删除", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delCommonFile") |
| | | public AjaxResult delCommonFile(@RequestBody Long[] ids) { |
| | | public R<?> delCommonFile(@RequestBody Long[] ids) { |
| | | if (ids == null || ids.length == 0) { |
| | | return AjaxResult.error("请传入要删除的ID"); |
| | | return R.fail("请传入要删除的ID"); |
| | | } |
| | | return toAjax(commonFileService.delCommonFileByIds(ids)); |
| | | commonFileService.delCommonFileByIds(ids); |
| | | return R.ok(); |
| | | } |
| | | |
| | | public void migrateTempFilesToFormal(Long businessId, List<String> tempFileIds) throws IOException{ |