@Override
    public PageResult<CodegenTableDO> getCodegenTablePage(CodegenTablePageReqVO pageReqVO) {
        return codegenTableMapper.selectPage(pageReqVO);
    }
@Test
    public void testGetCodegenTablePage() {
        // mock 数据
        CodegenTableDO tableDO = randomPojo(CodegenTableDO.class, o -> {
            o.setTableName("t_yunai");
            o.setTableComment("芋艿");
            o.setClassName("SystemYunai");
            o.setCreateTime(buildTime(2021, 3, 10));
        }).setScene(CodegenSceneEnum.ADMIN.getScene());
        codegenTableMapper.insert(tableDO);
        // 测试 tableName 不匹配
        codegenTableMapper.insert(cloneIgnoreId(tableDO, o -> o.setTableName(randomString())));
        // 测试 tableComment 不匹配
        codegenTableMapper.insert(cloneIgnoreId(tableDO, o -> o.setTableComment(randomString())));
        // 测试 className 不匹配
        codegenTableMapper.insert(cloneIgnoreId(tableDO, o -> o.setClassName(randomString())));
        // 测试 createTime 不匹配
        codegenTableMapper.insert(cloneIgnoreId(tableDO, logDO -> logDO.setCreateTime(buildTime(2021, 4, 10))));
        // 准备参数
        CodegenTablePageReqVO reqVO = new CodegenTablePageReqVO();
        reqVO.setTableName("yunai");
        reqVO.setTableComment("芋");
        reqVO.setClassName("Yunai");
        reqVO.setCreateTime(buildBetweenTime(2021, 3, 1, 2021, 3, 31));

        // 调用
        PageResult<CodegenTableDO> pageResult = codegenService.getCodegenTablePage(reqVO);
        // 断言，只查到了一条符合条件的
        assertEquals(1, pageResult.getTotal());
        assertEquals(1, pageResult.getList().size());
        assertPojoEquals(tableDO, pageResult.getList().get(0));
    }