This commit is contained in:
kk
2026-07-08 17:57:11 +08:00
commit f1e6599892
743 changed files with 159169 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.develop.feign;
import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.tool.api.R;
import org.springblade.develop.pojo.entity.Datasource;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* IDatasourceClient
*
* @author Chill
*/
@FeignClient(
value = AppConstant.APPLICATION_DEVELOP_NAME,
fallback = IDatasourceClientFallback.class
)
public interface IDatasourceClient {
String API_PREFIX = "/feign/client/datasource";
String GET_DETAIL = API_PREFIX + "/detail";
String GET_LIST = API_PREFIX + "/list";
/**
* 获取数据源详情
*
* @param id 数据源ID
* @return R
*/
@GetMapping(GET_DETAIL)
R<Datasource> detail(@RequestParam("id") Long id);
/**
* 获取所有数据源列表
*
* @return R
*/
@GetMapping(GET_LIST)
R<List<Datasource>> list();
}

View File

@@ -0,0 +1,52 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.develop.feign;
import org.springblade.core.tool.api.R;
import org.springblade.develop.pojo.entity.Datasource;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 数据源远程调用失败处理类
*
* @author Chill
*/
@Component
public class IDatasourceClientFallback implements IDatasourceClient {
@Override
public R<Datasource> detail(Long id) {
return R.fail("远程调用失败");
}
@Override
public R<List<Datasource>> list() {
return R.fail("远程调用失败");
}
}

View File

@@ -0,0 +1,153 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.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 modelForm;
/**
* 模型类名
*/
@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;
}

View File

@@ -0,0 +1,53 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.develop.pojo.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.develop.pojo.entity.Model;
import org.springblade.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<ModelPrototype> prototypes;
}

View File

@@ -0,0 +1,197 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.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;
}

View File

@@ -0,0 +1,92 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.develop.pojo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
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 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 name;
/**
* 编号
*/
@Schema(description = "编号")
private String code;
/**
* 分类[1:默认配置 2:表单设计]
*/
@Schema(description = "业务状态", hidden = true)
private Integer category;
/**
* 配置项
*/
@Schema(description = "配置项")
private String settings;
/**
* 状态[1:正常]
*/
@Schema(description = "业务状态", hidden = true)
private Integer status;
/**
* 是否已删除
*/
@Schema(description = "是否已删除")
private Integer isDeleted;
}

View File

@@ -0,0 +1,92 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.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;
}

View File

@@ -0,0 +1,85 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.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;
}

View File

@@ -0,0 +1,130 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.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;
}