package com.fdkankan.scene.controller; import com.fdkankan.common.response.ResultData; import com.fdkankan.scene.service.IFileConvertService; import com.fdkankan.web.controller.BaseController; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; /** *
* TODO *
* * @author dengsixing * @since 2022/5/17 **/ @RestController @RequestMapping("/service/common/convert") public class FileConvertController extends BaseController { @Autowired private IFileConvertService fileConvertService; /** *txt转modeldata *
* @author dengsixing * @date 2022/7/1 * @param file * @return com.fdkankan.common.response.ResultData **/ @PostMapping("/convertTxtToModeldata") public ResultData convertTxtToModeldata(@RequestParam("file") MultipartFile file) throws Exception{ fileConvertService.convertTxtToModeldata(file, this.response); return ResultData.ok(); } /** *txt转dam *
* @author dengsixing * @date 2022/7/1 * @param file **/ @PostMapping("/convertTxtToDam") public void convertTxtToDam(@RequestParam("file") MultipartFile file) throws Exception{ fileConvertService.convertTxtToDam(file, this.response); } /** *txt转lzma *
* @author dengsixing * @date 2022/7/1 * @param file **/ @PostMapping("/convertTxtToLzma") public void convertTxtToLzma(@RequestParam("file") MultipartFile file) throws Exception{ fileConvertService.convertTxtToLzma(file, this.response); } }