| | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ard.common.annotation.Log; |
| | | import com.ard.common.core.controller.BaseController; |
| | | import com.ard.common.core.domain.AjaxResult; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | 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.bind.annotation.*; |
| | | import com.ard.route.domain.route.ArdRouteFile; |
| | | import com.ard.route.service.IArdRouteFileService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * 文件Controller |
| | |
| | | @ApiOperation("新增文件") |
| | | @PreAuthorize("@ss.hasPermi('route:file:add')") |
| | | @Log(title = "文件", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdRouteFile ardRouteFile) { |
| | | //@PostMapping("/addFile/{folderId}") |
| | | @PostMapping("/addFile") |
| | | public AjaxResult add(@RequestPart("file") MultipartFile file) |
| | | //@PathVariable String folderId) |
| | | { |
| | | ArdRouteFile ardRouteFile = new ArdRouteFile(); |
| | | ardRouteFile.setCreateBy(getUsername()); |
| | | return toAjax(ardRouteFileService.insertArdRouteFile(ardRouteFile)); |
| | | //ardRouteFile.setFolderId(folderId); |
| | | return toAjax(ardRouteFileService.insertArdRouteFile(ardRouteFile, file)); |
| | | } |
| | | |
| | | /** |