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