mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-04 10:57:10 +08:00 
			
		
		
		
	refactor: 抽取代码生成器插件模块(后续会改造为独立插件)
This commit is contained in:
		@@ -37,17 +37,17 @@
 | 
			
		||||
            <scope>test</scope>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <!-- 代码生成器插件(后续会改造为独立插件) -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>top.charles7c.continew</groupId>
 | 
			
		||||
            <artifactId>continew-admin-generator</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <!-- 系统监控模块(存放系统监控模块相关功能,例如:日志管理、服务监控等) -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>top.charles7c.continew</groupId>
 | 
			
		||||
            <artifactId>continew-admin-monitor</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <!-- 系统工具模块(存放系统工具模块相关功能,例如:代码生成、文件管理等) -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>top.charles7c.continew</groupId>
 | 
			
		||||
            <artifactId>continew-admin-tool</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
    </dependencies>
 | 
			
		||||
 | 
			
		||||
    <build>
 | 
			
		||||
 
 | 
			
		||||
@@ -16,34 +16,30 @@
 | 
			
		||||
 | 
			
		||||
package top.charles7c.continew.admin.webapi.tool;
 | 
			
		||||
 | 
			
		||||
import java.sql.SQLException;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
 | 
			
		||||
import cn.dev33.satoken.annotation.SaCheckPermission;
 | 
			
		||||
import io.swagger.v3.oas.annotations.Operation;
 | 
			
		||||
import io.swagger.v3.oas.annotations.Parameter;
 | 
			
		||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
 | 
			
		||||
import io.swagger.v3.oas.annotations.tags.Tag;
 | 
			
		||||
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import cn.dev33.satoken.annotation.SaCheckPermission;
 | 
			
		||||
 | 
			
		||||
import top.charles7c.continew.admin.tool.model.entity.FieldConfigDO;
 | 
			
		||||
import top.charles7c.continew.admin.tool.model.entity.GenConfigDO;
 | 
			
		||||
import top.charles7c.continew.admin.tool.model.query.TableQuery;
 | 
			
		||||
import top.charles7c.continew.admin.tool.model.req.GenConfigReq;
 | 
			
		||||
import top.charles7c.continew.admin.tool.model.resp.GeneratePreviewResp;
 | 
			
		||||
import top.charles7c.continew.admin.tool.model.resp.TableResp;
 | 
			
		||||
import top.charles7c.continew.admin.tool.service.GeneratorService;
 | 
			
		||||
import top.charles7c.continew.admin.generator.model.entity.FieldConfigDO;
 | 
			
		||||
import top.charles7c.continew.admin.generator.model.entity.GenConfigDO;
 | 
			
		||||
import top.charles7c.continew.admin.generator.model.query.TableQuery;
 | 
			
		||||
import top.charles7c.continew.admin.generator.model.req.GenConfigReq;
 | 
			
		||||
import top.charles7c.continew.admin.generator.model.resp.GeneratePreviewResp;
 | 
			
		||||
import top.charles7c.continew.admin.generator.model.resp.TableResp;
 | 
			
		||||
import top.charles7c.continew.admin.generator.service.GeneratorService;
 | 
			
		||||
import top.charles7c.continew.starter.core.autoconfigure.project.ProjectProperties;
 | 
			
		||||
import top.charles7c.continew.starter.core.util.validate.ValidationUtils;
 | 
			
		||||
import top.charles7c.continew.starter.extension.crud.model.query.PageQuery;
 | 
			
		||||
import top.charles7c.continew.starter.extension.crud.model.resp.PageResp;
 | 
			
		||||
import top.charles7c.continew.starter.web.model.R;
 | 
			
		||||
 | 
			
		||||
import java.sql.SQLException;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 代码生成 API
 | 
			
		||||
 *
 | 
			
		||||
@@ -54,7 +50,7 @@ import top.charles7c.continew.starter.web.model.R;
 | 
			
		||||
@Validated
 | 
			
		||||
@RestController
 | 
			
		||||
@RequiredArgsConstructor
 | 
			
		||||
@RequestMapping("/tool/generator")
 | 
			
		||||
@RequestMapping("/generator")
 | 
			
		||||
public class GeneratorController {
 | 
			
		||||
 | 
			
		||||
    private final ProjectProperties projectProperties;
 | 
			
		||||
 
 | 
			
		||||
@@ -63,23 +63,21 @@ springdoc:
 | 
			
		||||
  default-flat-param-object: true
 | 
			
		||||
  # 分组配置
 | 
			
		||||
  group-configs:
 | 
			
		||||
    - group: 'all'
 | 
			
		||||
      paths-to-match: '/**'
 | 
			
		||||
      packages-to-scan: ${project.base-package}.webapi
 | 
			
		||||
    - group: 'auth'
 | 
			
		||||
      display-name: '系统认证'
 | 
			
		||||
    - group: all
 | 
			
		||||
      paths-to-match: /**
 | 
			
		||||
      paths-to-exclude:
 | 
			
		||||
        - /error
 | 
			
		||||
    - group: auth
 | 
			
		||||
      display-name: 系统认证
 | 
			
		||||
      packages-to-scan: ${project.base-package}.webapi.auth
 | 
			
		||||
    - group: 'common'
 | 
			
		||||
      display-name: '通用接口'
 | 
			
		||||
    - group: common
 | 
			
		||||
      display-name: 通用接口
 | 
			
		||||
      packages-to-scan: ${project.base-package}.webapi.common
 | 
			
		||||
    - group: 'system'
 | 
			
		||||
      display-name: '系统管理'
 | 
			
		||||
    - group: system
 | 
			
		||||
      display-name: 系统管理
 | 
			
		||||
      packages-to-scan: ${project.base-package}.webapi.system
 | 
			
		||||
    - group: 'tool'
 | 
			
		||||
      display-name: '系统工具'
 | 
			
		||||
      packages-to-scan: ${project.base-package}.webapi.tool
 | 
			
		||||
    - group: 'monitor'
 | 
			
		||||
      display-name: '系统监控'
 | 
			
		||||
    - group: monitor
 | 
			
		||||
      display-name: 系统监控
 | 
			
		||||
      packages-to-scan: ${project.base-package}.webapi.monitor
 | 
			
		||||
  ## 组件配置
 | 
			
		||||
  components:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user