帮雷军提交 修改内容:导出csv文件乱码解决 http、网页关键字日志添加检索条件
This commit is contained in:
@@ -26,6 +26,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.Encodes;
|
||||
import com.nis.util.Reflections;
|
||||
import com.nis.util.StringUtil;
|
||||
|
||||
@@ -381,6 +382,8 @@ public class ExcelCsv {
|
||||
|
||||
private static <T> void writeRow(String data, BufferedWriter csvWriter) throws Exception {
|
||||
// 写入文件内容
|
||||
//Html 解码
|
||||
data = Encodes.unescapeHtml(data.toString());
|
||||
String [] datas=data.split(",");
|
||||
for (String tag : datas) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
@@ -399,7 +402,7 @@ public class ExcelCsv {
|
||||
if(isDate(tag)){
|
||||
tag=tag + "\t";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
String rowStr = sb.append("\"").append(tag==null?"":tag).append("\",").toString();
|
||||
csvWriter.write(rowStr);
|
||||
|
||||
@@ -48,6 +48,9 @@ public class HttpKeyLogController extends BaseController {
|
||||
if (StringUtils.isNotBlank(log.getUrl())) {
|
||||
params.put("searchUrl", log.getUrl());
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getWebsite())) {
|
||||
params.put("searchWebsite", log.getWebsite());
|
||||
}
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
@@ -102,6 +105,9 @@ public class HttpKeyLogController extends BaseController {
|
||||
if (StringUtils.isNotBlank(log.getUrl())) {
|
||||
params.put("searchUrl", log.getUrl());
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getWebsite())) {
|
||||
params.put("searchWebsite", log.getWebsite());
|
||||
}
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
|
||||
@@ -46,6 +46,9 @@ public class HttpLogController extends BaseController {
|
||||
if (StringUtils.isNotBlank(log.getUrl())) {
|
||||
params.put("searchUrl", log.getUrl());
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getWebsite())) {
|
||||
params.put("searchWebsite", log.getWebsite());
|
||||
}
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
@@ -111,6 +114,12 @@ public class HttpLogController extends BaseController {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
if (StringUtils.isNotBlank(log.getUrl())) {
|
||||
params.put("searchUrl", log.getUrl());
|
||||
}
|
||||
if (StringUtils.isNotBlank(log.getWebsite())) {
|
||||
params.put("searchWebsite", log.getWebsite());
|
||||
}
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
|
||||
@@ -241,9 +241,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="cfg_id"></spring:message>:</label>
|
||||
<input name="cfgId" type="text" class="form-control logCfgId number" value="${log.cfgId }"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="website"></spring:message>:</label>
|
||||
<input name="website" type="text" class="form-control" value="${log.website }"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
|
||||
@@ -215,9 +215,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="cfg_id"></spring:message>:</label>
|
||||
<input name="cfgId" type="text" class="form-control logCfgId number" value="${log.cfgId }"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="website"></spring:message>:</label>
|
||||
<input name="website" type="text" class="form-control" value="${log.website }"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
|
||||
Reference in New Issue
Block a user