diff --git a/doc/sql/increase.sql b/doc/sql/increase.sql new file mode 100644 index 0000000..e141023 --- /dev/null +++ b/doc/sql/increase.sql @@ -0,0 +1,9 @@ +-- 2024-12-16 +-- 删除研发工具菜单 +DELETE +FROM blade_menu +WHERE id = '1123598815738675217' + OR parent_id = 1123598815738675217 + OR parent_id IN ( + 1123598815738675218, 1161272593873321991, 1161272593873321996 + ) diff --git a/src/main/java/org/springblade/modules/develop/controller/CodeController.java b/src/main/java/org/springblade/modules/develop/controller/CodeController.java deleted file mode 100644 index 1d3859e..0000000 --- a/src/main/java/org/springblade/modules/develop/controller/CodeController.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * BladeX Commercial License Agreement - * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. - *
- * Use of this software is governed by the Commercial License Agreement - * obtained after purchasing a license from BladeX. - *
- * 1. This software is for development use only under a valid license - * from BladeX. - *
- * 2. Redistribution of this software's source code to any third party - * without a commercial license is strictly prohibited. - *
- * 3. Licensees may copyright their own code but cannot use segments - * from this software for such purposes. Copyright of this software - * remains with BladeX. - *
- * Using this software signifies agreement to this License, and the software - * must not be used for illegal purposes. - *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is - * not liable for any claims arising from secondary or illegal development. - *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.v3.oas.annotations.Hidden;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.enums.ParameterIn;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import jakarta.validation.Valid;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.annotation.PreAuth;
-import org.springblade.core.tenant.annotation.NonDS;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.constant.RoleConstant;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.develop.pojo.dto.GeneratorDTO;
-import org.springblade.modules.develop.pojo.entity.Code;
-import org.springblade.modules.develop.service.ICodeService;
-import org.springblade.modules.develop.service.IGenerateService;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Map;
-
-/**
- * 控制器
- *
- * @author Chill
- */
-@NonDS
-@Hidden
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/code")
-@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
-@Tag(name = "代码生成", description = "代码生成")
-public class CodeController extends BladeController {
-
- private final ICodeService codeService;
- private final IGenerateService generateService;
-
- /**
- * 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @Operation(summary = "详情", description = "传入code")
- public R
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import jakarta.validation.Valid;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.secure.annotation.PreAuth;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.constant.BladeConstant;
-import org.springblade.core.tool.constant.RoleConstant;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.develop.pojo.entity.CodeSetting;
-import org.springblade.modules.develop.service.ICodeSettingService;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Map;
-
-/**
- * 代码生成器配置表 控制器
- *
- * @author BladeX
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/code-setting")
-@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
-@Tag(name = "代码生成器配置表", description = "代码生成器配置表接口")
-public class CodeSettingController extends BladeController {
-
- private final ICodeSettingService codeSettingService;
-
- /**
- * 代码生成器配置表 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @Operation(summary = "详情", description = "传入codeSetting")
- public R
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import jakarta.validation.Valid;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tenant.annotation.NonDS;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.modules.develop.pojo.entity.Datasource;
-import org.springblade.modules.develop.service.IDatasourceService;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 数据源配置表 控制器
- *
- * @author Chill
- */
-@NonDS
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/datasource")
-@Tag(name = "数据源配置表", description = "数据源配置表接口")
-public class DatasourceController extends BladeController {
-
- private final IDatasourceService datasourceService;
-
- /**
- * 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @Operation(summary = "详情", description = "传入datasource")
- public R
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
-import com.baomidou.mybatisplus.generator.config.po.TableInfo;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import jakarta.validation.Valid;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringPool;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.modules.develop.pojo.entity.Datasource;
-import org.springblade.modules.develop.pojo.entity.Model;
-import org.springblade.modules.develop.pojo.entity.ModelPrototype;
-import org.springblade.modules.develop.service.IDatasourceService;
-import org.springblade.modules.develop.service.IModelPrototypeService;
-import org.springblade.modules.develop.service.IModelService;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 数据模型表 控制器
- *
- * @author Chill
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/model")
-@Tag(name = "数据模型表", description = "数据模型表接口")
-public class ModelController extends BladeController {
-
- private final IModelService modelService;
- private final IModelPrototypeService modelPrototypeService;
- private final IDatasourceService datasourceService;
-
- /**
- * 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @Operation(summary = "详情", description = "传入model")
- public R
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import jakarta.validation.Valid;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringPool;
-import org.springblade.modules.develop.pojo.entity.ModelPrototype;
-import org.springblade.modules.develop.service.IModelPrototypeService;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 数据原型表 控制器
- *
- * @author Chill
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/model-prototype")
-@Tag(name = "数据原型表", description = "数据原型表接口")
-public class ModelPrototypeController extends BladeController {
-
- private final IModelPrototypeService modelPrototypeService;
-
- /**
- * 详情
- */
- @GetMapping("/detail")
- @ApiOperationSupport(order = 1)
- @Operation(summary = "详情", description = "传入modelPrototype")
- public R
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.develop.pojo.entity.Code;
-
-/**
- * Mapper 接口
- *
- * @author Chill
- */
-public interface CodeMapper extends BaseMapper
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.develop.pojo.entity.CodeSetting;
-
-/**
- * 代码生成器配置表 Mapper 接口
- *
- * @author BladeX
- */
-public interface CodeSettingMapper extends BaseMapper
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.develop.pojo.entity.Datasource;
-
-/**
- * 数据源配置表 Mapper 接口
- *
- * @author Chill
- */
-public interface DatasourceMapper extends BaseMapper
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.develop.pojo.entity.Model;
-
-/**
- * 数据模型表 Mapper 接口
- *
- * @author Chill
- */
-public interface ModelMapper extends BaseMapper
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.develop.pojo.entity.ModelPrototype;
-
-/**
- * 数据原型表 Mapper 接口
- *
- * @author Chill
- */
-public interface ModelPrototypeMapper extends BaseMapper
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.pojo.dto;
-
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.io.Serial;
-import java.io.Serializable;
-
-/**
- * 代码生成DTO
- *
- * @author Chill
- */
-@Data
-public class GeneratorDTO implements Serializable {
-
- @Serial
- private static final long serialVersionUID = 1L;
-
- /**
- * 上级菜单主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @Schema(description = "上级菜单主键")
- private Long menuId;
-
- /**
- * 数据源主键
- */
- @Schema(description = "数据源主键")
- @JsonSerialize(using = ToStringSerializer.class)
- private Long datasourceId;
- /**
- * 模型编号
- */
- @Schema(description = "模型编号")
- private String modelCode;
- /**
- * 物理表名
- */
- @Schema(description = "物理表名")
- private String modelTable;
- /**
- * 模型类名
- */
- @Schema(description = "模型类名")
- private String modelClass;
-
- /**
- * 模块名称
- */
- @Schema(description = "服务名称")
- private String serviceName;
-
- /**
- * 模块名称
- */
- @Schema(description = "模块名称")
- private String codeName;
-
- /**
- * 表名
- */
- @Schema(description = "表名")
- private String tableName;
-
- /**
- * 实体名
- */
- @Schema(description = "表前缀")
- private String tablePrefix;
-
- /**
- * 主键名
- */
- @Schema(description = "主键名")
- private String pkName;
-
- /**
- * 后端包名
- */
- @Schema(description = "后端包名")
- private String packageName;
-
- /**
- * 基础业务模式
- */
- @Schema(description = "基础业务模式")
- private Integer baseMode;
-
- /**
- * 包装器模式
- */
- @Schema(description = "包装器模式")
- private Integer wrapMode;
-
- /**
- * 远程调用模式
- */
- @Schema(description = "远程调用模式")
- private Integer feignMode;
-
- /**
- * 代码风格
- */
- @Schema(description = "代码风格")
- private String codeStyle;
-
- /**
- * 后端路径
- */
- @Schema(description = "后端路径")
- private String apiPath;
-
- /**
- * 前端路径
- */
- @Schema(description = "前端路径")
- private String webPath;
-
-}
diff --git a/src/main/java/org/springblade/modules/develop/pojo/dto/ModelDTO.java b/src/main/java/org/springblade/modules/develop/pojo/dto/ModelDTO.java
deleted file mode 100644
index ffdd2c2..0000000
--- a/src/main/java/org/springblade/modules/develop/pojo/dto/ModelDTO.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * BladeX Commercial License Agreement
- * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
- *
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.pojo.dto;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.develop.pojo.entity.Model;
-import org.springblade.modules.develop.pojo.entity.ModelPrototype;
-
-import java.io.Serial;
-import java.util.List;
-
-/**
- * 代码模型DTO
- *
- * @author Chill
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class ModelDTO extends Model {
-
- @Serial
- private static final long serialVersionUID = 1L;
-
- /**
- * 代码建模原型
- */
- private List
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.pojo.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.io.Serial;
-import java.io.Serializable;
-
-/**
- * 实体类
- *
- * @author Chill
- */
-@Data
-@TableName("blade_code")
-@Schema(description = "Code对象")
-public class Code implements Serializable {
-
- @Serial
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @Schema(description = "主键")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 数据模型主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @Schema(description = "数据模型主键")
- private Long modelId;
-
- /**
- * 上级菜单主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @Schema(description = "上级菜单主键")
- private Long menuId;
-
- /**
- * 模块名称
- */
- @Schema(description = "服务名称")
- private String serviceName;
-
- /**
- * 模块名称
- */
- @Schema(description = "模块名称")
- private String codeName;
-
- /**
- * 表名
- */
- @Schema(description = "表名")
- private String tableName;
-
- /**
- * 实体名
- */
- @Schema(description = "表前缀")
- private String tablePrefix;
-
- /**
- * 主键名
- */
- @Schema(description = "主键名")
- private String pkName;
-
- /**
- * 后端包名
- */
- @Schema(description = "后端包名")
- private String packageName;
-
- /**
- * 模版类型
- */
- @Schema(description = "模版类型")
- private String templateType;
-
- /**
- * 作者信息
- */
- @Schema(description = "作者信息")
- private String author;
-
- /**
- * 子表模型主键
- */
- @Schema(description = "子表模型主键")
- private String subModelId;
-
- /**
- * 子表绑定外键
- */
- @Schema(description = "子表绑定外键")
- private String subFkId;
-
- /**
- * 树主键字段
- */
- @Schema(description = "树主键字段")
- private String treeId;
-
- /**
- * 树父主键字段
- */
- @Schema(description = "树父主键字段")
- private String treePid;
-
- /**
- * 树名称字段
- */
- @Schema(description = "树名称字段")
- private String treeName;
-
- /**
- * 基础业务模式
- */
- @Schema(description = "基础业务模式")
- private Integer baseMode;
-
- /**
- * 包装器模式
- */
- @Schema(description = "包装器模式")
- private Integer wrapMode;
-
- /**
- * 远程调用模式
- */
- @Schema(description = "远程调用模式")
- private Integer feignMode;
-
- /**
- * 代码风格
- */
- @Schema(description = "代码风格")
- private String codeStyle;
-
- /**
- * 后端路径
- */
- @Schema(description = "后端路径")
- private String apiPath;
-
- /**
- * 前端路径
- */
- @Schema(description = "前端路径")
- private String webPath;
-
- /**
- * 是否已删除
- */
- @TableLogic
- @Schema(description = "是否已删除")
- private Integer isDeleted;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/develop/pojo/entity/CodeSetting.java b/src/main/java/org/springblade/modules/develop/pojo/entity/CodeSetting.java
deleted file mode 100644
index ee8f746..0000000
--- a/src/main/java/org/springblade/modules/develop/pojo/entity/CodeSetting.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * BladeX Commercial License Agreement
- * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
- *
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.pojo.entity;
-
-import lombok.Data;
-import io.swagger.v3.oas.annotations.media.Schema;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-
-import java.io.Serializable;
-import java.io.Serial;
-
-/**
- * 代码生成器配置表 实体类
- *
- * @author BladeX
- */
-@Data
-@TableName("blade_code_setting")
-@Schema(description = "CodeSetting对象")
-public class CodeSetting implements Serializable {
-
- @Serial
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @JsonSerialize(using = ToStringSerializer.class)
- @Schema(description = "主键")
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
-
- /**
- * 配置项
- */
- @Schema(description = "配置项")
- private String settings;
-
- /**
- * 状态[1:正常]
- */
- @Schema(description = "业务状态", hidden = true)
- private Integer status;
- /**
- * 是否已删除
- */
- @Schema(description = "是否已删除")
- private Integer isDeleted;
-
-}
diff --git a/src/main/java/org/springblade/modules/develop/pojo/entity/Datasource.java b/src/main/java/org/springblade/modules/develop/pojo/entity/Datasource.java
deleted file mode 100644
index 26c756e..0000000
--- a/src/main/java/org/springblade/modules/develop/pojo/entity/Datasource.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * BladeX Commercial License Agreement
- * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
- *
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.pojo.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.mp.base.BaseEntity;
-
-import java.io.Serial;
-
-/**
- * 数据源配置表实体类
- *
- * @author Chill
- */
-@Data
-@TableName("blade_datasource")
-@EqualsAndHashCode(callSuper = true)
-@Schema(description = "数据源配置表")
-public class Datasource extends BaseEntity {
-
- @Serial
- private static final long serialVersionUID = 1L;
-
- /**
- * 数据源类型
- */
- @Schema(description = "数据源类型")
- private Integer category;
- /**
- * 名称
- */
- @Schema(description = "名称")
- private String name;
- /**
- * 驱动类
- */
- @Schema(description = "驱动类")
- private String driverClass;
- /**
- * 连接地址
- */
- @Schema(description = "连接地址")
- private String url;
- /**
- * 用户名
- */
- @Schema(description = "用户名")
- private String username;
- /**
- * 密码
- */
- @Schema(description = "密码")
- private String password;
- /**
- * 分库分表配置
- */
- @Schema(description = "分库分表配置")
- private String shardingConfig;
- /**
- * 备注
- */
- @Schema(description = "备注")
- private String remark;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/develop/pojo/entity/Model.java b/src/main/java/org/springblade/modules/develop/pojo/entity/Model.java
deleted file mode 100644
index 89b2655..0000000
--- a/src/main/java/org/springblade/modules/develop/pojo/entity/Model.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * BladeX Commercial License Agreement
- * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
- *
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.pojo.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.mp.base.BaseEntity;
-
-import java.io.Serial;
-
-/**
- * 数据模型表实体类
- *
- * @author Chill
- */
-@Data
-@TableName("blade_model")
-@EqualsAndHashCode(callSuper = true)
-@Schema(description = "数据模型表")
-public class Model extends BaseEntity {
-
- @Serial
- private static final long serialVersionUID = 1L;
-
- /**
- * 数据源主键
- */
- @Schema(description = "数据源主键")
- @JsonSerialize(using = ToStringSerializer.class)
- private Long datasourceId;
- /**
- * 模型名称
- */
- @Schema(description = "模型名称")
- private String modelName;
- /**
- * 模型编号
- */
- @Schema(description = "模型编号")
- private String modelCode;
- /**
- * 物理表名
- */
- @Schema(description = "物理表名")
- private String modelTable;
- /**
- * 模型类名
- */
- @Schema(description = "模型类名")
- private String modelClass;
- /**
- * 模型备注
- */
- @Schema(description = "模型备注")
- private String modelRemark;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/develop/pojo/entity/ModelPrototype.java b/src/main/java/org/springblade/modules/develop/pojo/entity/ModelPrototype.java
deleted file mode 100644
index 032ec22..0000000
--- a/src/main/java/org/springblade/modules/develop/pojo/entity/ModelPrototype.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * BladeX Commercial License Agreement
- * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
- *
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.pojo.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.mp.base.BaseEntity;
-
-import java.io.Serial;
-
-/**
- * 数据原型表实体类
- *
- * @author Chill
- */
-@Data
-@TableName("blade_model_prototype")
-@EqualsAndHashCode(callSuper = true)
-@Schema(description = "数据原型表")
-public class ModelPrototype extends BaseEntity {
-
- @Serial
- private static final long serialVersionUID = 1L;
-
- /**
- * 模型主键
- */
- @Schema(description = "模型主键")
- @JsonSerialize(using = ToStringSerializer.class)
- private Long modelId;
- /**
- * 物理列名
- */
- @Schema(description = "物理列名")
- private String jdbcName;
- /**
- * 物理类型
- */
- @Schema(description = "物理类型")
- private String jdbcType;
- /**
- * 注释说明
- */
- @Schema(description = "注释说明")
- private String jdbcComment;
- /**
- * 实体列名
- */
- @Schema(description = "实体列名")
- private String propertyName;
- /**
- * 实体类型
- */
- @Schema(description = "实体类型")
- private String propertyType;
- /**
- * 实体类型引用
- */
- @Schema(description = "实体类型引用")
- private String propertyEntity;
- /**
- * 列表显示
- */
- @Schema(description = "列表显示")
- private Integer isList;
- /**
- * 表单显示
- */
- @Schema(description = "表单显示")
- private Integer isForm;
- /**
- * 独占一行
- */
- @Schema(description = "独占一行")
- private Integer isRow;
- /**
- * 组件类型
- */
- @Schema(description = "组件类型")
- private String componentType;
- /**
- * 字典编码
- */
- @Schema(description = "字典编码")
- private String dictCode;
- /**
- * 是否必填
- */
- @Schema(description = "是否必填")
- private Integer isRequired;
- /**
- * 查询配置
- */
- @Schema(description = "查询配置")
- private Integer isQuery;
- /**
- * 查询类型
- */
- @Schema(description = "查询类型")
- private String queryType;
-
-
-}
diff --git a/src/main/java/org/springblade/modules/develop/service/ICodeService.java b/src/main/java/org/springblade/modules/develop/service/ICodeService.java
deleted file mode 100644
index 2f04371..0000000
--- a/src/main/java/org/springblade/modules/develop/service/ICodeService.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * BladeX Commercial License Agreement
- * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
- *
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service;
-
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.develop.pojo.entity.Code;
-
-/**
- * 服务类
- *
- * @author Chill
- */
-public interface ICodeService extends IService
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.develop.pojo.entity.CodeSetting;
-
-/**
- * 代码生成器配置表 服务类
- *
- * @author BladeX
- */
-public interface ICodeSettingService extends IService
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service;
-
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.develop.pojo.entity.Datasource;
-
-/**
- * 数据源配置表 服务类
- *
- * @author Chill
- */
-public interface IDatasourceService extends BaseService
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service;
-
-
-import org.springblade.modules.develop.pojo.dto.GeneratorDTO;
-
-import java.util.List;
-
-/**
- * 服务类
- *
- * @author Chill
- */
-public interface IGenerateService {
-
- /**
- * 生成代码
- *
- * @param ids 主键集合
- * @return boolean
- */
- boolean code(List
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service;
-
-import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
-import com.baomidou.mybatisplus.generator.config.po.TableInfo;
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.develop.pojo.entity.Datasource;
-import org.springblade.modules.develop.pojo.entity.ModelPrototype;
-
-import java.util.List;
-
-/**
- * 数据原型表 服务类
- *
- * @author Chill
- */
-public interface IModelPrototypeService extends BaseService
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service;
-
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.develop.pojo.entity.Model;
-
-import java.util.List;
-
-/**
- * 数据模型表 服务类
- *
- * @author Chill
- */
-public interface IModelService extends BaseService
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.core.tool.constant.BladeConstant;
-import org.springblade.modules.develop.pojo.entity.Code;
-import org.springblade.modules.develop.mapper.CodeMapper;
-import org.springblade.modules.develop.service.ICodeService;
-import org.springframework.stereotype.Service;
-
-/**
- * 服务实现类
- *
- * @author Chill
- */
-@Service
-public class CodeServiceImpl extends ServiceImpl
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.core.tool.constant.BladeConstant;
-import org.springblade.modules.develop.mapper.CodeSettingMapper;
-import org.springblade.modules.develop.pojo.entity.CodeSetting;
-import org.springblade.modules.develop.service.ICodeSettingService;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * 代码生成器配置表 服务实现类
- *
- * @author BladeX
- */
-@Service
-public class CodeSettingServiceImpl extends ServiceImpl
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service.impl;
-
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.develop.pojo.entity.Datasource;
-import org.springblade.modules.develop.mapper.DatasourceMapper;
-import org.springblade.modules.develop.service.IDatasourceService;
-import org.springframework.stereotype.Service;
-
-/**
- * 数据源配置表 服务实现类
- *
- * @author Chill
- */
-@Service
-public class DatasourceServiceImpl extends BaseServiceImpl
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service.impl;
-
-import com.baomidou.mybatisplus.generator.config.po.TableField;
-import com.baomidou.mybatisplus.generator.config.po.TableInfo;
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.develop.constant.DevelopConstant;
-import org.springblade.develop.support.BladeCodeGenerator;
-import org.springblade.modules.develop.pojo.dto.GeneratorDTO;
-import org.springblade.modules.develop.pojo.entity.Code;
-import org.springblade.modules.develop.pojo.entity.Datasource;
-import org.springblade.modules.develop.pojo.entity.Model;
-import org.springblade.modules.develop.pojo.entity.ModelPrototype;
-import org.springblade.modules.develop.service.*;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-/**
- * 服务实现类
- *
- * @author Chill
- */
-@Service
-@RequiredArgsConstructor
-public class GenerateServiceImpl implements IGenerateService {
-
- private final ICodeService codeService;
- private final IDatasourceService datasourceService;
- private final IModelService modelService;
- private final IModelPrototypeService modelPrototypeService;
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean code(List
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
-import com.baomidou.mybatisplus.generator.config.StrategyConfig;
-import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
-import com.baomidou.mybatisplus.generator.config.po.TableInfo;
-import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.core.tool.utils.StringPool;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.modules.develop.pojo.entity.Datasource;
-import org.springblade.modules.develop.pojo.entity.ModelPrototype;
-import org.springblade.modules.develop.mapper.ModelPrototypeMapper;
-import org.springblade.modules.develop.service.IDatasourceService;
-import org.springblade.modules.develop.service.IModelPrototypeService;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * 数据原型表 服务实现类
- *
- * @author Chill
- */
-@Service
-@RequiredArgsConstructor
-public class ModelPrototypeServiceImpl extends BaseServiceImpl
- * Use of this software is governed by the Commercial License Agreement
- * obtained after purchasing a license from BladeX.
- *
- * 1. This software is for development use only under a valid license
- * from BladeX.
- *
- * 2. Redistribution of this software's source code to any third party
- * without a commercial license is strictly prohibited.
- *
- * 3. Licensees may copyright their own code but cannot use segments
- * from this software for such purposes. Copyright of this software
- * remains with BladeX.
- *
- * Using this software signifies agreement to this License, and the software
- * must not be used for illegal purposes.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
- * not liable for any claims arising from secondary or illegal development.
- *
- * Author: Chill Zhuang (bladejava@qq.com)
- */
-package org.springblade.modules.develop.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.develop.pojo.entity.Code;
-import org.springblade.modules.develop.pojo.entity.Model;
-import org.springblade.modules.develop.pojo.entity.ModelPrototype;
-import org.springblade.modules.develop.mapper.ModelMapper;
-import org.springblade.modules.develop.service.ICodeService;
-import org.springblade.modules.develop.service.IModelPrototypeService;
-import org.springblade.modules.develop.service.IModelService;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-
-/**
- * 数据模型表 服务实现类
- *
- * @author Chill
- */
-@Service
-@RequiredArgsConstructor
-public class ModelServiceImpl extends BaseServiceImpl detail(Code code) {
- Code detail = codeService.getOne(Condition.getQueryWrapper(code));
- return R.data(detail);
- }
-
- /**
- * 分页
- */
- @GetMapping("/list")
- @Parameters({
- @Parameter(name = "codeName", description = "模块名", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
- @Parameter(name = "tableName", description = "表名", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
- @Parameter(name = "modelName", description = "实体名", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
- })
- @ApiOperationSupport(order = 2)
- @Operation(summary = "分页", description = "传入code")
- public R pages = codeService.page(Condition.getPage(query), Condition.getQueryWrapper(code, Code.class));
- return R.data(pages);
- }
-
- /**
- * 新增或修改
- */
- @PostMapping("/submit")
- @ApiOperationSupport(order = 3)
- @Operation(summary = "新增或修改", description = "传入code")
- public R submit(@Valid @RequestBody Code code) {
- return R.status(codeService.submit(code));
- }
-
-
- /**
- * 删除
- */
- @PostMapping("/remove")
- @ApiOperationSupport(order = 4)
- @Operation(summary = "删除", description = "传入ids")
- public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
- return R.status(codeService.removeByIds(Func.toLongList(ids)));
- }
-
- /**
- * 复制
- */
- @PostMapping("/copy")
- @ApiOperationSupport(order = 5)
- @Operation(summary = "复制", description = "传入id")
- public R copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
- Code code = codeService.getById(id);
- code.setId(null);
- code.setCodeName(code.getCodeName() + "-copy");
- return R.status(codeService.save(code));
- }
-
- /**
- * 代码生成
- */
- @PostMapping("/gen-code")
- @ApiOperationSupport(order = 6)
- @Operation(summary = "代码生成", description = "传入ids")
- public R genCode(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
- return R.status(generateService.code(Func.toLongList(ids)));
- }
-
- /**
- * 代码生成
- */
- @PostMapping("/gen-code-fast")
- @ApiOperationSupport(order = 7)
- @Operation(summary = "代码快速生成", description = "传入配置集合")
- public R genCodeFast(@Parameter(description = "主键集合", required = true) @RequestBody GeneratorDTO dto) {
- return R.status(generateService.codeFast(dto));
- }
-
-}
diff --git a/src/main/java/org/springblade/modules/develop/controller/CodeSettingController.java b/src/main/java/org/springblade/modules/develop/controller/CodeSettingController.java
deleted file mode 100644
index db80784..0000000
--- a/src/main/java/org/springblade/modules/develop/controller/CodeSettingController.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * BladeX Commercial License Agreement
- * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
- * > select() {
- List
> select() {
- List
> tableList(Long datasourceId) {
- Datasource datasource = datasourceService.getById(datasourceId);
- ConfigBuilder config = modelPrototypeService.getConfigBuilder(datasource);
- List
> select(@Parameter(description = "数据模型Id", required = true) @RequestParam Long modelId) {
- List
{
-
-}
diff --git a/src/main/java/org/springblade/modules/develop/mapper/CodeMapper.xml b/src/main/java/org/springblade/modules/develop/mapper/CodeMapper.xml
deleted file mode 100644
index dd5ec25..0000000
--- a/src/main/java/org/springblade/modules/develop/mapper/CodeMapper.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- {
-
- /**
- * 提交
- *
- * @param code
- * @return
- */
- boolean submit(Code code);
-
-}
diff --git a/src/main/java/org/springblade/modules/develop/service/ICodeSettingService.java b/src/main/java/org/springblade/modules/develop/service/ICodeSettingService.java
deleted file mode 100644
index c9eb056..0000000
--- a/src/main/java/org/springblade/modules/develop/service/ICodeSettingService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * BladeX Commercial License Agreement
- * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
- * codes = codeService.listByIds(ids);
- codes.forEach(code -> {
- // 创建代码生成器
- BladeCodeGenerator generator = new BladeCodeGenerator();
- // 设置菜单数据
- this.generateMenu(generator, code);
- // 设置配置信息
- this.generateTemplate(generator, code);
- // 设置基础模型
- Model model = modelService.getById(code.getModelId());
- this.generateModel(generator, code, model);
- // 设置数据源
- this.generateDatasource(generator, model);
- // 启动代码生成
- generator.run();
- });
- return true;
- }
-
- @Override
- public boolean codeFast(GeneratorDTO dto) {
- // 创建代码生成器
- BladeCodeGenerator generator = new BladeCodeGenerator();
- Code code = Objects.requireNonNull(BeanUtil.copyProperties(dto, Code.class));
- Model model = Objects.requireNonNull(BeanUtil.copyProperties(dto, Model.class));
- // 设置菜单数据
- this.generateMenu(generator, code);
- // 设置配置信息
- this.generateTemplate(generator, code);
- this.generateModel(generator, code, model);
- // 设置数据源
- this.generateDatasource(generator, model);
- // 启动代码生成
- generator.run();
- return true;
- }
-
- private void generateMenu(BladeCodeGenerator generator, Code code) {
- // 设置上级菜单id
- generator.setMenuId(String.valueOf(code.getMenuId()));
- // 设置是否生成菜单sql
- generator.setHasMenuSql(Boolean.TRUE);
- }
-
- private void generateTemplate(BladeCodeGenerator generator, Code code) {// 设置基础配置
- generator.setCodeStyle(code.getCodeStyle());
- generator.setCodeName(code.getCodeName());
- generator.setServiceName(code.getServiceName());
- generator.setPackageName(code.getPackageName());
- generator.setPackageDir(code.getApiPath());
- generator.setPackageWebDir(code.getWebPath());
- generator.setTablePrefix(Func.toStrArray(code.getTablePrefix()));
- generator.setIncludeTables(Func.toStrArray(code.getTableName()));
- // 设置模版信息
- generator.setTemplateType(Func.toStr(code.getTemplateType(), DevelopConstant.TEMPLATE_CRUD));
- generator.setAuthor(code.getAuthor());
- generator.setSubModelId(code.getSubModelId());
- generator.setSubFkId(code.getSubFkId());
- generator.setTreeId(code.getTreeId());
- generator.setTreePid(code.getTreePid());
- generator.setTreeName(code.getTreeName());
- // 设置是否继承基础业务字段
- generator.setHasSuperEntity(code.getBaseMode() == 2);
- // 设置是否开启包装器模式
- generator.setHasWrapper(code.getWrapMode() == 2);
- // 设置是否开启远程调用模式
- generator.setHasFeign(code.getFeignMode() == 2);
- // 设置控制器服务名前缀
- generator.setHasServiceName(Boolean.TRUE);
- }
-
- private void generateModel(BladeCodeGenerator generator, Code code, Model model) {
- generator.setModelCode(model.getModelCode());
- generator.setModelClass(model.getModelClass());
- generator.setModel(JsonUtil.readMap(JsonUtil.toJson(model)));
-
- // 设置模型集合
- if (Func.isNotEmpty(model.getId())) {
- ListlambdaQuery().in(Code::getModelId, ids)) > 0) {
- boolean codeTemp = codeService.remove(Wrappers.lambdaQuery().in(Code::getModelId, ids));
- if (!codeTemp) {
- throw new ServiceException("删除数据模型成功,关联代码生成配置删除失败");
- }
- }
- }
- return true;
- }
-}