123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- 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;
- /**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/5/17
- **/
- @RestController
- @RequestMapping("/service/common/convert")
- public class FileConvertController extends BaseController {
- @Autowired
- private IFileConvertService fileConvertService;
- /**
- * <p>
- txt转modeldata
- * </p>
- * @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();
- }
- /**
- * <p>
- txt转dam
- * </p>
- * @author dengsixing
- * @date 2022/7/1
- * @param file
- **/
- @PostMapping("/convertTxtToDam")
- public void convertTxtToDam(@RequestParam("file") MultipartFile file) throws Exception{
- fileConvertService.convertTxtToDam(file, this.response);
- }
- /**
- * <p>
- txt转lzma
- * </p>
- * @author dengsixing
- * @date 2022/7/1
- * @param file
- **/
- @PostMapping("/convertTxtToLzma")
- public void convertTxtToLzma(@RequestParam("file") MultipartFile file) throws Exception{
- fileConvertService.convertTxtToLzma(file, this.response);
- }
- }
|