package com.ruzhoukj.sms.controller; import com.platform.controller.BaseController; import com.platform.model.resp.Result; import com.ruzhoukj.sms.service.FileService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; /** * @Author:zhuxiang * @Package:com.ruzhoukj.sms.controller * @Project:OA * @name:FileController * @Date:2025/2/21 11:26 * @Filename:FileController */ @Api(tags = "文件上传") @RestController @RequestMapping("/file") public class FileController extends BaseController { @Resource private FileService fileService; @ApiOperation(value = "文件上传") @PostMapping("/upload") public Result uploadFile(@RequestParam("file") MultipartFile multipartFile) { return Result.data(fileService.upload(multipartFile)); } }