Commit 2b636a92 authored by tangwei's avatar tangwei

查看word 返回类型修改

parent 71b16cc5
...@@ -605,8 +605,8 @@ public class CommandController extends BaseController { ...@@ -605,8 +605,8 @@ public class CommandController extends BaseController {
* *
* @return * @return
*/ */
@TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation( needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/lookHtmlText", produces = "application/json;charset=UTF-8") @GetMapping(value = "/lookHtmlText")
@ApiOperation(value = "查看文件内容", notes = "查看文件内容") @ApiOperation(value = "查看文件内容", notes = "查看文件内容")
public ResponseModel<Object> lookHtmlText( HttpServletResponse response,@RequestParam(value = "fileUrl")String fileUrl ,@RequestParam(value = "product")String product,@RequestParam(value = "appKey")String appKey,@RequestParam(value = "token")String token /* @PathVariable String fileName */) public ResponseModel<Object> lookHtmlText( HttpServletResponse response,@RequestParam(value = "fileUrl")String fileUrl ,@RequestParam(value = "product")String product,@RequestParam(value = "appKey")String appKey,@RequestParam(value = "token")String token /* @PathVariable String fileName */)
throws Exception { throws Exception {
...@@ -627,9 +627,9 @@ public class CommandController extends BaseController { ...@@ -627,9 +627,9 @@ public class CommandController extends BaseController {
File htmlFile = new File(htmlFileName); File htmlFile = new File(htmlFileName);
WordConverterUtils.wordToHtml(fileName, htmlFileName, imagePathStr,readUrl, remoteSecurityService,product, appKey, token); WordConverterUtils.wordToHtml(fileName, htmlFileName, imagePathStr,readUrl, remoteSecurityService,product, appKey, token);
FileInputStream fis = new FileInputStream(htmlFile); FileInputStream fis = new FileInputStream(htmlFile);
response.setContentType("multipart/form-data"); // response.setContentType("multipart/form-data");
response.setCharacterEncoding("UTF-8"); // response.setCharacterEncoding("UTF-8");
response.setContentType("text/html"); // response.setContentType("text/html");
ServletOutputStream out; ServletOutputStream out;
out = response.getOutputStream(); out = response.getOutputStream();
int b = 0; int b = 0;
......
...@@ -71,7 +71,7 @@ public class ControllerAop { ...@@ -71,7 +71,7 @@ public class ControllerAop {
throw new RuntimeException(e.getMessage()); throw new RuntimeException(e.getMessage());
} }
// 不需要添加请求头的接口 // 不需要添加请求头的接口
String[] url = new String[]{"/api/user/selectInfo", "/api/user/save/curCompany"}; String[] url = new String[]{"/api/user/selectInfo", "/api/user/save/curCompany", "/jcs/command/lookHtmlText"};
// 获取请求路径 // 获取请求路径
if (Arrays.asList(url).contains(request.getRequestURI())) { if (Arrays.asList(url).contains(request.getRequestURI())) {
// 暂无需要 // 暂无需要
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment