| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpFileDto; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | @PostMapping("/upload/{followUpId}") |
| | | @Log(title = "客户跟进-上传附件", businessType = BusinessType.INSERT) |
| | | public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files, @PathVariable Integer followUpId) { |
| | | customerFollowUpService.addFollowUpFiles(files, followUpId); |
| | | return AjaxResult.success(); |
| | | return AjaxResult.success(customerFollowUpService.addFollowUpFiles(files, followUpId)); |
| | | } |
| | | |
| | | /** |
| | | * 上传跟进附件(复用,无ID) |
| | | */ |
| | | @ApiOperation("上传附件(复用)") |
| | | @PostMapping("/upload") |
| | | @Log(title = "上传附件(复用)", businessType = BusinessType.INSERT) |
| | | public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files, @RequestParam(required = false) String name) { |
| | | List<CustomerFollowUpFileDto> uploadedFiles = customerFollowUpService.addFollowUpFiles(files, null); |
| | | return AjaxResult.success(uploadedFiles); |
| | | } |
| | | |
| | | /** |
| | | * 批量查询附件列表 |
| | | */ |
| | | @ApiOperation("批量查询附件列表") |
| | | @PostMapping("/file/list") |
| | | public AjaxResult getFileList(@RequestBody List<Long> ids) { |
| | | return AjaxResult.success(customerFollowUpService.getFollowUpFilesByIds(ids)); |
| | | } |
| | | |
| | | /** |