| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.ruoyi.basic.dto.StorageAttachmentDTO; |
| | | import com.ruoyi.basic.service.StorageAttachmentService; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @Tag(name = "éç¨ä¸ä¼ ") |
| | | @RequestMapping("/storageAttachment") |
| | | public class StorageAttachmentController { |
| | | private StorageAttachmentService storageAttachmentService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢éç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯ |
| | | * |
| | | * @param storageAttachmentDTO å
³èè®°å½ä¿¡æ¯ |
| | | * @return åé¡µç»æ |
| | | */ |
| | | @GetMapping("/list") |
| | | @Operation(summary = "å页æ¥è¯¢éç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯") |
| | | public R list(StorageAttachmentDTO storageAttachmentDTO) { |
| | | return R.ok(storageAttachmentService.list(storageAttachmentDTO)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤éç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯ |
| | | * |
| | | * @param ids æä»¶idå表 |
| | | * @return å é¤ç»æ |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤éç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯") |
| | | public R batchDelete(@RequestBody List<Long> ids) { |
| | | return R.ok(storageAttachmentService.batchDeleteStorageAttachment(ids)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿åéç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯ |
| | | */ |
| | | @PostMapping("/add") |
| | | @Operation(summary = "ä¿åéç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯") |
| | | public R add(@RequestBody StorageAttachmentDTO storageAttachmentDTO) { |
| | | storageAttachmentService.saveStorageAttachment(storageAttachmentDTO); |
| | | return R.ok(); |
| | | } |
| | | } |