feat: 新增系统工具模块(存放系统工具模块相关功能,例如:代码生成、文件管理等)

This commit is contained in:
2023-08-05 00:08:41 +08:00
parent 668124591e
commit bb6f47cfd2
20 changed files with 775 additions and 15 deletions

View File

@@ -49,6 +49,12 @@ limitations under the License.
<groupId>top.charles7c</groupId>
<artifactId>continew-admin-monitor</artifactId>
</dependency>
<!-- 系统工具模块(存放系统工具模块相关功能,例如:代码生成、文件管理等) -->
<dependency>
<groupId>top.charles7c</groupId>
<artifactId>continew-admin-tool</artifactId>
</dependency>
</dependencies>
<build>

View File

@@ -0,0 +1,58 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.charles7c.cnadmin.webapi.controller.tool;
import java.sql.SQLException;
import lombok.RequiredArgsConstructor;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.charles7c.cnadmin.common.model.query.PageQuery;
import top.charles7c.cnadmin.common.model.vo.PageDataVO;
import top.charles7c.cnadmin.common.model.vo.R;
import top.charles7c.cnadmin.tool.model.query.TableQuery;
import top.charles7c.cnadmin.tool.model.vo.TableVO;
import top.charles7c.cnadmin.tool.service.GeneratorService;
/**
* 代码生成 API
*
* @author Charles7c
* @since 2023/8/3 22:58
*/
@Tag(name = "代码生成 API")
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping("/tool/generator")
public class GeneratorController {
private final GeneratorService generatorService;
@Operation(summary = "分页查询数据表", description = "分页查询数据表")
@GetMapping("/table")
public R<PageDataVO<TableVO>> pageTable(TableQuery query, @Validated PageQuery pageQuery) throws SQLException {
return R.ok(generatorService.pageTable(query, pageQuery));
}
}