Commit fafb39ae authored by 盖献康's avatar 盖献康

分页、按章节排序

parent 07b3916a
...@@ -41,7 +41,7 @@ public class ReviewStandardController extends BaseController { ...@@ -41,7 +41,7 @@ public class ReviewStandardController extends BaseController {
@ApiOperation("分页查询标准(检验内容库)") @ApiOperation("分页查询标准(检验内容库)")
@PostMapping("/list") @PostMapping("/list")
public TableDataInfo<ReviewStandardResponse> listByPage(@Validated @RequestBody ReviewStandardListByPageRequest request) { public TableDataInfo<ReviewStandardResponse> listByPage(@Validated @RequestBody ReviewStandardListByPageRequest request) {
startPage(); startPage(request);
List<ReviewStandardResponse> list = reviewStandardService.listByPage(request); List<ReviewStandardResponse> list = reviewStandardService.listByPage(request);
return getDataTable(list); return getDataTable(list);
} }
......
...@@ -44,6 +44,11 @@ ...@@ -44,6 +44,11 @@
<if test="chapter != null and chapter != ''"> and chapter like concat('%', #{chapter}, '%') </if> <if test="chapter != null and chapter != ''"> and chapter like concat('%', #{chapter}, '%') </if>
<if test="text != null and text != ''"> and text like concat('%', #{text}, '%') </if> <if test="text != null and text != ''"> and text like concat('%', #{text}, '%') </if>
</where> </where>
ORDER BY
CAST(SUBSTRING_INDEX(chapter, '.', 1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(chapter, '.', 2), '.', -1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(chapter, '.', 3), '.', -1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(chapter, '.', 4), '.', -1) AS UNSIGNED)
</select> </select>
......
...@@ -31,7 +31,7 @@ public class InspectionContentTest { ...@@ -31,7 +31,7 @@ public class InspectionContentTest {
@Test @Test
public void standardAdd() { public void standardAdd() {
ReviewStandard build = ReviewStandard.builder() ReviewStandard build = ReviewStandard.builder()
.chapter("7.1.1.1") .chapter("7.1.1.2")
.text("车端具备远程控制功能的系统、授权的第三方应用等外部连接系统不应存在由汽车行业权威漏洞平台6个月前公布且未经处置的高危及以上的安全漏洞。\n" + .text("车端具备远程控制功能的系统、授权的第三方应用等外部连接系统不应存在由汽车行业权威漏洞平台6个月前公布且未经处置的高危及以上的安全漏洞。\n" +
"\n" + "\n" +
"注1:汽车行业权威漏洞平台如车联网产品专用漏洞库NVDB-CAVD等政府主管部门认可的其他漏洞平台。\n" + "注1:汽车行业权威漏洞平台如车联网产品专用漏洞库NVDB-CAVD等政府主管部门认可的其他漏洞平台。\n" +
......
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