输出请求参数
This commit is contained in:
parent
e9e23d1324
commit
e31be7fe70
@ -228,6 +228,11 @@
|
||||
<version>1.04</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>2.0.12</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/lennart/cpdetector -->
|
||||
<!-- <dependency>-->
|
||||
|
@ -4,16 +4,21 @@ import cn.keking.exception.KkFileException;
|
||||
import cn.keking.service.ContractService;
|
||||
import cn.keking.utils.Consts;
|
||||
import cn.keking.utils.ServiceResponse;
|
||||
import io.swagger.annotations.*;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* @author Hikaru
|
||||
@ -30,8 +35,6 @@ public class ContractController {
|
||||
private ContractService contractService;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 合同生成
|
||||
* listTemplate
|
||||
@ -111,8 +114,7 @@ public class ContractController {
|
||||
|
||||
/**
|
||||
* @return 下载合同pdf文件
|
||||
*
|
||||
* */
|
||||
*/
|
||||
@ApiParam("下载合同pdf文件")
|
||||
@PostMapping("/download/{templateName}")
|
||||
public ServiceResponse downloadcontract(
|
||||
@ -122,6 +124,8 @@ public class ContractController {
|
||||
HttpServletResponse response
|
||||
) {
|
||||
try {
|
||||
log.info(JSON.toJSONString(dataMap));
|
||||
|
||||
OutputStream outstream = null;
|
||||
|
||||
File file = contractService.download(templateName, dataMap);
|
||||
|
Loading…
x
Reference in New Issue
Block a user