| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | |
| | | return Result.success(supplierManagementService.selectSupplierManagementAll()); |
| | | } |
| | | |
| | | @Operation(summary = "查询供应商附件") |
| | | @GetMapping("/selectAttachments") |
| | | public Result selectAttachments(Integer supplierManagementId) { |
| | | return Result.success(supplierManagementService.selectAttachments(supplierManagementId)); |
| | | } |
| | | |
| | | @Operation(summary = "上传供应商附件") |
| | | @PostMapping("/uploadAttachment") |
| | | public Result uploadAttachment(@RequestParam("supplierManagementId") Integer supplierManagementId, |
| | | @RequestParam("file") MultipartFile file) { |
| | | return Result.success(supplierManagementService.uploadAttachment(supplierManagementId, file)); |
| | | } |
| | | |
| | | @Operation(summary = "删除供应商附件") |
| | | @DeleteMapping("/deleteAttachment") |
| | | public Result deleteAttachment(Long id) { |
| | | return Result.success(supplierManagementService.deleteAttachment(id)); |
| | | } |
| | | |
| | | } |