package com.fjhx.common.controller; import com.alibaba.fastjson2.JSONObject; import com.fjhx.common.service.file.FtpFileService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * FTP文件服务控制器 */ @RestController @RequestMapping("/fileService") public class FileServiceController { @Autowired private FtpFileService ftpFileService; /** * 创建临时文件夹 */ @PostMapping("/createTempFolder") public JSONObject createTempFolder() { return ftpFileService.createTempFolder(); } /** * 将临时文件移动到永久文件夹 */ @PostMapping("/moveTempFolderToPermanent") public void moveFolder(String sourceFolderPath, String targetFolderPath) { ftpFileService.moveFolder(sourceFolderPath, targetFolderPath); } }