From d346846239a8a39246c464dc634f5fd72add99ab Mon Sep 17 00:00:00 2001 From: maven <2163098428@qq.com> Date: 星期二, 26 八月 2025 15:22:15 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/pim-jlmy' into pim-jlmy --- main-business/src/main/java/com/ruoyi/business/other/controller/TempFileController.java | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/main-business/src/main/java/com/ruoyi/business/other/controller/TempFileController.java b/main-business/src/main/java/com/ruoyi/business/other/controller/TempFileController.java new file mode 100644 index 0000000..34ada8f --- /dev/null +++ b/main-business/src/main/java/com/ruoyi/business/other/controller/TempFileController.java @@ -0,0 +1,32 @@ +package com.ruoyi.business.other.controller; + + + +import com.ruoyi.business.other.service.TempFileService; +import com.ruoyi.common.core.domain.AjaxResult; +import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + + +@RestController +@RequestMapping("/file") +@AllArgsConstructor +public class TempFileController { + + private TempFileService tempFileService; + + + @PostMapping("/upload") + public AjaxResult uploadFile(MultipartFile file, Integer type) { + try { + return AjaxResult.success(tempFileService.uploadFile(file, type)); + } catch (Exception e) { + return AjaxResult.error(e.getMessage()); + } + } + +} -- Gitblit v1.9.3