测试报告倒序及分页修复

This commit is contained in:
pfl
2025-06-03 11:12:08 +08:00
parent c6a73afb76
commit eb58fd40c7
6 changed files with 23 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ import com.test.test.service.ITestReportService;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -37,7 +37,7 @@ public class TestReportController extends BaseController {
* @return
*/
@PostMapping("/reportList")
public TableDataInfo list(@RequestBody IDQO qo) {
public TableDataInfo list(@Validated IDQO qo) {
startPage();
List<TestReportVo> list = testReportService.selectTestReportList(qo.getId());
return getDataTable(list);

View File

@@ -3,6 +3,6 @@ package com.test.test.domain.qo;
import lombok.Data;
@Data
public class IDQO {
public class IDQO extends InheritQO{
private Long id;
}

View File

@@ -0,0 +1,14 @@
package com.test.test.domain.qo;
import java.io.Serializable;
import lombok.Data;
@Data
public class InheritQO implements Serializable {
private static final long serialVersionUID = -6405523005491017445L;
private Integer pageNum;
private Integer pageSize;
}

View File

@@ -43,5 +43,6 @@
LEFT JOIN test_report tr ON tr.id = tpr.report_id
WHERE tpr.plan_id = #{planId}
AND tpr.del_flag = '0'
ORDER BY tr.create_time DESC
</select>
</mapper>