Commit 4a7e509b by shenjunjie

Merge branch 'feature' into 'release'

Feature

See merge request !321
parents 257811d9 11d18494
......@@ -76,6 +76,7 @@ public class AppArticleController extends BaseController {
@ApiOperation("原始数据导出")
@PostMapping(value = "/origin/list/export")
@LogRecord(description = "舆情库-原始数据导出", values = {"startTime", "endTime", "keyword", "platforms", "searchField"}, entity = true, arguments = true)
public ResponseResult exportOriginList(@RequestBody MarkSearchDTO markSearchDTO) {
Pair<String, List<ExportAppYuqingDTO>> stringListPair = markDataService.downloadYuqingMarkList(markSearchDTO);
EasyExcelUtil.download(stringListPair.getLeft() + "_原始数据列表数据", "sheet1", ExportAppYuqingDTO.class, stringListPair.getRight(), response);
......@@ -155,6 +156,7 @@ public class AppArticleController extends BaseController {
@ApiOperation("舆情导出")
@PostMapping(value = "/mark/list/export")
@LogRecord(description = "舆情库-有效舆情导出", values = {"startTime", "endTime", "customTags", "field", "keyword", "politicsLevel", "mainBodyType", "platforms", "region", "tags"}, entity = true, arguments = true)
public ResponseResult exportYuqingMarkList(@RequestBody MarkSearchDTO markSearchDTO) {
Pair<String, List<ExportAppYuqingDTO>> stringListPair = markDataService.downloadYuqingMarkList(markSearchDTO);
EasyExcelUtil.download(stringListPair.getLeft() + "_舆情列表数据", "sheet1", ExportAppYuqingDTO.class, stringListPair.getRight(), response);
......
......@@ -156,6 +156,7 @@ public class AppSearchController extends BaseController {
@ApiOperation("搜索-全网搜-舆情导出")
@PostMapping("/exportSearchWhole")
@LogRecord(description = "全网搜-舆情导出", values = {"startTime", "endTime", "fans", "filterType", "filterWords", "search", "keyword", "platforms", "sensitiveChannels", "sourceKeyword"}, entity = true, arguments = true)
public ResponseResult exportSearchWhole(@RequestBody SearchFilterDTO dto) {
// 针对商业数据库做限制
if (2 == projectService.getProjectById(UserThreadLocal.getProjectId()).getWholeSearchDataSource()) {
......
......@@ -221,9 +221,10 @@ public class BehaviorServiceImpl implements BehaviorService {
query.addCriteria(Criteria.where("cTime").gte(startTime).lt(endTime));
query.addCriteria(Criteria.where("projectId").is(projectId));
userLogRecordDao.addSort(query, "{\"cTime\":\"descend\"}");
List<UserLogRecord> logRecordList = userLogRecordDao.findList(query);
List<ExportUserLogRecordDTO> resList = new ArrayList<>(logRecordList.size());
logRecordList.forEach(record -> {
String[] collectionNames = userLogRecordDao.generateCollectionNames(new Date(startTime), new Date(endTime));
List<UserLogRecord> userLogRecordList = userLogRecordDao.findList(query, collectionNames);
List<ExportUserLogRecordDTO> resList = new ArrayList<>(userLogRecordList.size());
userLogRecordList.forEach(record -> {
ExportUserLogRecordDTO dto = new ExportUserLogRecordDTO();
dto.setNickname(record.getNickname());
dto.setDescription(record.getDescription());
......
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