package com.fdkankan.manage.controller; import com.fdkankan.manage.common.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; /** *

* TODO *

* * @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 ResultData.ok(commonService.uploadFile(file)); } }