调整内容

This commit is contained in:
wenc000 2020-11-05 12:33:57 +08:00
parent 1c677e5e54
commit dafe30a358
4 changed files with 22 additions and 3 deletions

View File

@ -22,7 +22,7 @@
</div> </div>
<div class="layui-card-body" style="padding: 15px;"> <div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm"> <form class="layui-form layui-form-pane" lay-filter="dataForm">
<input type="hidden" id="bigdataModuleSwitch" name="bigdataModuleSwitch" class="layui-input" value="" value="0"> <input type="hidden" id="bigdataModuleSwitch" name="bigdataModuleSwitch" class="layui-input" value="0">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">模块编码<span style="color: red">*</span></label> <label class="layui-form-label">模块编码<span style="color: red">*</span></label>
<div class="layui-input-block"> <div class="layui-input-block">

View File

@ -3,6 +3,8 @@ package com.cm.plugin.map.pojo.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/** /**
* When you feel like quitting. Think about why you started * When you feel like quitting. Think about why you started
* 当你想要放弃的时候想想当初你为何开始 * 当你想要放弃的时候想想当初你为何开始
@ -14,8 +16,9 @@ import io.swagger.annotations.ApiModelProperty;
* @Version: 1.0 * @Version: 1.0
**/ **/
@ApiModel @ApiModel
public class GridPointDTO { public class GridPointDTO implements Serializable {
private static final long serialVersionUID = -2367199018377785048L;
@ApiModelProperty(name = "gridId", value = "网格ID") @ApiModelProperty(name = "gridId", value = "网格ID")
private String gridId; private String gridId;
@ApiModelProperty(name = "lng", value = "经度") @ApiModelProperty(name = "lng", value = "经度")

View File

@ -159,6 +159,17 @@ public interface IFileService {
*/ */
void downLoadFile(HttpServletRequest request, HttpServletResponse response, Map<String, Object> params) throws FileException; void downLoadFile(HttpServletRequest request, HttpServletResponse response, Map<String, Object> params) throws FileException;
/**
* 文件下载
*
* @param request
* @param response
* @param params
* @param canRange 开启断点续传
* @throws FileException
*/
void downLoadFile(HttpServletRequest request, HttpServletResponse response, Map<String, Object> params, boolean canRange) throws FileException;
/** /**
* 百度富文本编辑器 * 百度富文本编辑器
* *

View File

@ -227,6 +227,11 @@ public class FileServiceImpl extends AbstractService implements IFileService {
@Override @Override
public void downLoadFile(HttpServletRequest request, HttpServletResponse response, Map<String, Object> params) throws FileException { public void downLoadFile(HttpServletRequest request, HttpServletResponse response, Map<String, Object> params) throws FileException {
downLoadFile(request, response, params, true);
}
@Override
public void downLoadFile(HttpServletRequest request, HttpServletResponse response, Map<String, Object> params, boolean canRange) throws FileException {
FilePO filePO = fileDao.getFile(params); FilePO filePO = fileDao.getFile(params);
if (null == filePO) { if (null == filePO) {
throw new SearchException("文件获取失败"); throw new SearchException("文件获取失败");
@ -243,7 +248,7 @@ public class FileServiceImpl extends AbstractService implements IFileService {
response.setHeader("Content-Disposition", "inline;fileName=" + URLEncoder.encode(filePO.getFileName(), "UTF-8")); response.setHeader("Content-Disposition", "inline;fileName=" + URLEncoder.encode(filePO.getFileName(), "UTF-8"));
} }
String rangeString = null; String rangeString = null;
if (request != null) { if (canRange && request != null) {
rangeString = request.getHeader("Range"); rangeString = request.getHeader("Range");
LOG.debug("range: {}", rangeString); LOG.debug("range: {}", rangeString);
} }