package com.ruoyi.sales.controller; 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.sales.service.ICommonFileService; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/commonFile") @AllArgsConstructor public class CommonFileController extends BaseController { private ICommonFileService commonFileService; /** * 附件删除 */ @Log(title = "附件删除", businessType = BusinessType.DELETE) @DeleteMapping("/delCommonFile") public AjaxResult delCommonFile(@RequestBody Long[] ids) { if (ids == null || ids.length == 0) { return AjaxResult.error("请传入要删除的ID"); } return toAjax(commonFileService.delCommonFileByIds(ids)); } }