fix: 修复日志查询时的排序

This commit is contained in:
Captain.B 2020-07-23 10:05:14 +08:00
parent 50c6cfa4d2
commit c517952a20
1 changed files with 2 additions and 2 deletions

View File

@ -207,14 +207,14 @@ public class ReportService {
public List<LoadTestReportLog> getReportLogs(String reportId, String resourceId) { public List<LoadTestReportLog> getReportLogs(String reportId, String resourceId) {
LoadTestReportLogExample example = new LoadTestReportLogExample(); LoadTestReportLogExample example = new LoadTestReportLogExample();
example.createCriteria().andReportIdEqualTo(reportId).andResourceIdEqualTo(resourceId); example.createCriteria().andReportIdEqualTo(reportId).andResourceIdEqualTo(resourceId);
example.setOrderByClause("part desc"); example.setOrderByClause("part");
return loadTestReportLogMapper.selectByExampleWithBLOBs(example); return loadTestReportLogMapper.selectByExampleWithBLOBs(example);
} }
public List<String> downloadLog(String reportId, String resourceId) { public List<String> downloadLog(String reportId, String resourceId) {
LoadTestReportLogExample example = new LoadTestReportLogExample(); LoadTestReportLogExample example = new LoadTestReportLogExample();
example.createCriteria().andReportIdEqualTo(reportId).andResourceIdEqualTo(resourceId); example.createCriteria().andReportIdEqualTo(reportId).andResourceIdEqualTo(resourceId);
example.setOrderByClause("part desc"); example.setOrderByClause("part");
List<LoadTestReportLog> loadTestReportLogs = loadTestReportLogMapper.selectByExampleWithBLOBs(example); List<LoadTestReportLog> loadTestReportLogs = loadTestReportLogMapper.selectByExampleWithBLOBs(example);
return loadTestReportLogs.stream().map(LoadTestReportLog::getContent).collect(Collectors.toList()); return loadTestReportLogs.stream().map(LoadTestReportLog::getContent).collect(Collectors.toList());