123456789101112131415161718192021222324252627282930313233343536373839 |
- package com.fdkankan.manage.controller;
- import com.fdkankan.common.response.ResultData;
- import com.fdkankan.manage.service.ICommonService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- import org.springframework.web.multipart.MultipartFile;
- /**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/6/7
- **/
- @RestController
- @RequestMapping("/service/manage/common")
- public class CommonController {
- @Autowired
- private ICommonService commonService;
- /**
- * 文件上传
- * @param file 文件
- * @return
- * @throws Exception
- */
- @RequestMapping(value = "/upload/files", method = RequestMethod.POST)
- public ResultData uploads(
- @RequestParam(value = "file") MultipartFile file) throws Exception {
- return commonService.uploadFile(file);
- }
- }
|