diff --git a/README.md b/README.md
index 06fd742772b6b09f98432e6eb251de1823b675f7..9fda52ee3c7e5efa190bab0e499938541528846b 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,7 @@ coderMaker 立足于低代码平台,致力于解决软件开发过程中的效
3. 不做任何脚手架,不依赖任何特定框架版本
4. 按开发者习惯支持多模式生成
5. 兼容并蓄,在codemaker的组件化架构设计中一切业务组件,中间件,脚手架都是组件都是可配置可融入到代码生成流程的。
+6. 生成即可运行
#### 功能列表
1. 提供数据库字段文本转sql脚本的能力
@@ -37,7 +38,7 @@ coderMaker 立足于低代码平台,致力于解决软件开发过程中的效
1. 粉红色为codeMaker提供的平台能力工程
2. 浅蓝色为生成代码架构的模板工程
-[模块详细说明](MODULE.md)
+[模块详细说明](doc/md/MODULE.md)
##### 2. 架构图
1. v1版本
@@ -49,6 +50,9 @@ coderMaker 立足于低代码平台,致力于解决软件开发过程中的效
3. v3预览版本
![image](doc/img/天画-低代码平台(codeMaker)-v3-预览版.png)
+ 3. v3版本
+![image](doc/img/天画-低代码平台(codeMaker)-v3版本.png)
+
##### 3. 使用流程图
1. v1版本
![image](doc/img/天画-快速生成springboot微服务工程流程图.png)
@@ -77,21 +81,23 @@ coderMaker 立足于低代码平台,致力于解决软件开发过程中的效
##### 版本3的技术方案设计
[codeMaker-支持动态调用时序代码生成](https://mp.weixin.qq.com/s?__biz=MzI2OTE2OTc3MQ==&mid=2247484106&idx=1&sn=acacbf015246351c7662c900d878e6af&chksm=eae527cedd92aed8de8452dd83061bc729a3007d30d3bbe786abca08c7337530f214a8334f98&token=1918485743&lang=zh_CN#rd)
+[codeMaker-组件化架构升级实战](https://blog.csdn.net/u010504064/article/details/122480997)
#### 使用手册
codeMaker支持多模式进行代码生成,具体看下列文档
-##### [纯数据库模式](USEDBYONLYDB.md)
+##### [纯数据库模式](doc/md/USEDBYONLYDB.md)
-##### [基于PlantUML 的动态DDD模式](USEDBYDYNAMICDDD.md)
+##### [基于PlantUML 的动态DDD模式](doc/md/USEDBYDYNAMICDDD.md)
-##### [基于PlantUML 的动态DDD+数据库模式](USEDBYDBANDDDD.md)
+##### [基于PlantUML 的动态DDD+数据库模式](doc/md/USEDBYDBANDDDD.md)
-##### [基于PlantUML 的动态DDD+数据库+plantUML调用时序图文档模式](USEDBYDBANDPLANTUML.md)
+##### [基于PlantUML 的动态DDD+数据库+plantUML调用时序图文档模式](doc/md/USEDBYDBANDPLANTUML.md)
-##### 基于PlantUML 的动态DDD+基于PlantUML的E-R数据模型模式(todo)
+##### [基于全文档模式](doc/md/USEDBYALLDOC.md)
+##### [基于JavsScript项目模式](doc/md/USEDBYJAVSSCRIPT.md)
-#### [版本变更-详细内容](CHANGELIST.md)
+#### [版本变更-详细内容](doc/md/CHANGELIST.md)
##### 版本-1.0.0
@@ -125,18 +131,21 @@ codeMaker支持多模式进行代码生成,具体看下列文档
简介: 进行组件化架构升级,开放低代码模型和扩展接口能力,重构codemaker-core模块,移动到codemaker-parent模块统一维护,
增加springcloud-feign应用框架代码生成能力
+##### 版本-1.3.0
+简介: 以生成即可运行为目标完成组件化架构升级,以组件市场的方式融合各种java组件和技术栈,
+增加两种生成模式,对接javsScript引擎细化生成逻辑
#### 项目计划
1. 参考todoList文件内容
-2. [参考changeList文件内容](CHANGELIST.md)
+2. [参考changeList文件内容](doc/md/CHANGELIST.md)
#### 配置文件说明
-[组件注册流程与二次开发说明文档](COMPOENTREGIST.md)
+[组件注册流程与二次开发说明文档](doc/md/COMPOENTREGIST.md)
-[开发使用详细配置内容](CONFIG.md)
+[开发使用详细配置内容](doc/md/CONFIG.md)
-[构建DDD-plantUML领域文档使用说明](DDDPLANTUMLDOC.md)
+[构建DDD-plantUML领域文档使用说明](doc/md/DDDPLANTUMLDOC.md)
#### 代码生成服务使用流程
##### 1.应用级项目生成
@@ -155,21 +164,6 @@ codeMaker支持多模式进行代码生成,具体看下列文档
4. 执行完毕查看codemaker-dynamicddd工程模块下的代码是否已经生成
##### 3.接口文档
-[API.md](API.md)
-
-#### 参与贡献
-
-1. Fork 本仓库
-2. 新建 Feat_xxx 分支,需求todo参考todoList文档
-3. 提交代码
-4. 新建 Pull Request
-
+[API.md](doc/md/API.md)
-#### 码云特技
-1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
-2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
-3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
-4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
-5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
-6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
\ No newline at end of file
diff --git a/codemaker-cola/cola-domain/pom.xml b/codemaker-cola/cola-domain/pom.xml
index 3e2db3053ed576f5cd1981b8c420ad239d7df514..1669e45efb774ac3c8c4d346080d3c178a174c84 100644
--- a/codemaker-cola/cola-domain/pom.xml
+++ b/codemaker-cola/cola-domain/pom.xml
@@ -35,7 +35,6 @@
org.projectlombok
lombok
- 1.18.8
diff --git a/codemaker-cola/pom.xml b/codemaker-cola/pom.xml
index 39b10d2ed35f2268d4411cf4c5ab706b23122058..9e3cf775a660d585b768405a4ce534f3bc31a4bf 100644
--- a/codemaker-cola/pom.xml
+++ b/codemaker-cola/pom.xml
@@ -114,11 +114,6 @@
1.2.72
-
- com.dtflys.forest
- forest-spring-boot-starter
- 1.5.16
-
commons-lang
diff --git a/codemaker-core/.idea/.gitignore b/codemaker-core/.idea/.gitignore
deleted file mode 100644
index 5c98b428844d9f7d529e2b6fb918d15bf072f3df..0000000000000000000000000000000000000000
--- a/codemaker-core/.idea/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Default ignored files
-/workspace.xml
\ No newline at end of file
diff --git a/codemaker-core/codermaker-core.iml b/codemaker-core/codermaker-core.iml
deleted file mode 100644
index 7db19df1967ddd6ad7117771b3089f052d137b69..0000000000000000000000000000000000000000
--- a/codemaker-core/codermaker-core.iml
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/bean/ErPictureBean.java b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/bean/ErPictureBean.java
index 91ef5054d452dc5dee93de6dc3002404c2718b36..0f29c1e55361b87620258f67a07821c09dd30e4d 100644
--- a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/bean/ErPictureBean.java
+++ b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/bean/ErPictureBean.java
@@ -6,7 +6,7 @@ import java.util.Map;
* Description:e-r图示例
* date: 2020/10/20
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/bean/TableBean.java b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/bean/TableBean.java
index f2fc2bc21d732aeed564172edbb2b9b4167cbe70..8e17b94ad2bcd3db4498322190faba408ebfe122 100644
--- a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/bean/TableBean.java
+++ b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/bean/TableBean.java
@@ -5,7 +5,7 @@ import java.util.List;
/**
* Created on 2018-7-19.
*
- * @author: fanchunshuai
+ * @author: shenshuai
* @version: V1.0
* @Desc:表信息描述
*/
diff --git a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureService.java b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureService.java
index 91b6a06f015b5dae45ea9034bcdb28c740ad17d9..13a5ff9ec9f76b2e242f7efe97b11d8ac109ebc7 100644
--- a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureService.java
+++ b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureService.java
@@ -9,7 +9,7 @@ import java.util.List;
* Description: 生成e-r图的服务接口
* date: 2020/10/20
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureServiceHelper.java b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureServiceHelper.java
index 04a5f8e9a09e99a83d850610959e213b91c56590..67e8d7c09324596d848325bd4b0a93a12da1cc43 100644
--- a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureServiceHelper.java
+++ b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureServiceHelper.java
@@ -16,7 +16,7 @@ import java.util.stream.Collectors;
* Description: 辅助类
* date: 2020/10/20
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureServiceImpl.java b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureServiceImpl.java
index cf3c9b2031b8ab8590cf7fc8d84ab051dd7dfb49..a503c85dc23b8d64df4201c67b080719cda26917 100644
--- a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureServiceImpl.java
+++ b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureServiceImpl.java
@@ -11,7 +11,7 @@ import java.util.Map;
* Description:
* date: 2020/10/20
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureWriteService.java b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureWriteService.java
index 3a9eea608bcb18a7df5958b418d8d8c31e14c1e6..dc4910ef16f8ec2de8f03ddab321ba4bfc470dc3 100644
--- a/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureWriteService.java
+++ b/codemaker-dberPicture/src/main/java/com/coderman/codemaker/dbergenerate/service/ErPictureWriteService.java
@@ -11,7 +11,7 @@ import java.util.Map;
* Description:
* date: 2020/10/20
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-dberparse/pom.xml b/codemaker-dberparse/pom.xml
index 38d1c10ae753cdec03cced288ade1ecdbeccec85..d1fa26a2625b7cf377a7c604669aaa88ca79f3d6 100644
--- a/codemaker-dberparse/pom.xml
+++ b/codemaker-dberparse/pom.xml
@@ -6,7 +6,7 @@
com.coderman.codermaker.dberparse
codemaker-dberparse
- 1.0.0-SNAPSHOT
+ 1.0.1-SNAPSHOT
codemaker-dberparse
diff --git a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/Constants.java b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/Constants.java
index 768be8a596379caea181b573949f0dea35ba0ab8..aa9cb4c0b7fc1aa06536372d8c7778b5cb4bdd6d 100644
--- a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/Constants.java
+++ b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/Constants.java
@@ -4,7 +4,7 @@ package com.coderman.codemaker.dberparse;
* Description:
* date: 2021/8/19
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPantUMLParseService.java b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPlantUMLParseService.java
similarity index 55%
rename from codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPantUMLParseService.java
rename to codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPlantUMLParseService.java
index 5b046270f3c56aac23851855d9a8f2625416c840..e2d13e84c83b78b72073f2226cb2a4a976e70c6b 100644
--- a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPantUMLParseService.java
+++ b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPlantUMLParseService.java
@@ -1,5 +1,6 @@
package com.coderman.codemaker.dberparse;
+import com.coderman.codemaker.dberparse.bean.EntityBean;
import com.coderman.codemaker.dberparse.bean.ParseRequestBean;
import java.util.List;
@@ -8,15 +9,24 @@ import java.util.List;
* Description:
* date: 2021/8/12
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
-public interface ERPantUMLParseService {
+public interface ERPlantUMLParseService {
/**
* e-r图解析入口
* @param contentList
* @return 解析完成的DDL语句
*/
List parseERPlantUML(List contentList);
+
+ /**
+ * 根据plantuml 内容构建数据库表模型
+ * @param contentList
+ * @return
+ */
+ List getPlantUmlContextBean(List contentList);
+
+
}
diff --git a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPantUMLParseServiceImpl.java b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPlantUMLParseServiceImpl.java
similarity index 52%
rename from codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPantUMLParseServiceImpl.java
rename to codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPlantUMLParseServiceImpl.java
index 3e528cd99063a5e7aff5bbc940dc6bff9f6ef277..8d358c9bedfb0bc1282c249a907fd8bcc15fc1de 100644
--- a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPantUMLParseServiceImpl.java
+++ b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/ERPlantUMLParseServiceImpl.java
@@ -1,131 +1,139 @@
package com.coderman.codemaker.dberparse;
-import com.alibaba.fastjson.JSON;
import com.coderman.codemaker.dberparse.bean.EntityBean;
import com.coderman.codemaker.dberparse.bean.EntityFieldBean;
-import com.coderman.codemaker.dberparse.bean.ParseRequestBean;
import com.coderman.codemaker.dberparse.enums.ColumnTypeEnums;
import org.apache.commons.lang.StringUtils;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
* Description:
* date: 2021/8/12
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
-public class ERPantUMLParseServiceImpl implements ERPantUMLParseService {
+public class ERPlantUMLParseServiceImpl implements ERPlantUMLParseService {
@Override
public List parseERPlantUML(List contentList) {
List list = getPlantUmlContextBean(contentList);
- System.out.println(JSON.toJSONString(list));
List ddlList = new ArrayList<>();
- list.stream().forEach(tableEntity-> ddlList.add(getDDLSQL(tableEntity)));
+ if(CollectionUtils.isEmpty(list)){
+ return ddlList;
+ }
+ list.stream().forEach(tableEntity -> ddlList.add(getDDLSQL(tableEntity)));
return ddlList;
}
/**
* 通过表字段模型构建DDL sql
+ *
* @param tableBean
* @return
*/
- private String getDDLSQL(EntityBean tableBean){
+ private String getDDLSQL(EntityBean tableBean) {
StringBuilder sqlBuilder = new StringBuilder();
- sqlBuilder.append("CREATE TABLE `" + tableBean.getTableName()+"`(");
- for (EntityFieldBean entityFieldBean : tableBean.getColumnBeanList()){
- sqlBuilder.append("`" + entityFieldBean.getColumnName() + "` ");
+ sqlBuilder.append("CREATE TABLE `" + tableBean.getTableName() + "`(\n");
+ for (EntityFieldBean entityFieldBean : tableBean.getColumnBeanList()) {
+ sqlBuilder.append("\t`" + entityFieldBean.getColumnName() + "` ");
sqlBuilder.append(entityFieldBean.getColumnType());
- if(entityFieldBean.getColumnName().equals("id")){
+ if (entityFieldBean.getColumnName().equals("id")) {
sqlBuilder.append(" NOT NULL AUTO_INCREMENT ");
- }else {
- sqlBuilder.append(" NOT NULL DEFAULT "+entityFieldBean.getDefaultValue());
+ } else {
+ sqlBuilder.append(" NOT NULL DEFAULT " + entityFieldBean.getDefaultValue());
}
- sqlBuilder.append(" COMMENT '"+entityFieldBean.getColumnDesc()+"',");
+ sqlBuilder.append(" COMMENT '" + entityFieldBean.getColumnDesc().trim() + "',\n");
}
- if(!CollectionUtils.isEmpty(tableBean.getIndexBeanList())){
- for (EntityFieldBean indexFieldBean : tableBean.getIndexBeanList()){
- if(indexFieldBean.getPkey() != null && indexFieldBean.getPkey()){
- sqlBuilder.append(" PRIMARY KEY (`"+indexFieldBean.getColumnName()+"`),");
+ if (!CollectionUtils.isEmpty(tableBean.getIndexBeanList())) {
+ for (EntityFieldBean indexFieldBean : tableBean.getIndexBeanList()) {
+ if (indexFieldBean.getPkey() != null && indexFieldBean.getPkey()) {
+ sqlBuilder.append(" PRIMARY KEY (`" + indexFieldBean.getColumnName() + "`),\n");
continue;
}
- if(indexFieldBean.getUKey() != null && indexFieldBean.getUKey()){
+ if (indexFieldBean.getUKey() != null && indexFieldBean.getUKey()) {
String uKeyName = getUkeyIndexName(indexFieldBean.getColumnName());
String uColumnNames = getUkeyColumnName(indexFieldBean.getColumnName());
- sqlBuilder.append(" UNIQUE KEY `"+uKeyName+"` ("+uColumnNames+") COMMENT '联合唯一索引',");
+ sqlBuilder.append(" UNIQUE KEY `" + uKeyName + "` (" + uColumnNames + ") COMMENT '联合唯一索引',\n");
continue;
}
- sqlBuilder.append(" KEY `idx_"+indexFieldBean.getColumnName()+"` (`"+indexFieldBean.getColumnName()+"`),");
+ sqlBuilder.append(" KEY `idx_" + indexFieldBean.getColumnName() + "` (`" + indexFieldBean.getColumnName() + "`),\n");
}
}
- sqlBuilder = sqlBuilder.deleteCharAt(sqlBuilder.length()-1);
- sqlBuilder.append(") ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT = '"+tableBean.getTableDesc()+"';\n");
- System.out.println(sqlBuilder.toString());
+ sqlBuilder = sqlBuilder.deleteCharAt(sqlBuilder.length() - 1);
+ sqlBuilder.append(") \nENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT = '" + tableBean.getTableDesc() + "';\n\n");
+
return sqlBuilder.toString();
}
-
- private String getUkeyIndexName(String columns){
- String [] arr = columns.split(",");
+ private String getUkeyIndexName(String columns) {
+ String[] arr = columns.split(",");
StringBuilder builder = new StringBuilder("uniq");
- for (String col : arr){
- builder.append("_"+col.substring(0,1));
+ for (String col : arr) {
+ builder.append("_" + col.substring(0, 1));
}
return builder.toString();
}
/**
* 处理联合主键
+ *
* @param columns
* @return
*/
- private String getUkeyColumnName(String columns){
- String [] arr = columns.split(",");
+ private String getUkeyColumnName(String columns) {
+ String[] arr = columns.split(",");
StringBuilder builder = new StringBuilder();
- for (String col : arr){
- builder.append("`"+col+"`,");
+ for (String col : arr) {
+ builder.append("`" + col + "`,");
}
- return builder.deleteCharAt(builder.length()-1).toString();
+ return builder.deleteCharAt(builder.length() - 1).toString();
}
/**
* 解析plantUML文件内容
+ *
* @return
*/
- private List getPlantUmlContextBean(List contentList){
+ public List getPlantUmlContextBean(List contentList) {
+ if(CollectionUtils.isEmpty(contentList)){
+ return null;
+ }
+
List elementList = new ArrayList<>();
List entityBeanList = new ArrayList<>();
//对entity进行解析
- for(String str : contentList){
- if(StringUtils.isEmpty(str) || str.contains("@startuml") || str.contains("package")){
+ for (String str : contentList) {
+ if (StringUtils.isEmpty(str) || str.contains("@startuml") || str.contains("package")) {
continue;
}
- if(str.trim().contains("{")){
+ if (str.trim().contains("{")) {
elementList.add(str.trim());
continue;
}
- if(str.trim().contains("}")){
+ if (str.trim().contains("}")) {
elementList.add(str.trim());
- parseClassElement(elementList,entityBeanList);
+ parseClassElement(elementList, entityBeanList);
elementList.clear();
continue;
}
- if(str.trim().contains(":") || (str.trim().contains("key") && str.trim().contains("extend"))){
+ if (str.trim().contains(":") || (str.trim().contains("key") && str.trim().contains("extend"))) {
elementList.add(str.trim());
}
}
@@ -136,38 +144,37 @@ public class ERPantUMLParseServiceImpl implements ERPantUMLParseService {
/**
* 解析文件内容整体路由
+ *
* @param elementList
* @param entityBeanList
*/
- private void parseClassElement(List elementList, List entityBeanList){
+ private void parseClassElement(List elementList, List entityBeanList) {
EntityBean columnBean = buildClassBean(elementList);
entityBeanList.add(columnBean);
}
-
/**
* 解析class类型数据
+ *
* @param elementList
* @return
*/
- private EntityBean buildClassBean(List elementList ){
+ private EntityBean buildClassBean(List elementList) {
EntityBean entityBean = new EntityBean();
- String[] array = elementList.get(0).trim().replace("{","").trim().split(" ");
+ String[] array = elementList.get(0).trim().replace("{", "")
+ .replace("entity", "")
+ .replace("as ", "")
+ .replace("\"", "").trim().split(" ");
- String classMetaInfoArr = array[1];
- List columnBeanList = getColumnBeanList(elementList.subList(1,elementList.size()));
- List indexBeanList = getIndexBeanList(elementList.subList(1,elementList.size()));
+ List columnBeanList = getColumnBeanList(elementList.subList(1, elementList.size()));
+ List indexBeanList = getIndexBeanList(elementList.subList(1, elementList.size()));
entityBean.setColumnBeanList(columnBeanList);
entityBean.setIndexBeanList(indexBeanList);
- if(classMetaInfoArr.contains("-")){
- entityBean.setTableName(classMetaInfoArr.split("-")[0].replace("\"",""));
- entityBean.setTableDesc(classMetaInfoArr.split("-")[1].replace("\"",""));
- }else {
- entityBean.setTableName(classMetaInfoArr.replace("\"",""));
- entityBean.setTableDesc(array[2].replace("\"",""));
- }
+
+ entityBean.setTableName(array[0]);
+ entityBean.setTableDesc(array[1]);
return entityBean;
}
@@ -175,42 +182,43 @@ public class ERPantUMLParseServiceImpl implements ERPantUMLParseService {
/**
* 获取表字段信息
+ *
* @param elementList
* @return
*/
- private List getColumnBeanList(List elementList){
+ private List getColumnBeanList(List elementList) {
List fieldBeanList = new ArrayList<>();
- for (String fieldStr : elementList){
- if(fieldStr.contains("key") && fieldStr.contains("extend")){
+ for (String fieldStr : elementList) {
+ if (fieldStr.contains("key") && fieldStr.contains("extend")) {
break;
}
- if(!fieldStr.trim().contains(":")){
+ if (!fieldStr.trim().contains(":")) {
continue;
}
String[] fieldArr = fieldStr.trim().split(":");
EntityFieldBean entityFieldBean = new EntityFieldBean();
- String [] tagArr = fieldArr[1].split("/");
+ String[] tagArr = fieldArr[1].split("/");
entityFieldBean.setColumnDesc(tagArr[0]);
entityFieldBean.setColumnName(fieldArr[0]);
- if(tagArr.length == 2) {
+ if (tagArr.length == 2) {
entityFieldBean.setColumnType(tagArr[1]);
}
- if(tagArr.length == 3) {
+ if (tagArr.length == 3) {
entityFieldBean.setDefaultValue(tagArr[1]);
entityFieldBean.setColumnType(tagArr[2]);
}
- if (StringUtils.isEmpty(entityFieldBean.getDefaultValue())){
- if(ColumnTypeEnums.isInt(entityFieldBean.getColumnType())){
+ if (StringUtils.isEmpty(entityFieldBean.getDefaultValue())) {
+ if (ColumnTypeEnums.isInt(entityFieldBean.getColumnType())) {
entityFieldBean.setDefaultValue("0");
}
- if(ColumnTypeEnums.isVarchar(entityFieldBean.getColumnType())){
+ if (ColumnTypeEnums.isVarchar(entityFieldBean.getColumnType())) {
entityFieldBean.setDefaultValue("''");
}
- if(ColumnTypeEnums.isDate(entityFieldBean.getColumnType())){
+ if (ColumnTypeEnums.isDate(entityFieldBean.getColumnType())) {
entityFieldBean.setDefaultValue("'2000-01-01 00:00:00'");
}
}
@@ -222,38 +230,39 @@ public class ERPantUMLParseServiceImpl implements ERPantUMLParseService {
/**
* 获取索引信息
+ *
* @param elementList
* @return
*/
- private List getIndexBeanList(List elementList){
+ private List getIndexBeanList(List elementList) {
List indexBeanList = new ArrayList<>();
- int index = 0;
- for (int i = 0;i < elementList.size();i ++){
+ int index = 0;
+ for (int i = 0; i < elementList.size(); i++) {
- if(elementList.get(i).contains("key") && elementList.get(i).contains("extend")){
- index = i+1;
+ if (elementList.get(i).contains("key") && elementList.get(i).contains("extend")) {
+ index = i + 1;
break;
}
}
- for (String fieldStr : elementList.subList(index,elementList.size())){
- EntityFieldBean indexFieldBean =new EntityFieldBean();
- if(!fieldStr.contains(":")){
+ for (String fieldStr : elementList.subList(index, elementList.size())) {
+ EntityFieldBean indexFieldBean = new EntityFieldBean();
+ if (!fieldStr.contains(":")) {
continue;
}
- String [] indexArr = fieldStr.split(":");
- if(indexArr[0].toLowerCase().equals(Constants.PKEY)){
+ String[] indexArr = fieldStr.split(":");
+ if (indexArr[0].toLowerCase().equals(Constants.PKEY)) {
indexFieldBean.setPkey(true);
indexFieldBean.setColumnName(indexArr[1]);
indexBeanList.add(indexFieldBean);
}
- if(indexArr[0].toLowerCase().equals(Constants.UKEY)){
+ if (indexArr[0].toLowerCase().equals(Constants.UKEY)) {
indexFieldBean.setUKey(true);
indexFieldBean.setColumnName(indexArr[1]);
indexBeanList.add(indexFieldBean);
}
- if(indexArr[0].toLowerCase().equals(Constants.KEY)){
+ if (indexArr[0].toLowerCase().equals(Constants.KEY)) {
indexFieldBean.setColumnName(indexArr[1]);
indexBeanList.add(indexFieldBean);
}
@@ -262,4 +271,20 @@ public class ERPantUMLParseServiceImpl implements ERPantUMLParseService {
return indexBeanList;
}
+ /**
+ * 判断字符串中是否包含中文
+ *
+ * @param str 待校验字符串
+ * @return 是否为中文
+ * @warn 不能校验是否为中文标点符号
+ */
+ public static boolean isContainChinese(String str) {
+ Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
+ Matcher m = p.matcher(str);
+ if (m.find()) {
+ return true;
+ }
+ return false;
+ }
+
}
diff --git a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/Main.java b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/Main.java
index 79bbda892f523e323a694b29d31216d89e1d6d91..adb236bc3d4e8c40ddf1d8e9bcecf6c2c069c47b 100644
--- a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/Main.java
+++ b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/Main.java
@@ -1,6 +1,5 @@
package com.coderman.codemaker.dberparse;
-import com.coderman.codemaker.dberparse.bean.ParseRequestBean;
import org.apache.commons.io.FileUtils;
import org.springframework.util.ResourceUtils;
@@ -12,13 +11,13 @@ import java.util.List;
* Description:
* date: 2021/8/12
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
public class Main {
public static void main(String[] args) {
- ERPantUMLParseService erPantUMLParseService = new ERPantUMLParseServiceImpl();
+ ERPlantUMLParseService erPantUMLParseService = new ERPlantUMLParseServiceImpl();
erPantUMLParseService.parseERPlantUML(readPlantUMLContent());
}
diff --git a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/EntityBean.java b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/EntityBean.java
index 2d5960bf107222e4181e77837b64b1309cc10a06..e9a53a55131ea8b772316ffd592320e7aca926df 100644
--- a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/EntityBean.java
+++ b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/EntityBean.java
@@ -6,7 +6,7 @@ import java.util.List;
* Description:
* date: 2021/8/12
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
* 表entity模型
diff --git a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/EntityFieldBean.java b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/EntityFieldBean.java
index ca9b0c293e65769c5af8b735cd3e80fb055de101..e5b1af611855d0f0949124e4427492b199d3ab29 100644
--- a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/EntityFieldBean.java
+++ b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/EntityFieldBean.java
@@ -4,7 +4,7 @@ package com.coderman.codemaker.dberparse.bean;
* Description:
* date: 2021/8/12
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
* 表字段模型
diff --git a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/ParseRequestBean.java b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/ParseRequestBean.java
index b3ceb58c46e4f2f73f59428b1f18b026ffb1c770..5dc43bb692bf7744bd944c4d678b82317f347f3b 100644
--- a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/ParseRequestBean.java
+++ b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/bean/ParseRequestBean.java
@@ -6,7 +6,7 @@ import java.util.List;
* Description:
* date: 2021/8/12
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/enums/ColumnTypeEnums.java b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/enums/ColumnTypeEnums.java
index f28748d2869b62a9b7b8a45013cf86e32cc264c3..3834a9cf1ab0a911cf94d79a5190691fe7a259f6 100644
--- a/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/enums/ColumnTypeEnums.java
+++ b/codemaker-dberparse/src/main/java/com/coderman/codemaker/dberparse/enums/ColumnTypeEnums.java
@@ -4,7 +4,7 @@ package com.coderman.codemaker.dberparse.enums;
* Description:
* date: 2021/8/13
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-dbops/pom.xml b/codemaker-dbops/pom.xml
index b06a11eac393de7af9e0cae3c0d08a9b5c61a543..b9a7ee5221a3565a7ed88ee01d66fc42ab07e69b 100644
--- a/codemaker-dbops/pom.xml
+++ b/codemaker-dbops/pom.xml
@@ -73,7 +73,7 @@
com.coderman.codermaker.dberparse
codemaker-dberparse
- 1.0.0-SNAPSHOT
+ 1.0.1-SNAPSHOT
diff --git a/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/controller/GeneratorSqlDDLController.java b/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/controller/GeneratorSqlDDLController.java
index e92c8abcc2ce4a83f1bc2694817d1b213b79d376..c9a625a21c83c1ed9759bdab75bc2c245d7323ae 100644
--- a/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/controller/GeneratorSqlDDLController.java
+++ b/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/controller/GeneratorSqlDDLController.java
@@ -1,6 +1,5 @@
package com.coderman.codemaker.dbops.controller;
-import com.coderman.codemaker.dberparse.bean.ParseRequestBean;
import com.coderman.codemaker.dbops.service.DBErParseService;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -17,7 +16,7 @@ import java.io.IOException;
* Description:
* date: 2021/8/24
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/service/DBErParseService.java b/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/service/DBErParseService.java
index 071ba1b23ea95363194a95b4ce2659131bc39fe6..54e8d3a536c7263c9bdf903adb436bcc61c47328 100644
--- a/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/service/DBErParseService.java
+++ b/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/service/DBErParseService.java
@@ -10,7 +10,7 @@ import java.util.List;
* Description:
* date: 2021/8/24
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/service/DBErParseServiceImpl.java b/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/service/DBErParseServiceImpl.java
index 05d43719987b1d97a7830d679aa5aea3b4bbe8e2..290f84ed0bae71081782e05d1db4b76000aa3dcb 100644
--- a/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/service/DBErParseServiceImpl.java
+++ b/codemaker-dbops/src/main/java/com/coderman/codemaker/dbops/service/DBErParseServiceImpl.java
@@ -1,7 +1,7 @@
package com.coderman.codemaker.dbops.service;
-import com.coderman.codemaker.dberparse.ERPantUMLParseService;
-import com.coderman.codemaker.dberparse.ERPantUMLParseServiceImpl;
+import com.coderman.codemaker.dberparse.ERPlantUMLParseService;
+import com.coderman.codemaker.dberparse.ERPlantUMLParseServiceImpl;
import com.coderman.codemaker.dberparse.bean.ParseRequestBean;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Value;
@@ -18,23 +18,23 @@ import java.util.List;
* Description:
* date: 2021/8/24
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@Service
@Component
public class DBErParseServiceImpl implements DBErParseService{
- private ERPantUMLParseService erPantUMLParseService = new ERPantUMLParseServiceImpl();
+ private ERPlantUMLParseService erPantUMLParseService = new ERPlantUMLParseServiceImpl();
@Value("${sqlfile.path}")
private String path;
@Override
public List parseERPlantUML(List contentList,String fileName) throws IOException {
List sqlContent = erPantUMLParseService.parseERPlantUML(contentList);
File file = new File(path+"/"+fileName+".sql");
- if(!file.exists()){
+ /* if(!file.exists()){
file.createNewFile();
- }
+ }*/
FileUtils.writeLines(file,sqlContent);
return sqlContent;
}
diff --git a/codemaker-dbops/src/main/resources/application.properties b/codemaker-dbops/src/main/resources/application.properties
index f3448209531f6fc82c1bf93d4b4a3ab9e7c9c0be..355715b4c1c1d5e25e169f7209d4f2d4273a8ead 100644
--- a/codemaker-dbops/src/main/resources/application.properties
+++ b/codemaker-dbops/src/main/resources/application.properties
@@ -1,2 +1,2 @@
server.port=8097
-sqlfile.path=/Users/dasouche/scworkspace/sourceSpace/code-maker/codemaker-dbops/er-sql
\ No newline at end of file
+sqlfile.path=/Users/shenshuai/scworkspace/myspace/code-maker/codemaker-dbops/er-sql
\ No newline at end of file
diff --git a/codemaker-dbops/src/main/resources/er-plantuml/express-db.puml b/codemaker-dbops/src/main/resources/er-plantuml/express-db.puml
new file mode 100644
index 0000000000000000000000000000000000000000..634fcc0bbafdd0db08287b42adec11b6b828a306
--- /dev/null
+++ b/codemaker-dbops/src/main/resources/er-plantuml/express-db.puml
@@ -0,0 +1,109 @@
+@startuml
+' hide the spot
+hide circle
+
+' avoid problems with angled crows feet
+skinparam linetype ortho
+
+entity "address_list 发件人常用地址" as address_list {
+ id: 主键/bigint(20) unsigned
+ province_id: 所在省份ID/varchar(20)
+ city_id: 所在城市ID/varchar(20)
+ area_id: 所在区域ID/varchar(20)
+ street_id: 所在街道ID/varchar(20)
+ site_code: 快递站点编码/varchar(30)
+ address_detail: 具体地址/varchar(256)
+ user_id: 用户ID/varchar(20)
+ is_often: 是否是常用地址/int(11)
+ date_create: 创建时间/timestamp
+ date_update: 修改时间/timestamp
+ update_user_id: 修改人/bigint(20)
+ create_user_id: 创建人/bigint(20)
+}
+
+entity "express_items 快递物品信息" as express_items {
+ id: 主键/bigint(20) unsigned
+ item_type: 物品类型/int(11)
+ forecast_weight: 预估重量/int(11)
+ remark: 备注/varchar(256)
+ volume: 物品体积/int(11)
+ date_create: 创建时间/timestamp
+ date_update: 修改时间/timestamp
+ update_user_id: 修改人/bigint(20)
+ create_user_id: 创建人/bigint(20)
+}
+
+entity "express_order 快递订单信息" as express_order {
+ id: 主键/bigint(20) unsigned
+ addresser_user_id: 发件人id/varchar(20)
+ addresser_user_name: 发件人姓名/varchar(20)
+ addresser_telphone: 发件人电话/varchar(20)
+ send_address: 发件人地址/varchar(256)
+ recipient_user_id: 收件人id/varchar(20)
+ recipient_user_name: 收件人姓名/varchar(20)
+ recipient_telphone: 收件人电话/varchar(20)
+ order_status: 订单状态/int(11)
+ receive_address: 收件人地址/varchar(256)
+ price: 订单金额/bigint(20)
+ order_code: 订单编号/varchar(64)
+ order_source: 订单来源/varchar(64)
+ express_order_bus_type: 订单业务类型/int(11)
+ express_item_id: 物品ID/bigint(11)
+ date_create: 订单创建时间/timestamp
+ date_update: 修改时间/timestamp
+ update_user_id: 修改人/bigint(20)
+ create_user_id: 创建人/bigint(20)
+ mark_content: 快递备注/varchar(256)
+}
+
+
+entity "express_order_trace 快递订单轨迹信息" as express_order_trace {
+ id: 主键/bigint(20) unsigned
+
+ date_create: 创建时间/timestamp
+ date_update: 修改时间/timestamp
+ update_user_id: 修改人/bigint(20)
+ create_user_id: 创建人/bigint(20)
+}
+
+
+entity "express_site 快递站点信息" as express_site {
+ id: 主键/bigint(20) unsigned
+ province_id: 所在省份ID/varchar(20)
+ city_id: 所在城市ID/varchar(20)
+ area_id: 所在区域ID/varchar(20)
+ street_id: 所在街道ID/varchar(20)
+ site_code: 快递站点编码/varchar(30)
+ address_detail: 具体地址/varchar(256)
+ owner_name: 快递网点负责人姓名/varchar(20)
+ tel_phone: 快递网点负责人电话/varchar(20)
+ cooperation_type: 合作方式/int(11)
+}
+
+entity "express_trace 快递物流轨迹信息" as express_trace {
+ id: 主键/bigint(20) unsigned
+ order_code: 快递订单号/varchar(64)
+ address_name: 快递到达地点/varchar(128)
+ desc: 物流轨迹描述/varchar(256)
+ source_code: 物流轨迹上传来源/varchar(64)
+ arrive_date: 快递到达时间/timestamp
+ date_create: 轨迹创建时间/timestamp
+ date_update: 修改时间/timestamp
+ update_user_id: 修改人/bigint(20)
+ create_user_id: 创建人/bigint(20)
+}
+
+entity "price_config 快递价格配置" as price_config {
+ id: 主键/bigint(20) unsigned
+ start_province: 发送省份/varchar(20)
+ end_province: 接收省份/varchar(20)
+ weight_basic: 基本重量/int(11)
+ price_basic: 基本价格/int(11)
+ over_weight_price: 超重价格/int(11)
+ date_create: 创建时间/timestamp
+ date_update: 修改时间/timestamp
+ update_user_id: 修改人/bigint(20)
+ create_user_id: 创建人/bigint(20)
+}
+
+@enduml
\ No newline at end of file
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/AdminAuthorityFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/AdminAuthorityFacadeTest.java
index 2710ca23fc909106b6ab2eae0364045e8634917f..d95e136408a993d9316449e3fbf36009afc3291f 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/AdminAuthorityFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/AdminAuthorityFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/AuthorityFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/AuthorityFacadeTest.java
index 3f8fd91011902831dd93540839bd139c01c35723..d8c436379a1714be8dd496359dfec6fea43309aa 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/AuthorityFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/AuthorityFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/DataAuthorityFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/DataAuthorityFacadeTest.java
index be14c566214167cfabd7d84353165c44b1b9aca1..2cd15cc10dfe475dff1c551a29763efaceecec6a 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/DataAuthorityFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/DataAuthorityFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/DataColumnConfigFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/DataColumnConfigFacadeTest.java
index 7bc39bb00fdc5eefa57ab7ad59ad6fe02ae5e9e6..7fdbd6426a4776719d969c0deffc56b9201202a6 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/DataColumnConfigFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/DataColumnConfigFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/MenuFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/MenuFacadeTest.java
index 3df2a46861a96355735368f6faaf310b0766df65..62269fc8b7abfbd482bdba88dc83b420fd066310 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/MenuFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/MenuFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/ModuleFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/ModuleFacadeTest.java
index 2150995b06f15a4db14792271933949b0ca57104..21e55c2b0b932235702735cfef3e6106eb9020d6 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/ModuleFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/ModuleFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/RoleFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/RoleFacadeTest.java
index e7fe7668fb265daa8033883ead83b4cac9ba4720..6404b291fb78e383b0febfbe189bbc6f1f01d5af 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/RoleFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/RoleFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/RoleGroupFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/RoleGroupFacadeTest.java
index 82b6aeeeb4c7e4e3b2c6c6c6989dcea2f4a211e8..0568867bc6d43f7c10c1838d512eedc09f804e26 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/RoleGroupFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/RoleGroupFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/SystemAuthorityFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/SystemAuthorityFacadeTest.java
index 5e16a012018f01d766b4a436cb70a20f69b9df63..bb5422f62e05e0a7201cc8d418cd782204191d8e 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/SystemAuthorityFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/SystemAuthorityFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/SystemFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/SystemFacadeTest.java
index 80cba05d944965c9b1db82179ba7b4da59eedca5..b1245df56f7f061c5caef9a2b01a45ffe46958bc 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/SystemFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/SystemFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/UserGroupFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/UserGroupFacadeTest.java
index ad394fe0b49b1a99a0a7e94176493879b180f447..9aafefa6f86a3bdeff176b23a111245a2b0b9e87 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/UserGroupFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/UserGroupFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/UserRoleMappingFacadeTest.java b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/UserRoleMappingFacadeTest.java
index 3b1d96d7c5b08d530bbd25b614af825522d4c859..7ffcd69f3afab3424d25a5eaca643c46cad1bad7 100644
--- a/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/UserRoleMappingFacadeTest.java
+++ b/codemaker-dubbo/dubbo-core/src/test/java/com/coderman/infosys/authtest/UserRoleMappingFacadeTest.java
@@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
/**
* @Description:单元测试
-* @Author:fanchunshuai
+* @Author:shenshuai
* @CreateTime:2021-06-25 09:19:38
* @version v1.0
*/
diff --git a/codemaker-dynamicddd/pom.xml b/codemaker-dynamicddd/pom.xml
deleted file mode 100644
index 71906c06442da093abe63572d0376e6a13116db3..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/pom.xml
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-
- 4.0.0
-
- com.coderman.dynamicddd
- codemaker-dynamicddd
- 1.0-SNAPSHOT
-
- codemaker-dynamicddd
-
- http://www.example.com
-
-
- UTF-8
- 1.8
- 1.8
- 1.8
- 2.1.9.RELEASE
- 1.2.0.Final
-
-
-
-
-
- org.springframework.boot
- spring-boot-dependencies
- ${spring-boot.version}
- pom
- import
-
-
-
-
- com.alibaba.spring
- spring-context-support
- 1.0.5
-
-
-
- org.mapstruct
- mapstruct
- ${mapstruct.version}
-
-
- org.mapstruct
- mapstruct-processor
- ${mapstruct.version}
-
-
- org.mapstruct
- mapstruct-jdk8
- ${mapstruct.version}
-
-
-
-
- commons-collections
- commons-collections
- 3.2.1
-
-
-
- com.alibaba
- fastjson
- 1.2.72
-
-
-
- commons-lang
- commons-lang
- 2.4
-
-
-
- org.slf4j
- slf4j-api
- 1.7.28
-
-
- org.slf4j
- slf4j-ext
- 1.7.28
-
-
-
- org.slf4j
- slf4j-log4j12
- 1.7.28
-
-
-
- org.springframework.boot
- spring-boot-starter-log4j2
- ${spring-boot.version}
-
-
-
- org.aspectj
- aspectjweaver
- 1.9.4
-
-
-
- org.aspectj
- aspectjrt
- 1.8.13
-
-
-
- org.assertj
- assertj-core
- 3.9.1
-
-
-
-
-
-
-
- junit
- junit
- 4.11
- test
-
-
-
- org.projectlombok
- lombok
- 1.18.8
-
-
-
- org.springframework.boot
- spring-boot
-
-
- org.slf4j
- slf4j-api
-
-
-
-
-
-
-
-
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AbstractCmd.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AbstractCmd.java
deleted file mode 100644
index 4c6f6c2778a84db55810aee05fa55fe87094cebe..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AbstractCmd.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.lightsnail.snailapp.usercrm.app.command;
-
-import java.util.Date;
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:抽象命令类类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Data
-@ToString
-public class AbstractCmd {
-
- /** +操作时间 **/
- public Date operateTime;
- /** +操作人ID **/
- public Long userId;
- /** +命令类 **/
- public Class commandClass;
- /** +命令数据 **/
- public String payLoad;;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AddUserAuthCmd.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AddUserAuthCmd.java
deleted file mode 100644
index 171da4f6c30011288818601b6b2116499b5ced8b..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AddUserAuthCmd.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.lightsnail.snailapp.usercrm.app.command;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:增加用户权限类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Data
-@ToString
-public class AddUserAuthCmd extends AbstractCmd{
-
- /** 用户ID **/
- private Long userId;
- /** 权限类型 **/
- private int authorityType;
- /** 权限数据内容 **/
- private String json;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AddUserCmd.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AddUserCmd.java
deleted file mode 100644
index 0597d0c45eaef7fd0414a54abcae2465a1032149..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AddUserCmd.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.lightsnail.snailapp.usercrm.app.command;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:增加用户命令类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Data
-@ToString
-public class AddUserCmd extends AbstractCmd{
-
- /** 用户名 **/
- private String userName;
- /** 用户ID **/
- private Long userId;
- /** 所属组织 **/
- private Long departmentId;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AddUserGroupCmd.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AddUserGroupCmd.java
deleted file mode 100644
index 8ba24edaae66e29b7061da1e86107ba4ee5c78fe..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/AddUserGroupCmd.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.lightsnail.snailapp.usercrm.app.command;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:增加用户组命令类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Data
-@ToString
-public class AddUserGroupCmd extends AbstractCmd{
-
- /** 组名 **/
- private String groupName;
- /** 用户ID **/
- private Long userId;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/UpdateUserAuthCmd.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/UpdateUserAuthCmd.java
deleted file mode 100644
index c83c015f47a532735cae584575644e1b90c9c6a3..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/command/UpdateUserAuthCmd.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.lightsnail.snailapp.usercrm.app.command;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:更新用户权限类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Data
-@ToString
-public class UpdateUserAuthCmd extends AbstractCmd{
-
- /** 用户ID **/
- private Long userId;
- /** 角色ID **/
- private Long roleId;
- /** 权限数据内容 **/
- private String json;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/CmdExeService.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/CmdExeService.java
deleted file mode 100644
index a48783e79ea4113782f99024d7aa38a2d0949626..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/CmdExeService.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.lightsnail.snailapp.usercrm.app.exe;
-
-import com.lightsnail.snailapp.usercrm.app.command.AbstractCmd;
-
-
-/**
- * @Description:命令执行接口接口
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-public interface CmdExeService{
- /**
- *
- * @Description:命令执行入口
- * @return String
- */
- String exe(AbstractCmd abstractCmd);
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/UserAuthCmdExe.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/UserAuthCmdExe.java
deleted file mode 100644
index 2defff6bb358d3cc617c0627e748e6ff559ff31c..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/UserAuthCmdExe.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.lightsnail.snailapp.usercrm.app.exe;
-
-import com.lightsnail.snailapp.usercrm.app.command.AbstractCmd;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-import com.lightsnail.snailapp.usercrm.app.exe.UserAuthCmdExe;
-
-/**
- * @Description:用户权限cmd处理类接口实现类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Service
-public class UserAuthCmdExe implements CmdExeService{
-
- private Logger logger = LoggerFactory.getLogger(this.getClass());
-
- @Override
- public String exe(AbstractCmd abstractCmd){
- return null;
- }
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/UserCmdExe.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/UserCmdExe.java
deleted file mode 100644
index 83483f6da7532d58a1454115918b7a44506ade3a..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/UserCmdExe.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.lightsnail.snailapp.usercrm.app.exe;
-
-import com.lightsnail.snailapp.usercrm.app.command.AbstractCmd;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-import com.lightsnail.snailapp.usercrm.app.exe.UserCmdExe;
-
-/**
- * @Description:用户cmd处理类接口实现类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Service
-public class UserCmdExe implements CmdExeService{
-
- private Logger logger = LoggerFactory.getLogger(this.getClass());
-
- @Override
- public String exe(AbstractCmd abstractCmd){
- return null;
- }
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/UserGroupCmdExe.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/UserGroupCmdExe.java
deleted file mode 100644
index 5a53540262d4fd80b5f92e274b841d304d8124b6..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/app/exe/UserGroupCmdExe.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.lightsnail.snailapp.usercrm.app.exe;
-
-import com.lightsnail.snailapp.usercrm.app.command.AbstractCmd;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-import com.lightsnail.snailapp.usercrm.app.exe.UserGroupCmdExe;
-
-/**
- * @Description:用户组cmd处理类接口实现类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Service
-public class UserGroupCmdExe implements CmdExeService{
-
- private Logger logger = LoggerFactory.getLogger(this.getClass());
-
- @Override
- public String exe(AbstractCmd abstractCmd){
- return null;
- }
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/AdminAuthorityBO.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/AdminAuthorityBO.java
deleted file mode 100644
index f1a96be0593add1549b56a1c929b93cc49143aa2..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/AdminAuthorityBO.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.lightsnail.snailapp.usercrm.domain.bo;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:行政权限类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:10
- * @version v1.0
- */
-@Data
-@ToString
-public class AdminAuthorityBO extends AuthorityBO{
-
- /** 组织部门 **/
- private Long departmentId;
- /** 城市 **/
- private Long cityId;
- /** 职位 **/
- private Long jobId;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/AuthorityBO.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/AuthorityBO.java
deleted file mode 100644
index d99963b9010fb2a9a4a25dfdaa457fc920bc02de..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/AuthorityBO.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.lightsnail.snailapp.usercrm.domain.bo;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:权限类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:10
- * @version v1.0
- */
-@Data
-@ToString
-public class AuthorityBO {
-
- /** 权限类型 **/
- private Integer authorityType;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/DataAuthorityBO.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/DataAuthorityBO.java
deleted file mode 100644
index 5c0e1e9655666ae806b9f1ad16a65196aa20fb9c..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/DataAuthorityBO.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.lightsnail.snailapp.usercrm.domain.bo;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:数据权限类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:10
- * @version v1.0
- */
-@Data
-@ToString
-public class DataAuthorityBO extends AuthorityBO {
-
- /** 系统标示 **/
- private String systemName;
- /** 表名 **/
- private String tableName;
- /** 字段名 **/
- private String columnName;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/RoleBO.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/RoleBO.java
deleted file mode 100644
index 236539e7ed6900ca85483583cfc2e15116722e72..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/RoleBO.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.lightsnail.snailapp.usercrm.domain.bo;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:角色类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:10
- * @version v1.0
- */
-@Data
-@ToString
-public class RoleBO {
-
- /** 角色名称 **/
- private String roleName;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/SystemAuthorityBO.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/SystemAuthorityBO.java
deleted file mode 100644
index 24967fee7da2402e7389901e9372f2fd2a0c350f..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/SystemAuthorityBO.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.lightsnail.snailapp.usercrm.domain.bo;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:系统菜单权限类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:10
- * @version v1.0
- */
-@Data
-@ToString
-public class SystemAuthorityBO extends AuthorityBO{
-
- /** 系统标示 **/
- private String systemName;
- /** 功能 **/
- private String funcName;
- /** 菜单 **/
- private String categoryName;
- /** 按钮 **/
- private String menuName;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/SystemConfig.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/SystemConfig.java
deleted file mode 100644
index 884b2422c9267aa22cabecfdb26ea54c2a1aea6c..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/SystemConfig.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.lightsnail.snailapp.usercrm.domain.bo;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:系统设置类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:10
- * @version v1.0
- */
-@Data
-@ToString
-public class SystemConfig {
-
- /** 变量名 **/
- private String varName;
- /** 变量描述 **/
- private String varDesc;
- /** 变量值 **/
- private String value;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/UserBO.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/UserBO.java
deleted file mode 100644
index 2929b5beeafabf94bfbe4a7aae548215499f675c..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/UserBO.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.lightsnail.snailapp.usercrm.domain.bo;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:用户信息类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:10
- * @version v1.0
- */
-@Data
-@ToString
-public class UserBO {
-
- /** 用户名 **/
- private String userName;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/UserGroupBO.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/UserGroupBO.java
deleted file mode 100644
index bb6de7367e95989d0eb8020472654765b6a4e709..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/domain/bo/UserGroupBO.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.lightsnail.snailapp.usercrm.domain.bo;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:用户组类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:10
- * @version v1.0
- */
-@Data
-@ToString
-public class UserGroupBO {
-
- /** 组名 **/
- private String groupName;
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/DepartmentServiceAdapter.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/DepartmentServiceAdapter.java
deleted file mode 100644
index 88b9fd8f586da582e31290b9d6dda4be0f94ab68..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/DepartmentServiceAdapter.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.lightsnail.snailapp.usercrm.infrast.acl;
-
-import com.lightsnail.snailapp.usercrm.infrast.acl.res.dto.DepartmentResponseDTO;
-import java.util.List;
-import com.lightsnail.snailapp.usercrm.infrast.acl.req.dto.DepartmentQueryDTO;
-
-
-/**
- * @Description:部门查询服务适配器接口
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-public interface DepartmentServiceAdapter{
- /**
- *
- * @Description:查询所有有效的部门
- * @return List
- */
- List queryAllDepartment(DepartmentQueryDTO queryDto);
- /**
- *
- * @Description:查询子部门
- * @return List
- */
- List queryDepartmentsList(Long pId);
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/impl/DepartmentServiceAdapterImpl.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/impl/DepartmentServiceAdapterImpl.java
deleted file mode 100644
index 5e7e4266c941eaf48bbdd3a82f3abd741d27e00b..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/impl/DepartmentServiceAdapterImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.lightsnail.snailapp.usercrm.infrast.acl.impl;
-
-import com.lightsnail.snailapp.usercrm.infrast.acl.res.dto.DepartmentResponseDTO;
-import java.util.List;
-import com.lightsnail.snailapp.usercrm.infrast.acl.req.dto.DepartmentQueryDTO;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-import com.lightsnail.snailapp.usercrm.infrast.acl.DepartmentServiceAdapter;
-
-/**
- * @Description:部门查询服务适配器接口实现类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Service
-public class DepartmentServiceAdapterImpl implements DepartmentServiceAdapter{
-
- private Logger logger = LoggerFactory.getLogger(this.getClass());
-
- @Override
- public List queryAllDepartment(DepartmentQueryDTO queryDto){
- return null;
- }
-
- @Override
- public List queryDepartmentsList(Long pId){
- return null;
- }
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/req/dto/DepartmentQueryDTO.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/req/dto/DepartmentQueryDTO.java
deleted file mode 100644
index d3a6d6a70034b4f2464500242884e9cd7ca3c15d..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/req/dto/DepartmentQueryDTO.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.lightsnail.snailapp.usercrm.infrast.acl.req.dto;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Data
-@ToString
-public class DepartmentQueryDTO {
-
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/res/dto/DepartmentResponseDTO.java b/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/res/dto/DepartmentResponseDTO.java
deleted file mode 100644
index f9ceac515ebafc9099ba8fb96d8e959e62eab9f5..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/main/java/com/lightsnail/snailapp/usercrm/infrast/acl/res/dto/DepartmentResponseDTO.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.lightsnail.snailapp.usercrm.infrast.acl.res.dto;
-
-
-import lombok.Data;
-import lombok.ToString;
-
- /**
- * @Description:类
- * @Author:fanchunshuai
- * @CreateTime:2021-07-07 00:05:11
- * @version v1.0
- */
-@Data
-@ToString
-public class DepartmentResponseDTO {
-
-
-
-}
\ No newline at end of file
diff --git a/codemaker-dynamicddd/src/test/java/org/example/AppTest.java b/codemaker-dynamicddd/src/test/java/org/example/AppTest.java
deleted file mode 100644
index 6a1d2d79f7878de5144c8a33c09e56d788dfdacb..0000000000000000000000000000000000000000
--- a/codemaker-dynamicddd/src/test/java/org/example/AppTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.example;
-
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest
-{
- /**
- * Rigorous Test :-)
- */
- @Test
- public void shouldAnswerWithTrue()
- {
- assertTrue( true );
- }
-}
diff --git a/codemaker-parent/codemaker-api/pom.xml b/codemaker-parent/codemaker-api/pom.xml
index cf8fe0975ff92ced3721baeec46ca330fc9170a2..b5d5bf53697a93914d2a2d2361eb189aabaa0f7d 100644
--- a/codemaker-parent/codemaker-api/pom.xml
+++ b/codemaker-parent/codemaker-api/pom.xml
@@ -6,11 +6,11 @@
com.coderman.codemaker
codemaker-parent
- 1.2.2-SNAPSHOT
+ 1.3.0-SNAPSHOT
com.coderman.codemaker
codemaker-api
- 1.0-SNAPSHOT
+ 1.1-SNAPSHOT
jar
codemaker-api
@@ -60,8 +60,31 @@
fastjson
1.2.72
+
+ org.springframework
+ spring-context
+
+
+
+ com.coderman.utils
+ coderman-utils
+ 1.0.4-SNAPSHOT
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 8
+
+
+
+
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/TemplateFileEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/TemplateFileEnum.java
deleted file mode 100644
index 4fbbc5ed79d2cece572b492f370bd9e1e6cf33f8..0000000000000000000000000000000000000000
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/TemplateFileEnum.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.coderman.codemaker.enums;
-
-/**
- * description: TemplateFileEnum
- * date: 2020/7/7 23:44
- * author: coderman
- * version: 1.0
- * 设置要生成的模板文件的类型
- */
-public enum TemplateFileEnum {
- ENTITY("entity"),
- MAPPER("mapper"),
- POM("pom"),
- CONTROLLER("controller"),
- MAPPER_XML("mapperxml"),
- SERVICE("service"),
- SERVICE_IMPL("serviceImpl"),
- VO("vo"),
- BASE_CONTROLLER("baseController"),
- SPRING_APPLICATION_CONTEXT("SpringApplicationContext"),
- TEST("test"),
- APPLICATION("application"),
- DTO("dto"),
- FACADE("facade"),
- DATA_OBJECT("do"),
- FACADE_IMPL("facadeImpl"),
- BUSINESS_OBJECT("bo"),
- CONVERT("convert"),
- DTOBO_CONVERT("dtoboconvert"),
- DTO2DTO_CONVERT("dto2dtoconvert"),
- DOBO_CONVERT("doboconvert"),
- FACADE_AOP("facadeaop"),
- GATAWAY("gataway"),
- REPOSITORY("repository"),
- REPOSITORY_IMPL("repositoryimpl"),
- FACTORY("factory"),
- ENUM("enum"),
- API_ENUM("apienum"),
- MESSAGE_BODY("msgbody"),
- EVENT_BODY("event"),
- GATAWAY_IMPL("gatawayimpl"),
- ACL("acl"),
- ACL_IMPL("aclimpl"),
- ACL_REQ("aclreq"),
- ACL_RES("aclres"),
- ACL_PARAM("aclparam"),
- CMD("cmd"),
- EXE("exe"),
- EXE_IMPL("exeimpl"),
- EXE_ABSTRACT("abstractexe"),
- VALUE_OBJECT("valueobject"),
- BUSINESS_OBJECT_DDD("boddd"),
- FACADE_DDD("facadeddd"),
- FACADE_IMPL_DDD("facadeimplddd"),
- CONTROLLER_DDD("controllerddd"),
- VO_DDD("voddd"),
- VOBO_CONVERT("voboconvert"),
- DTO_DDD("dtoddd"),
- MQ_CONSUMER("mqconsumer"),
- MQ_HANDLER("mqhandler"),
- MQ_LISTENER("mqlistener"),
- MQ_PRODUCER("mqproducer"),
- APP_EVENT_PUBLISHER("AppEventPublisher"),
- BASE_EVENT("BaseEvent"),
- MAPPER_DDD("mapperddd"),
- MAPPER_XML_DDD("mapperxmlddd"),
- API_HTTP("http"),
- API_RPC("rpc"),
- CACHE("cache"),
-
- FEIGN("feign"),
- FEIGN_DDD("feignddd"),
- FEIGN_CONTROLLER("feigncontroller"),
- FEIGN_CONTROLLER_DDD("feigncontrollerddd"),
-
-
- ;
- private String tempFileName;
- TemplateFileEnum(String tempFileName){
- this.tempFileName = tempFileName;
- }
-
- public String getTempFileName() {
- return tempFileName;
- }
-
-
- /**
- * 判断类名是否是bo,vo,dto,entity
- * @param className
- * @return
- */
- public static boolean isClassModel(String className){
- String classType = className.toLowerCase();
- return classType.endsWith(TemplateFileEnum.VO.getTempFileName())
- || classType.endsWith(TemplateFileEnum.BUSINESS_OBJECT.getTempFileName())
- || classType.endsWith(TemplateFileEnum.DTO.getTempFileName())
- || classType.endsWith(TemplateFileEnum.DATA_OBJECT.getTempFileName())
- || classType.endsWith(TemplateFileEnum.ENTITY.getTempFileName());
- }
-}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/annotations/ElementTag.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/annotations/ElementTag.java
new file mode 100644
index 0000000000000000000000000000000000000000..129484ea9418f10252e947e700ab4e0eaab47e63
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/annotations/ElementTag.java
@@ -0,0 +1,33 @@
+package com.tianhua.codemaker.annotations;
+
+import com.tianhua.codemaker.enums.ClassEnum;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ElementTag {
+ /**
+ * 代码元素类型---TemplateFileEnum
+ * @return
+ */
+ String elementName() default "";
+
+ /**
+ * 代码元素类型---ClassEnum
+ * @return
+ */
+ ClassEnum clazzType() default ClassEnum.CLASS;
+
+}
diff --git a/codemaker-parent/codemaker-core/src/main/java/com/coderman/codemaker/app/dynamicddd/DomainElementHandler.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/DomainElementHandler.java
similarity index 59%
rename from codemaker-parent/codemaker-core/src/main/java/com/coderman/codemaker/app/dynamicddd/DomainElementHandler.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/DomainElementHandler.java
index 51e7f02208dc50c4ab6f9b4e9c2f59139cd17597..2f61ce4102e2fef3a5c8e37da84b27ce75b871d2 100644
--- a/codemaker-parent/codemaker-core/src/main/java/com/coderman/codemaker/app/dynamicddd/DomainElementHandler.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/DomainElementHandler.java
@@ -1,12 +1,12 @@
-package com.coderman.codemaker.app.dynamicddd;
+package com.tianhua.codemaker.api;
-import com.coderman.codemaker.bean.plantuml.PlantUmlContextBean;
+import com.tianhua.codemaker.bean.plantuml.PlantUmlContextBean;
/**
* Description:
* date: 2021/6/29
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/api/ICompDecorateService.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/ICompDecorateService.java
similarity index 76%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/api/ICompDecorateService.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/ICompDecorateService.java
index 01d984818ae65c689154b0889cd9be29f45e68a9..40eb847a1f16af617e6212b284136fb3753005de 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/api/ICompDecorateService.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/ICompDecorateService.java
@@ -1,14 +1,14 @@
-package com.coderman.codemaker.api;
+package com.tianhua.codemaker.api;
-import com.coderman.codemaker.bean.component.ComponentContextBean;
-import com.coderman.codemaker.bean.plantuml.PlantUmlContextBean;
+import com.tianhua.codemaker.bean.component.ComponentContextBean;
+import com.tianhua.codemaker.bean.plantuml.PlantUmlContextBean;
/**
* Description: 组件规则定义完成之后,需要将
* 组件包相关的类接口枚举注解等应用到对应的代码元素上
* date: 2021/11/23
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/api/ICompRegistService.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/ICompRegistService.java
similarity index 85%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/api/ICompRegistService.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/ICompRegistService.java
index 546dbbc5860a0d77fd2c7a9a13027564454f5f58..3dd92a5e8c73b354c26d943d6ba6062bd523ed16 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/api/ICompRegistService.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/ICompRegistService.java
@@ -1,6 +1,6 @@
-package com.coderman.codemaker.api;
+package com.tianhua.codemaker.api;
-import com.coderman.codemaker.bean.component.ComponentContextBean;
+import com.tianhua.codemaker.bean.component.ComponentContextBean;
/**
* Description:组件注册服务接口,这里主要用来将相对独立的工具类注册到组件中
@@ -12,7 +12,7 @@ import com.coderman.codemaker.bean.component.ComponentContextBean;
*
* date: 2021/12/24
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/api/ICompScanService.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/ICompScanService.java
similarity index 74%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/api/ICompScanService.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/ICompScanService.java
index 3cbdc2d1e8175bd5af5bf2e044dd5096ad3f1f01..0ca9d7e20691b01be569ef3ad60c3dda34543b5e 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/api/ICompScanService.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/ICompScanService.java
@@ -1,6 +1,6 @@
-package com.coderman.codemaker.api;
+package com.tianhua.codemaker.api;
-import com.coderman.codemaker.bean.component.ComponentContextBean;
+import com.tianhua.codemaker.bean.component.ComponentContextBean;
import java.util.List;
import java.util.Map;
@@ -10,7 +10,7 @@ import java.util.Map;
*
* date: 2021/11/22
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/IJavsAdapterSerivce.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/IJavsAdapterSerivce.java
new file mode 100644
index 0000000000000000000000000000000000000000..64ba35ed6978a458f0381720b599d6594f8821a8
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/IJavsAdapterSerivce.java
@@ -0,0 +1,27 @@
+package com.tianhua.codemaker.api;
+
+import com.tianhua.codemaker.bean.plantuml.PlantUmlContextBean;
+
+/**
+ * Description:
+ * date: 2022/3/10
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public interface IJavsAdapterSerivce {
+ /**
+ * codeMaker适配javs翻译引擎
+ * @param plantUmlContextBean
+ * @param javsScriptProjectPath
+ */
+ void translateJavsScript(PlantUmlContextBean plantUmlContextBean, String javsScriptProjectPath);
+
+ /**
+ * 基于plantuml文档生成javs脚本项目
+ * @param plantUmlContextBean
+ * @param javsScriptProjectPath
+ */
+ void generateJavsScriptProject(PlantUmlContextBean plantUmlContextBean,String javsScriptProjectPath);
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/IValidateService.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/IValidateService.java
new file mode 100644
index 0000000000000000000000000000000000000000..96f7baf26068ad7f674d4942148f0b41ad4a7631
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/api/IValidateService.java
@@ -0,0 +1,22 @@
+package com.tianhua.codemaker.api;
+
+import com.tianhua.codemaker.bean.plantuml.PlantUmlContextBean;
+
+/**
+ * Description:参数校验逻辑植入服务接口
+ *
+ * date: 2022/1/25
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public interface IValidateService {
+
+ /**
+ * 统一参数校验模式
+ * @param plantUmlContextBean
+ */
+ void dealValidate(PlantUmlContextBean plantUmlContextBean);
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/ClassContentBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/ClassContentBean.java
similarity index 96%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/ClassContentBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/ClassContentBean.java
index 9f36bf77c9d3f38049805e4e18ce69f7f641b0fc..ec5bed85d3d8fb8a57007f7656041dafbcdf5283 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/ClassContentBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/ClassContentBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean;
+package com.tianhua.codemaker.bean;
/**
* Description:
* date: 2021/6/18
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -91,4 +91,5 @@ public class ClassContentBean {
public void setClassContent(String classContent) {
this.classContent = classContent;
}
+
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/ColumnBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/ColumnBean.java
similarity index 96%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/ColumnBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/ColumnBean.java
index 549205944cbe5598447a25d7af909446a2b5afee..73bd6bb10f6a447b5dc957cbfd5cf16b70a0c944 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/ColumnBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/ColumnBean.java
@@ -1,7 +1,7 @@
-package com.coderman.codemaker.bean;
+package com.tianhua.codemaker.bean;
-import com.coderman.codemaker.bean.plantuml.FieldBean;
-import com.coderman.codemaker.enums.VisibilityEnum;
+import com.tianhua.codemaker.bean.plantuml.FieldBean;
+import com.tianhua.codemaker.enums.VisibilityEnum;
/**
* Created on 2018-7-19.
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/GeneratorSettingBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/GeneratorSettingBean.java
similarity index 97%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/GeneratorSettingBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/GeneratorSettingBean.java
index e3f087d904526fa0d9f53150ec81400fb9fa6d1d..a7fba7f298efafb2ebd4edbd604ac764e478be1b 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/GeneratorSettingBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/GeneratorSettingBean.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.bean;
+package com.tianhua.codemaker.bean;
/**
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/GlobalConstant.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/GlobalConstant.java
similarity index 68%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/GlobalConstant.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/GlobalConstant.java
index 521a58c907ad1b8d2dec3248f028b1b324e10b32..9626aea4b01be9879f40cd82ab6ca4189e5af667 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/GlobalConstant.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/GlobalConstant.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean;
+package com.tianhua.codemaker.bean;
/**
* Description:
* date: 2021/7/12
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -78,6 +78,11 @@ public class GlobalConstant {
*/
public static final String EXPORT_ACL_KEY = "exportaclkey";
+ /**
+ * plantuml bo中的特殊属性-标示 api参数是否需要校验
+ */
+ public static final String VALIDATE_KEY = "validatekey";
+
@@ -103,7 +108,10 @@ public class GlobalConstant {
* api doc文件名称
*/
public static final String API_DOC = "api-doc";
-
+ /**
+ * plantuml doc文件名称
+ */
+ public static final String PLANT_UML_DOC = "uml-doc";
public static final String PACKAGE_$ = "${package}";
@@ -112,6 +120,10 @@ public class GlobalConstant {
*/
public static final String SINGLE_CLASS_COMMON = "singleClass";
+ /**
+ * 存放配置文件模板的文件目录名
+ */
+ public static final String CONFIG = "config";
/**
* 组件配置文件key--version
*/
@@ -149,6 +161,14 @@ public class GlobalConstant {
*/
public static final String COMP_DESC = "compDesc";
+ /**
+ * pom类型
+ */
+ public static final String COMP_GAV_TYPE = "type";
+ /**
+ * pom类型
+ */
+ public static final String COMP_GAV_SCOPE = "scope";
/**
* 组件类型
@@ -180,6 +200,20 @@ public class GlobalConstant {
* 需要扫描的方法列表前缀
*/
public static final String COMP_CLASS_METHOD_PRE = "method";
+ /**
+ * 需要扫描的配置文件内容
+ */
+ public static final String COMP_CONFIG_NAME = "configName";
+
+ /**
+ * 需要扫描的排除GA
+ */
+ public static final String COMP_EXCLUSION_GA_LIST = "exclusionGAList";
+ /**
+ * 需要扫描的方法列表前缀
+ */
+ public static final String COMP_FIELD_PRE = "field";
+
/**
* 需要扫描的注解列表前缀
@@ -187,6 +221,19 @@ public class GlobalConstant {
public static final String COMP_ANNOTATION_PRE = "annotation";
+
+ /**
+ * 注解需要修饰的地方
+ */
+ public static final String COMP_MODIFY_ON = "modifyOn";
+
+
+ /**
+ * 注解tag别名
+ */
+ public static final String COMP_ANNOTATION_ALIAS = "classAlias";
+
+
/**
* 扫描组件的文件前缀
*/
@@ -197,6 +244,13 @@ public class GlobalConstant {
*/
public static final String COMP_COMPONENT_SINGLE_CLASS_PATH = COMP_COMPONENT_PATH_PRE + "singleClass";
+ /**
+ * 注解标签扫描路径
+ */
+ public static final String COMP_COMPONENT_ANNOTATION_TAG_PATH = COMP_COMPONENT_PATH_PRE + "annotationClass";
+
+
+
/**
* 配置的包依赖
*/
@@ -211,4 +265,41 @@ public class GlobalConstant {
public static final String REQUEST_VO = "requestvo";
public static final String RESPONSE_VO = "responsevo";
+
+
+
+ public static final String CUSTOM_CLASS = "customclass";
+
+
+
+
+ /**--------模块名---------**/
+
+ public static final String API = "-api";
+
+ public static final String APP = "-app";
+
+ public static final String CLIENT = "-client";
+
+ public static final String DOMAIN = "-domain";
+
+ public static final String START = "-start";
+
+ public static final String ADAPTER = "-adapter";
+
+ public static final String COMMON = "-common";
+
+ public static final String CORE = "-core";
+
+ public static final String INFRAST = "-infrast";
+
+ public static final String FEIGN_API = "-feignapi";
+
+ public static final String FEIGN_PROVIDER = "-feignprovider";
+
+ public static final String PROVIDER = "-provider";
+
+ public static final String SPRING_BOOT = "-springboot";
+
+ public static String PARENT = "parent";
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/MapperMethodConstant.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/MapperMethodConstant.java
similarity index 92%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/MapperMethodConstant.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/MapperMethodConstant.java
index aad3bfd020cbd3c3f76bac607091abb128e2ed63..8f3c4b74ee45b3320f0f471ceecf898e32216c52 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/MapperMethodConstant.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/MapperMethodConstant.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.bean;
+package com.tianhua.codemaker.bean;
import java.util.HashSet;
import java.util.Set;
@@ -7,7 +7,7 @@ import java.util.Set;
* Description: mapperxml默认方法名
* date: 2021/10/27
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/TableBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/TableBean.java
similarity index 92%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/TableBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/TableBean.java
index 177601f85dbb89c1ebd9fbccb0cf6bac145132ee..3b45081f35ad2e74824a58160ea4b509560798fd 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/TableBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/TableBean.java
@@ -1,9 +1,9 @@
-package com.coderman.codemaker.bean;
+package com.tianhua.codemaker.bean;
-import com.coderman.codemaker.bean.plantuml.ClassBean;
-import com.coderman.codemaker.bean.plantuml.FieldBean;
-import com.coderman.codemaker.bean.plantuml.InterfaceBean;
-import com.coderman.codemaker.bean.plantuml.MethodBean;
+import com.tianhua.codemaker.bean.plantuml.ClassBean;
+import com.tianhua.codemaker.bean.plantuml.FieldBean;
+import com.tianhua.codemaker.bean.plantuml.InterfaceBean;
+import com.tianhua.codemaker.bean.plantuml.MethodBean;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
@@ -13,7 +13,7 @@ import java.util.List;
/**
* Created on 2018-7-19.
*
- * @author: fanchunshuai
+ * @author: shenshuai
* @version: V1.0
* @Desc:表信息描述
*/
@@ -66,6 +66,8 @@ public class TableBean {
* 插入sql value替换字符串
*/
private String insertColumnNames;
+
+
/**
* 修改sql value替换字符串
*/
@@ -109,7 +111,7 @@ public class TableBean {
* @param packageName
* @return
*/
- public InterfaceBean convertToMapperInterface(String packageName,List columnBeanList){
+ public InterfaceBean convertToMapperInterface(String packageName,List columnBeanList, boolean useMybatisPlus){
InterfaceBean interfaceBean = new InterfaceBean();
interfaceBean.setClassName(this.getHumpClassName()+"Mapper");
interfaceBean.setPackageName(packageName);
@@ -118,7 +120,11 @@ public class TableBean {
String doPackageName = packageName.replace("mapper","dataobject");
String importDO = doPackageName+"."+this.getHumpClassName()+"DO";
interfaceBean.setImportClassList(Lists.newArrayList(importDO));
- interfaceBean.setMethodBeanList(getDefaultMapperMethod());
+ if(useMybatisPlus){
+ interfaceBean.setMethodBeanList(Lists.newArrayList());
+ }else {
+ interfaceBean.setMethodBeanList(getDefaultMapperMethod());
+ }
interfaceBean.setTableBean(this);
interfaceBean.setColumnBeanList(columnBeanList);
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/WriteContentBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/WriteContentBean.java
similarity index 48%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/WriteContentBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/WriteContentBean.java
index 23fa9738f41a313f8651c0f3e1bad525ec5a9fbf..f26144817e56eb80d0bcb05ef2e695c652e7122c 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/WriteContentBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/WriteContentBean.java
@@ -1,14 +1,16 @@
-package com.coderman.codemaker.bean;
+package com.tianhua.codemaker.bean;
-import com.coderman.codemaker.bean.plantuml.AbstractClassBean;
+import com.tianhua.codemaker.bean.plantuml.AbstractClassBean;
+import com.tianhua.codemaker.enums.TemplateFileEnum;
import lombok.Builder;
import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
/**
* Description:
* date: 2021/7/2
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -20,6 +22,19 @@ public class WriteContentBean {
private String humpClassName;
private String classPackageName;
+ /**
+ * 是否是自定义的代码元素
+ */
+ private boolean customCodeElement;
+
+ public boolean isCustomCodeElement() {
+ return customCodeElement;
+ }
+
+ public void setCustomCodeElement(boolean customCodeElement) {
+ this.customCodeElement = customCodeElement;
+ }
+
private AbstractClassBean abstractClassBean;
public AbstractClassBean getAbstractClassBean() {
@@ -68,6 +83,38 @@ public class WriteContentBean {
return classContentBean;
}
+ /**
+ * 将writeContentbean对象转换为classcontentBean对象
+ * @param moduleCode
+ * @param modulePath
+ * @return
+ */
+ public ClassContentBean buildClassContentBean(String moduleCode, String modulePath){
+ ClassContentBean classContentBean = new ClassContentBean();
+ classContentBean.setClassContent(this.getContent());
+ classContentBean.setHumpClassName(this.getHumpClassName());
+ classContentBean.setClassPackageName(this.getClassPackageName());
+ String classSuffix = TemplateFileEnum.getClassSuffix(this.getTemplateName());
+ if(StringUtils.isNotEmpty(classSuffix)){
+ classContentBean.setClassSuffix(classSuffix);
+ }else {
+ classContentBean.setClassSuffix("");
+ }
+
+ classContentBean.setModulePath(modulePath);
+ String defaultChildPackageName = TemplateFileEnum.getChildPackageName(this.getTemplateName());
+
+ String childPackageName;
+ if(defaultChildPackageName.startsWith(moduleCode)){
+ childPackageName = defaultChildPackageName;
+ }else {
+ childPackageName = moduleCode + "." + defaultChildPackageName;
+
+ }
+ classContentBean.setChildPackageName(childPackageName);
+
+ return classContentBean;
+ }
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/apidoc/ApiDocBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/apidoc/ApiDocBean.java
similarity index 96%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/apidoc/ApiDocBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/apidoc/ApiDocBean.java
index d5a3d32258ace7102f3bd0fe243f83fc723c9e31..045c4cf85d2ecc766b2e23ad74f84a9e88454675 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/apidoc/ApiDocBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/apidoc/ApiDocBean.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.bean.apidoc;
+package com.tianhua.codemaker.bean.apidoc;
import java.util.List;
@@ -6,7 +6,7 @@ import java.util.List;
* Description: 支持http rpc的接口文档模型
* date: 2021/11/22
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/apidoc/ApiModuleBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/apidoc/ApiModuleBean.java
similarity index 69%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/apidoc/ApiModuleBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/apidoc/ApiModuleBean.java
index 5782ef28f21aaef9d41e52b1216c3f9d382721f8..7e7f50e38dc5f4966b44babbb747116e01278ec6 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/apidoc/ApiModuleBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/apidoc/ApiModuleBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.apidoc;
+package com.tianhua.codemaker.bean.apidoc;
/**
* Description:模块/接口类级别的文档描述
* date: 2021/11/22
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/apidoc/ApiParamBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/apidoc/ApiParamBean.java
similarity index 93%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/apidoc/ApiParamBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/apidoc/ApiParamBean.java
index 7e7dce1a3221f438c68ed609d7dd94fb2f99c6b1..34b9f8844f4ea5ea0c2bffcb1d8c919708bc7b68 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/apidoc/ApiParamBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/apidoc/ApiParamBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.apidoc;
+package com.tianhua.codemaker.bean.apidoc;
/**
* Description:
* date: 2021/11/22
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/component/ComponentConfigBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/component/ComponentConfigBean.java
similarity index 61%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/component/ComponentConfigBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/component/ComponentConfigBean.java
index b500b202c6614ca74f7ce25096996240944167e6..070597658fd1d4638fca12c1608206a2ad0472e0 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/component/ComponentConfigBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/component/ComponentConfigBean.java
@@ -1,19 +1,24 @@
-package com.coderman.codemaker.bean.component;
+package com.tianhua.codemaker.bean.component;
+import lombok.Data;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Description:
* date: 2021/11/22
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
+@Data
public class ComponentConfigBean {
/**
@@ -25,6 +30,11 @@ public class ComponentConfigBean {
private String version;
+
+ private String type;
+
+ private String scope;
+
private String desc;
/**
@@ -63,6 +73,17 @@ public class ComponentConfigBean {
*/
private String compDesc;
+ /**
+ * 组件配置名称
+ *
+ */
+ private String configName;
+
+ /**
+ * 组件要排除的依赖项
+ */
+ private String exclusionGAList;
+
/**
* 接口列表
*/
@@ -86,118 +107,17 @@ public class ComponentConfigBean {
/**
* 方法列表
*/
- private List methodList = new ArrayList<>();
-
- public String getArtifactId() {
- return artifactId;
- }
-
- public void setArtifactId(String artifactId) {
- this.artifactId = artifactId;
- }
-
- public String getGroupId() {
- return groupId;
- }
-
- public void setGroupId(String groupId) {
- this.groupId = groupId;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getDesc() {
- return desc;
- }
-
- public void setDesc(String desc) {
- this.desc = desc;
- }
-
- public String getJarPath() {
- return jarPath;
- }
-
- public void setJarPath(String jarPath) {
- this.jarPath = jarPath;
- }
-
-
- public String getPackageName() {
- return packageName;
- }
-
- public void setPackageName(String packageName) {
- this.packageName = packageName;
- }
-
- public List getInterfaceList() {
- return interfaceList;
- }
-
- public List getClassList() {
- return classList;
- }
+ private Map> methodMap = new HashMap<>();
- public String getClassType() {
- return classType;
- }
-
- public void setClassType(String classType) {
- this.classType = classType;
- }
-
-
- public List getMethodList() {
- return methodList;
- }
-
- public List getEnumList() {
- return enumList;
- }
-
- public List getAnnotationList() {
- return annotationList;
- }
-
- public String getCompSite() {
- return compSite;
- }
-
- public void setCompSite(String compSite) {
- this.compSite = compSite;
- }
-
- public String getCompDesc() {
- return compDesc;
- }
-
- public void setCompDesc(String compDesc) {
- this.compDesc = compDesc;
- }
-
- public String getServiceName() {
- return serviceName;
- }
-
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
-
-
- public String getCompType() {
- return compType;
- }
+ /**
+ * 属性列表
+ */
+ private Map> fieldMap = new HashMap<>();
- public void setCompType(String compType) {
- this.compType = compType;
- }
+ /**
+ * 组件配置内容
+ */
+ private List configList = new ArrayList<>();
public void addClass(String clazz){
if(StringUtils.isNotEmpty(this.getPackageName())){
@@ -228,12 +148,32 @@ public class ComponentConfigBean {
this.enumList.add(enumClass);
}
- public void addMethod(String methodStr){
- if(StringUtils.isNotEmpty(methodStr)){
- this.methodList.add(methodStr);
+ public void addMethod(String className, String methodStr){
+ List methodList = this.methodMap.get(className);
+ if(CollectionUtils.isEmpty(methodList)){
+ methodList = new ArrayList<>();
+ methodList.add(methodStr);
+ methodMap.put(className, methodList);
+ return;
}
+ methodList.add(methodStr);
+ methodMap.put(className, methodList);
}
+ public void addField(String className, String fieldStr){
+ List fieldList = this.fieldMap.get(className);
+
+ if(CollectionUtils.isEmpty(fieldList)){
+ fieldList = new ArrayList<>();
+ fieldList.add(fieldStr);
+ fieldMap.put(className, fieldList);
+ return;
+ }
+ fieldList.add(fieldStr);
+ fieldMap.put(className, fieldList);
+ }
+
+
/**
* 构建需要读取的jar包绝对路径,带jar的
@@ -271,4 +211,6 @@ public class ComponentConfigBean {
", compDesc='" + compDesc + '\'' +
'}';
}
+
+
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/component/ComponentContextBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/component/ComponentContextBean.java
similarity index 76%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/component/ComponentContextBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/component/ComponentContextBean.java
index e47afc782a82eec1cc0150ea6aded01ba07779db..9531db7cd5d68c9de75eaf1c168e4a69aca2721f 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/component/ComponentContextBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/component/ComponentContextBean.java
@@ -1,9 +1,9 @@
-package com.coderman.codemaker.bean.component;
+package com.tianhua.codemaker.bean.component;
-import com.coderman.codemaker.bean.plantuml.AnnotationBean;
-import com.coderman.codemaker.bean.plantuml.ClassBean;
-import com.coderman.codemaker.bean.plantuml.EnumBean;
-import com.coderman.codemaker.bean.plantuml.InterfaceBean;
+import com.tianhua.codemaker.bean.plantuml.AnnotationBean;
+import com.tianhua.codemaker.bean.plantuml.ClassBean;
+import com.tianhua.codemaker.bean.plantuml.EnumBean;
+import com.tianhua.codemaker.bean.plantuml.InterfaceBean;
import org.apache.commons.collections4.CollectionUtils;
import java.util.List;
@@ -13,7 +13,7 @@ import java.util.Optional;
* Description:组件上下文bean
* date: 2021/11/22
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -50,6 +50,19 @@ public class ComponentContextBean {
*/
private List annotationList;
+ /**
+ * 组件配置信息
+ */
+ private ComponentConfigBean componentConfigBean;
+
+ public ComponentConfigBean getComponentConfigBean() {
+ return componentConfigBean;
+ }
+
+ public void setComponentConfigBean(ComponentConfigBean componentConfigBean) {
+ this.componentConfigBean = componentConfigBean;
+ }
+
public List getAnnotationList() {
return annotationList;
}
@@ -124,6 +137,21 @@ public class ComponentContextBean {
return null;
}
+ /**
+ * 获取目标interface信息
+ * @param className
+ * @return
+ */
+ public InterfaceBean getTargetInterface(String className){
+ if(CollectionUtils.isEmpty(this.getInterfaceBeanList())){
+ return null;
+ }
+ Optional classBeanOptional = this.getInterfaceBeanList().stream().filter(classBean -> classBean.getClassName().equals(className)).findFirst();
+ if(classBeanOptional.isPresent()){
+ return classBeanOptional.get();
+ }
+ return null;
+ }
/**
* 获取目标class信息
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/AnnotationTagBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/AnnotationTagBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..e06897cbf6c16bba6ab4592a06f29121aba05f50
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/AnnotationTagBean.java
@@ -0,0 +1,51 @@
+package com.tianhua.codemaker.bean.config;
+
+import com.tianhua.codemaker.enums.dynamic.AnnotationModifyOnEnum;
+import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * Description:
+ * date: 2022/1/24
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Data
+public class AnnotationTagBean {
+ /**
+ * 注解所在包
+ */
+ private String packageName;
+ /**
+ * 注解在plantuml 文档中的别名
+ */
+ private String classAlias;
+ /**
+ * 注解在方法或者类上的展示形式
+ */
+ private String annotation;
+
+ /**
+ * 注解类名称
+ */
+ private String className;
+
+ /**
+ * 注解需要装饰的目标
+ */
+ private String modifyOn;
+
+
+ public boolean modifyOnThis(){
+ if(StringUtils.isEmpty(modifyOn)){
+ return true;
+ }
+
+ return modifyOn.equals(AnnotationModifyOnEnum.THIS.getCode());
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/ConfigFileBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/ConfigFileBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..5b04bbb1715b994fb7a05aab92a0547b2a4f749b
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/ConfigFileBean.java
@@ -0,0 +1,84 @@
+package com.tianhua.codemaker.bean.config;
+
+/**
+ * Description:文件配置bean
+ * date: 2022/1/23
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public class ConfigFileBean {
+
+ /**
+ * 文件名
+ */
+ private String configFileName;
+
+ /**
+ * 文件后缀
+ */
+ private String configFileSuffix;
+
+ /**
+ * 所属模块
+ */
+ private String moduleName;
+
+ /**
+ * ftl文件模板名称
+ */
+ private String templateName;
+
+ public String getTemplateName() {
+ return templateName;
+ }
+
+ public void setTemplateName(String templateName) {
+ this.templateName = templateName;
+ }
+
+ public ConfigFileBean(){}
+
+ public ConfigFileBean(String configFileName, String configFileSuffix, String moduleName){
+ this.configFileName = configFileName;
+ this.configFileSuffix = configFileSuffix;
+ this.moduleName = moduleName;
+ }
+
+
+ /**
+ * 构建配置文件实例
+ * @param configFileName
+ * @param configFileSuffix
+ * @param moduleName
+ * @return
+ */
+ public static ConfigFileBean getInstance(String configFileName, String configFileSuffix, String moduleName){
+ return new ConfigFileBean(configFileName,configFileSuffix,moduleName);
+ }
+
+ public String getConfigFileSuffix() {
+ return configFileSuffix;
+ }
+
+ public void setConfigFileSuffix(String configFileSuffix) {
+ this.configFileSuffix = configFileSuffix;
+ }
+
+ public String getModuleName() {
+ return moduleName;
+ }
+
+ public void setModuleName(String moduleName) {
+ this.moduleName = moduleName;
+ }
+
+ public String getConfigFileName() {
+ return configFileName;
+ }
+
+ public void setConfigFileName(String configFileName) {
+ this.configFileName = configFileName;
+ }
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/FtlBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/FtlBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..b8cfcd2f7595e5b61a97d05b29d7533ee06bd753
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/FtlBean.java
@@ -0,0 +1,72 @@
+package com.tianhua.codemaker.bean.config;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public class FtlBean {
+ /**
+ * 模块名称
+ */
+ private String moduleName;
+ /**
+ * class类型
+ */
+ private String classType;
+ /**
+ * 代码元素模板名称
+ */
+ private String codeTempFileName;
+
+ /**
+ * 自定义模板配置字符串
+ */
+ private String ftlStr;
+
+
+ public String getModuleName() {
+ return moduleName;
+ }
+
+ public void setModuleName(String moduleName) {
+ this.moduleName = moduleName;
+ }
+
+ public String getClassType() {
+ return classType;
+ }
+
+ public void setClassType(String classType) {
+ this.classType = classType;
+ }
+
+ public String getCodeTempFileName() {
+ return codeTempFileName;
+ }
+
+ public void setCodeTempFileName(String codeTempFileName) {
+ this.codeTempFileName = codeTempFileName;
+ }
+
+ public String getFtlStr() {
+ return ftlStr;
+ }
+
+ public void setFtlStr(String ftlStr) {
+ this.ftlStr = ftlStr;
+ }
+
+ public static FtlBean getInstance(String ftlStr){
+ String [] arr = ftlStr.split(":");
+ FtlBean ftlBean = new FtlBean();
+ ftlBean.setFtlStr(ftlStr);
+ ftlBean.setClassType(arr[1]);
+ ftlBean.setCodeTempFileName(arr[0]);
+ ftlBean.setModuleName(arr[2]);
+ return ftlBean;
+ }
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/GAVBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/GAVBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..cd9461d1511b23223df19ade564dca154eb79f81
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/GAVBean.java
@@ -0,0 +1,36 @@
+package com.tianhua.codemaker.bean.config;
+
+import lombok.Data;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Data
+public class GAVBean {
+ private String groupId;
+ private String artifactId;
+ private String version;
+
+ private String type;
+
+ private String scope;
+
+ private String exclusionGAContent;
+
+
+ /**
+ * 所属服务组件名称
+ */
+ private String componentName;
+
+ public GAVBean(){}
+ public GAVBean(String componentName){
+ this.componentName = componentName;
+ }
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/PomBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/PomBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..6a6376659f583a810b60cf019deea5342960338b
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/PomBean.java
@@ -0,0 +1,167 @@
+package com.tianhua.codemaker.bean.config;
+
+import com.tianhua.codemaker.bean.WriteContentBean;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public class PomBean {
+
+ /**
+ * 模块前缀
+ */
+ private String modulePrefix;
+
+ private String appName;
+
+
+ /**
+ * pom.url
+ */
+ private String url;
+
+
+ /**
+ * 模块名称
+ */
+ private String moduleName;
+
+
+ private String groupId;
+ private String artifactId;
+ private String version;
+
+
+ private String templateCode;
+
+ private String moduleCode;
+
+ /**
+ * 依赖的mv
+ */
+ private List dependencyList;
+
+
+ public Map buildVarMap(){
+ Map map = new HashMap<>();
+ map.put("modulePrefix",modulePrefix);
+ map.put("groupId",groupId);
+ map.put("artifactId",artifactId);
+ map.put("version",version);
+ map.put("appName",appName);
+ map.put("dependencyList",dependencyList);
+ return map;
+ }
+
+ public WriteContentBean buildWriteContentBean(String content,String templateCode){
+ return WriteContentBean.builder()
+ .customCodeElement(true)
+ .content(content)
+ .templateName(templateCode).build();
+ }
+
+
+ public String getModuleCode() {
+ return moduleCode;
+ }
+
+ public void setModuleCode(String moduleCode) {
+ this.moduleCode = moduleCode;
+ }
+
+ public String getTemplateCode() {
+ return templateCode;
+ }
+
+ public void setTemplateCode(String templateCode) {
+ this.templateCode = templateCode;
+ }
+
+ public String getAppName() {
+ return appName;
+ }
+
+ public void setAppName(String appName) {
+ this.appName = appName;
+ }
+
+ public String getModulePrefix() {
+ return modulePrefix;
+ }
+
+ public void setModulePrefix(String modulePrefix) {
+ this.modulePrefix = modulePrefix;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getModuleName() {
+ return moduleName;
+ }
+
+ public void setModuleName(String moduleName) {
+ this.moduleName = moduleName;
+ }
+
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public List getDependencyList() {
+ return dependencyList;
+ }
+
+ public void setDependencyList(List dependencyList) {
+ this.dependencyList = dependencyList;
+ }
+
+
+ public void buildModule(String aliasName, String moduleCode){
+ this.setModuleName(aliasName+ moduleCode);
+ this.setModulePrefix(aliasName);
+ this.setModuleCode(moduleCode.replace("-",""));
+ }
+
+ public void buildGAV(String groupId, String artifactId, String version){
+ this.setGroupId(groupId);
+ this.setArtifactId(artifactId);
+ this.setVersion(version);
+ }
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/ProjectBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/ProjectBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..f9c5a9f6991d745883ac4cff61fe90ed9b9d9c54
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/config/ProjectBean.java
@@ -0,0 +1,38 @@
+package com.tianhua.codemaker.bean.config;
+
+import com.tianhua.codemaker.bean.component.ComponentConfigBean;
+import lombok.Data;
+
+import java.util.Map;
+
+/**
+ * Description:项目基本配置服务
+ * date: 2022/3/9
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Data
+public class ProjectBean {
+ /**
+ * 全局包名
+ */
+ private String packageName;
+
+ /**
+ * 应用名
+ */
+ private String applicationName;
+
+ /**
+ * 数据库名
+ */
+ private String dataBaseName;
+
+ /**
+ * 业务配置信息
+ */
+ private Map configFileMap;
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/AclElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/AclElementBean.java
similarity index 67%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/AclElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/AclElementBean.java
index c9de3a24f8cad12d5b1ee199d002f2778faf11dd..d6c9da7ad2b48a6773e414923fe37493356dc7f3 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/AclElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/AclElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/28
* 防腐层元素
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/AggregateElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/AggregateElementBean.java
similarity index 68%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/AggregateElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/AggregateElementBean.java
index 72ced9ddfc83c9ffa6eee4c0c72d964c383d31af..04de27e15a6aa6af2ec33662273b24791d01f6f7 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/AggregateElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/AggregateElementBean.java
@@ -1,11 +1,11 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* 聚合根元素
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/AppListenerElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/AppListenerElementBean.java
similarity index 68%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/AppListenerElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/AppListenerElementBean.java
index c743178d865c7235ad84d9f1497328b0e28c4155..70f0156e02bf07da86ba3796638fe319f0152a1c 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/AppListenerElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/AppListenerElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/28
* 监听器元素
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/CacheElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/CacheElementBean.java
similarity index 68%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/CacheElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/CacheElementBean.java
index 4d4bbb47d36d440892a05082b943de033f2e1b65..dc4ce5a636545479de5a1795b9876d42d65efaf4 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/CacheElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/CacheElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/28
* 缓存服务元素
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/CommandElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/CommandElementBean.java
similarity index 67%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/CommandElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/CommandElementBean.java
index ecc49a9715b417152e7216e4335856e1f6ff4d72..54901529e4ad6e70da938d7303ec6b3cab60b59b 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/CommandElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/CommandElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:命令实体
* date: 2021/7/5
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DomainBoElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DomainBoElementBean.java
similarity index 71%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DomainBoElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DomainBoElementBean.java
index c4ddfc4915bfc72153687d9079b72c421bdda6b6..c0a2fa5a28d5204ff04d8ffe058828b126189e24 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DomainBoElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DomainBoElementBean.java
@@ -1,11 +1,11 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* 业务模块实体,领域实体元素
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DomainEventElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DomainEventElementBean.java
similarity index 66%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DomainEventElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DomainEventElementBean.java
index da5b0308ebe3dcdb642f60e80531ce2e66fcd5dc..cfa5f50327d7eb4f1670b9b4943a32c3c2428d91 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DomainEventElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DomainEventElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/29
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DomainMsgBodyElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DomainMsgBodyElementBean.java
similarity index 66%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DomainMsgBodyElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DomainMsgBodyElementBean.java
index 1f0cb6f861bd20dd637842ec40ef8fc18a0f7f0b..754102a5611026276011ab18e107052635fd22b9 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DomainMsgBodyElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DomainMsgBodyElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/30
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DynamicMapperElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DynamicMapperElementBean.java
similarity index 70%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DynamicMapperElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DynamicMapperElementBean.java
index 6a8785119e2a4d5f1b0179f29cc590ae526c7dff..f482084465dcaa1de797339335f5f603f1cc2da3 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DynamicMapperElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DynamicMapperElementBean.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
@@ -6,7 +6,7 @@ package com.coderman.codemaker.bean.dddelement;
*
* 动态mapper元素
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DynamicMapperXmlElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DynamicMapperXmlElementBean.java
similarity index 70%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DynamicMapperXmlElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DynamicMapperXmlElementBean.java
index 8547c781f6fda99efdce5b399fd284f35d0d143e..b8a63e33c9cda562a287c98e0759dc2c3fd7c904 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/DynamicMapperXmlElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/DynamicMapperXmlElementBean.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
@@ -6,7 +6,7 @@ package com.coderman.codemaker.bean.dddelement;
*
* 动态mapperxml元素
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/ElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ElementBean.java
similarity index 83%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/ElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ElementBean.java
index 5f811e435e44d8cf918b6477e129bafbcf2c715b..4da0d5daf2de58bb4aafc0f565574011fc28e0ef 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/ElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ElementBean.java
@@ -1,6 +1,8 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
-import com.coderman.codemaker.bean.plantuml.*;
+import com.tianhua.codemaker.bean.config.FtlBean;
+import com.tianhua.codemaker.bean.config.PomBean;
+import com.tianhua.codemaker.bean.plantuml.*;
import org.apache.commons.collections4.CollectionUtils;
import java.util.ArrayList;
@@ -10,7 +12,7 @@ import java.util.List;
* Description:
* date: 2021/6/29
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -19,6 +21,44 @@ public abstract class ElementBean {
protected List classBeanList;
protected List interfaceBeanList;
protected List enumBeanList;
+ protected List pomBeanList;
+
+ /**
+ * 模块名称
+ */
+ protected String moduleName;
+
+
+ /**
+ * 自定义ftl模板配置bean
+ */
+ protected FtlBean ftlBean;
+
+
+
+ public FtlBean getFtlBean() {
+ return ftlBean;
+ }
+
+ public void setFtlBean(FtlBean ftlBean) {
+ this.ftlBean = ftlBean;
+ }
+
+ public String getModuleName() {
+ return moduleName;
+ }
+
+ public void setModuleName(String moduleName) {
+ this.moduleName = moduleName;
+ }
+
+ public List getPomBeanList() {
+ return pomBeanList;
+ }
+
+ public void setPomBeanList(List pomBeanList) {
+ this.pomBeanList = pomBeanList;
+ }
public String getPackageName() {
return packageName;
@@ -88,6 +128,9 @@ public abstract class ElementBean {
for (ClassBean classBean : newClassBeanList){
if(!classBean.getClassName().endsWith("Impl")){
List methodBeanList = new ArrayList<>();
+ if(CollectionUtils.isEmpty(classBean.getMethodBeanList())){
+ continue;
+ }
for (MethodBean oldBean : classBean.getMethodBeanList()){
StringBuilder contentBuilder = new StringBuilder("");
if(!CollectionUtils.isEmpty(oldBean.getInvokeMethodList())){
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/ExecutorElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ExecutorElementBean.java
similarity index 66%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/ExecutorElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ExecutorElementBean.java
index bc022c1bfd09f70459b4d94f0fc353a0576440e3..d90d06ac6907d167b8a8db0bc0f2879035b76ee9 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/ExecutorElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ExecutorElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/7/5
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/FactoryElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/FactoryElementBean.java
similarity index 68%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/FactoryElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/FactoryElementBean.java
index 5918ff8c5de222ab978c33ed94247a213fe96699..1b5cdbcbf033fe288452b049da16e2d0fd424d51 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/FactoryElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/FactoryElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/28
* 工厂元素
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/GatawayElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/GatawayElementBean.java
similarity index 69%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/GatawayElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/GatawayElementBean.java
index 6f4cb6eecfe989e1f02351144d56650453b3d950..13170c4f652f129247a5c8fa218b727a0641a7a2 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/GatawayElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/GatawayElementBean.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
@@ -6,7 +6,7 @@ package com.coderman.codemaker.bean.dddelement;
*
* 领域网关元素
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/InfrastAclElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/InfrastAclElementBean.java
similarity index 68%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/InfrastAclElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/InfrastAclElementBean.java
index 4cdfbb346693ed023fa6e07c9a0e44af5921e9f1..2fcf09275f83f5d8d001e897b9a7075def6400c9 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/InfrastAclElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/InfrastAclElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/28
* 防腐层元素
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/MqConsumerElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/MqConsumerElementBean.java
similarity index 68%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/MqConsumerElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/MqConsumerElementBean.java
index 8abaed82bb0f96dcc5d8f0be57576a5c2e68314d..e76ec01051214d3fb932c7d6051db738add621d4 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/MqConsumerElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/MqConsumerElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/28
* 监听器元素
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/MqHandlerElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/MqHandlerElementBean.java
similarity index 68%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/MqHandlerElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/MqHandlerElementBean.java
index 11d18809ac3c99673db58b8b629562531dd4979a..c81c563bdc0c495a1c0b4cab563f47e661809f4b 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/MqHandlerElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/MqHandlerElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/28
* 监听器元素
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/MqProducerElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/MqProducerElementBean.java
similarity index 68%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/MqProducerElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/MqProducerElementBean.java
index 968238e69431ee369590175fc4be8b39715ff96d..2d06737e0d5d04b0bff8ea5eea2c5ea0926e9879 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/MqProducerElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/MqProducerElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/28
* 监听器元素
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/PackageElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/PackageElementBean.java
similarity index 66%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/PackageElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/PackageElementBean.java
index 2901c785a5a58c883f2bcc89e5689057b35e6850..20f3fd04248e82aaaef703b0e2379a4798cda266 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/PackageElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/PackageElementBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
* date: 2021/6/29
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/RepositoryElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/RepositoryElementBean.java
similarity index 69%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/RepositoryElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/RepositoryElementBean.java
index c8af71739928364789d734796bbb533a857c1e9b..6279c067cff2c27a1c2441c427a3c117a772de9a 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/RepositoryElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/RepositoryElementBean.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
@@ -6,7 +6,7 @@ package com.coderman.codemaker.bean.dddelement;
*
* 仓库元素
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ServiceElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ServiceElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..8dc80cfca3294e77ee2a36896ddd7efedc9f662c
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ServiceElementBean.java
@@ -0,0 +1,14 @@
+package com.tianhua.codemaker.bean.dddelement;
+
+/**
+ * Description:
+ * date: 2021/6/28
+ *
+ * 领域服务元素
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public class ServiceElementBean extends ElementBean {
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/ValueObjectElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ValueObjectElementBean.java
similarity index 70%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/ValueObjectElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ValueObjectElementBean.java
index d95428333ae29b05be3ce90ce26d87e000cd4cbb..1a30cb1680b0ace52a011bf4ca48bba8b2f81781 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelement/ValueObjectElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelement/ValueObjectElementBean.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.bean.dddelement;
+package com.tianhua.codemaker.bean.dddelement;
/**
* Description:
@@ -6,7 +6,7 @@ package com.coderman.codemaker.bean.dddelement;
* 值对象实体 元素
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/ControllerElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/ControllerElementBean.java
similarity index 59%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/ControllerElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/ControllerElementBean.java
index b2beb00678a602466e528e46d6a85e4a77d754cf..ccc40233d825352ff8676f48aeb8f5adaec1a2ce 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/ControllerElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/ControllerElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,由领域实体元素bo派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/DoBoConvertElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/DoBoConvertElementBean.java
similarity index 59%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/DoBoConvertElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/DoBoConvertElementBean.java
index ec3c2ed2348adb72c3deae1dd1350257803f3b56..daa75133e7dccd3d60166f299ac1a87359cdad4d 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/DoBoConvertElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/DoBoConvertElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,由领域实体元素bo派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/Dto2DtoConvertElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/Dto2DtoConvertElementBean.java
similarity index 54%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/Dto2DtoConvertElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/Dto2DtoConvertElementBean.java
index 88f6b5b831beed1419c55be8bdf4cf3b4c7352c2..d2c1a513a6f6e28ec6586de0e25f62f7e4cd750d 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/Dto2DtoConvertElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/Dto2DtoConvertElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/DtoBoConvertElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/DtoBoConvertElementBean.java
similarity index 59%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/DtoBoConvertElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/DtoBoConvertElementBean.java
index f8d9d58ffafcb495197ae0e335e1328ff2382b00..d8a52dd22a1cb1ab6aab0505ca08d6bbcebe3963 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/DtoBoConvertElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/DtoBoConvertElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,由领域实体元素bo派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/DtoElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/DtoElementBean.java
similarity index 58%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/DtoElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/DtoElementBean.java
index 5282cc6e6c34f70f64646ffbf489eab2a92312d7..6d91742ef3130391ad7e838f8aa9717f572acea5 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/DtoElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/DtoElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,由领域实体元素bo派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/EnumElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/EnumElementBean.java
similarity index 60%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/EnumElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/EnumElementBean.java
index 74e2f2f7d48774b22397120603a73dabc8ebe07f..d456706bc346be29f2e4bdfa88012852c7758eef 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/EnumElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/EnumElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,由领域实体元素valueobject.enum派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FacadeElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FacadeElementBean.java
similarity index 58%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FacadeElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FacadeElementBean.java
index cac10ec87fe91e942fcc61ff90ee269040542e02..729561baf9c2433fb5746ede1845958a807ce0be 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FacadeElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FacadeElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,由领域实体元素bo派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FacadeImplElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FacadeImplElementBean.java
similarity index 59%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FacadeImplElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FacadeImplElementBean.java
index 4a0f2f93b32de835348764556ad6945acfb852d7..d2b367c893f5c2b97ca0cff912855daa12ff6d4f 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FacadeImplElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FacadeImplElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,由领域实体元素bo派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FeignControllerElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FeignControllerElementBean.java
similarity index 59%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FeignControllerElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FeignControllerElementBean.java
index db5d14dacb07db917601e1f87334cd439f811b31..d5e659c40a11099dc93f772eee5f9f2ff89d826d 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FeignControllerElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FeignControllerElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,由领域实体元素bo派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FeignElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FeignElementBean.java
similarity index 58%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FeignElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FeignElementBean.java
index 06fd9c3e86577a628e2fcaf601ee81e171cff409..f34c751ecc99e3956804f7dafdc2a3eb57f51a47 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/FeignElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/FeignElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,由领域实体元素bo派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/GatawayImplElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/GatawayImplElementBean.java
similarity index 56%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/GatawayImplElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/GatawayImplElementBean.java
index 5b361f37849d0c5da3e18ea68d00d5871073927b..1f92635e4514a68c753cff9685cc59354172311f 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/GatawayImplElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/GatawayImplElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 由gataway接口派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/InfrastAclImplElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/InfrastAclImplElementBean.java
similarity index 57%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/InfrastAclImplElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/InfrastAclImplElementBean.java
index 681b2b7167c6b844de08cba39d7084157d79b8ed..cb284b0a1b020b058dd58b83b928d46b6b31481c 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/InfrastAclImplElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/InfrastAclImplElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 由infrastacl接口派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/RepositoryImplElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/RepositoryImplElementBean.java
similarity index 57%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/RepositoryImplElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/RepositoryImplElementBean.java
index d4b78f73775996efd6b9be8fce47af312908a21f..07ccecf23e21856f0ca7bbb8acdce6af6652276e 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/RepositoryImplElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/RepositoryImplElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 由repository接口派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/ServiceImplElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/ServiceImplElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..2a752a66ad511591d20b24297b68139e87382431
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/ServiceImplElementBean.java
@@ -0,0 +1,16 @@
+package com.tianhua.codemaker.bean.dddelementderive;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * 派生元素,由领域实体元素bo派生而来
+ * date: 2021/6/28
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public class ServiceImplElementBean extends ElementBean {
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/VoBoConvertElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/VoBoConvertElementBean.java
similarity index 59%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/VoBoConvertElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/VoBoConvertElementBean.java
index 45ffcedc143c2e1f82ace9158c294f00d3e0ca89..99ff6f747d1b7a9a3111367a05f69d1e3bc3b2c5 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/VoBoConvertElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/VoBoConvertElementBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* 派生元素,由领域实体元素bo派生而来
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/VoElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/VoElementBean.java
similarity index 49%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/VoElementBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/VoElementBean.java
index b38951658091aedf67b3fde0584f3d94bb566132..f591b4de4d511d2b94498819e4962e40d21c22f0 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/dddelementderive/VoElementBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/dddelementderive/VoElementBean.java
@@ -1,12 +1,12 @@
-package com.coderman.codemaker.bean.dddelementderive;
+package com.tianhua.codemaker.bean.dddelementderive;
-import com.coderman.codemaker.bean.dddelement.ElementBean;
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
/**
* Description:
* date: 2021/7/9
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/invoke/InvokeContextBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/invoke/InvokeContextBean.java
similarity index 94%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/invoke/InvokeContextBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/invoke/InvokeContextBean.java
index b9fe9fca803a73d6b7ba13e534a73f1339899cae..a80b4594755e12591f79fdf36eeef10906045f21 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/invoke/InvokeContextBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/invoke/InvokeContextBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.invoke;
+package com.tianhua.codemaker.bean.invoke;
-import com.coderman.codemaker.bean.plantuml.AbstractClassBean;
-import com.coderman.codemaker.bean.plantuml.MethodBean;
-import com.coderman.codemaker.bean.plantuml.PlantUmlContextBean;
-import com.coderman.codemaker.enums.dynamic.InvokeSceneTypeEnum;
-import com.coderman.codemaker.enums.dynamic.ReadWriteTypeEnum;
+import com.tianhua.codemaker.bean.plantuml.AbstractClassBean;
+import com.tianhua.codemaker.bean.plantuml.MethodBean;
+import com.tianhua.codemaker.bean.plantuml.PlantUmlContextBean;
+import com.tianhua.codemaker.enums.dynamic.InvokeSceneTypeEnum;
+import com.tianhua.codemaker.enums.dynamic.ReadWriteTypeEnum;
import org.apache.commons.lang3.StringUtils;
@@ -12,7 +12,7 @@ import org.apache.commons.lang3.StringUtils;
* Description: 调用时序上下文
* date: 2021/10/16
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/invoke/InvokeRowBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/invoke/InvokeRowBean.java
similarity index 96%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/invoke/InvokeRowBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/invoke/InvokeRowBean.java
index 735c9a212cdeb3093e0e50695fbe028794e6dd9e..a202b0af726b4145aed45dd0a1d10a1c24ffc067 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/invoke/InvokeRowBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/invoke/InvokeRowBean.java
@@ -1,8 +1,8 @@
-package com.coderman.codemaker.bean.invoke;
+package com.tianhua.codemaker.bean.invoke;
-import com.coderman.codemaker.bean.plantuml.ClassBean;
-import com.coderman.codemaker.bean.plantuml.FieldBean;
-import com.coderman.codemaker.bean.plantuml.PlantUmlContextBean;
+import com.tianhua.codemaker.bean.plantuml.ClassBean;
+import com.tianhua.codemaker.bean.plantuml.FieldBean;
+import com.tianhua.codemaker.bean.plantuml.PlantUmlContextBean;
import org.apache.commons.lang3.StringUtils;
import java.util.Objects;
@@ -11,7 +11,7 @@ import java.util.Objects;
* Description:动态绘制的调用代码行
* date: 2021/10/21
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/AbstractClassBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/AbstractClassBean.java
similarity index 79%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/AbstractClassBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/AbstractClassBean.java
index faca6aed64f754ada113f66e9daac449d77b3d44..e410a9aa0308a5d3472d5c8b80221cc75c240779 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/AbstractClassBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/AbstractClassBean.java
@@ -1,18 +1,18 @@
-package com.coderman.codemaker.bean.plantuml;
+package com.tianhua.codemaker.bean.plantuml;
-import com.coderman.codemaker.bean.ColumnBean;
-import com.coderman.codemaker.bean.TableBean;
-import com.coderman.codemaker.bean.WriteContentBean;
-import com.coderman.codemaker.enums.CompTypeEnum;
-import com.coderman.codemaker.enums.DomainElementEnum;
-import com.coderman.codemaker.enums.TemplateFileEnum;
+import com.tianhua.codemaker.bean.ColumnBean;
+import com.tianhua.codemaker.bean.TableBean;
+import com.tianhua.codemaker.bean.WriteContentBean;
+import com.tianhua.codemaker.bean.segment.SegmentBean;
+import com.tianhua.codemaker.enums.CompTypeEnum;
+import com.tianhua.codemaker.enums.DomainElementEnum;
+import com.tianhua.codemaker.enums.TemplateFileEnum;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.apache.commons.collections4.CollectionUtils;
-import java.lang.reflect.Field;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@@ -22,11 +22,16 @@ import java.util.stream.Collectors;
* 抽象plantuml 类
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
public abstract class AbstractClassBean {
+
+ /**
+ * 类或者接口的范型信息
+ */
+ private PatternBean patternBean;
/**
* 类名
*/
@@ -51,6 +56,18 @@ public abstract class AbstractClassBean {
*/
private List methodBeanList;
+
+ /**
+ * 父类方法列表
+ */
+ private List superMethodBeanList;
+
+ /**
+ * 父类属性列表
+ *
+ */
+ private List superFieldBeanList;
+
/**
* 需要引入的class包名
*/
@@ -108,7 +125,16 @@ public abstract class AbstractClassBean {
/**
* 在动态调用中产生的引用包
*/
- private List dynamicImportPackageList;
+ private List dynamicImportPackageList = new ArrayList<>();
+
+
+ private List thisClassImportPackageList = new ArrayList<>();
+
+ /**
+ * 子类需要导入的包
+ */
+ private List childClassImportPackageList = new ArrayList<>();
+
/**
@@ -144,6 +170,53 @@ public abstract class AbstractClassBean {
*/
private String context = "";
+ /**
+ * plantUML的扩展注解标示
+ */
+ private List annotationTagList;
+
+ /**
+ * 代码片段列表
+ */
+ private List codeSegmentBeanList = new ArrayList<>();
+
+
+ public PatternBean getPatternBean() {
+ return patternBean;
+ }
+
+ public void setPatternBean(PatternBean patternBean) {
+ this.patternBean = patternBean;
+ }
+
+ public List getSuperMethodBeanList() {
+ return superMethodBeanList;
+ }
+
+ public void setSuperMethodBeanList(List superMethodBeanList) {
+ this.superMethodBeanList = superMethodBeanList;
+ }
+
+ public List getSuperFieldBeanList() {
+ return superFieldBeanList;
+ }
+
+ public void setSuperFieldBeanList(List superFieldBeanList) {
+ this.superFieldBeanList = superFieldBeanList;
+ }
+
+ public List getCodeSegmentBeanList() {
+ return codeSegmentBeanList;
+ }
+
+ public List getAnnotationTagList() {
+ return annotationTagList;
+ }
+
+ public void setAnnotationTagList(List annotationTagList) {
+ this.annotationTagList = annotationTagList;
+ }
+
public String getCompName() {
return compName;
}
@@ -212,9 +285,6 @@ public abstract class AbstractClassBean {
return dynamicImportPackageList;
}
- public void setDynamicImportPackageList(List dynamicImportPackageList) {
- this.dynamicImportPackageList = dynamicImportPackageList;
- }
public String getBodtoConvertInterface() {
return bodtoConvertInterface;
@@ -340,6 +410,22 @@ public abstract class AbstractClassBean {
}
+ public List getThisClassImportPackageList() {
+ return thisClassImportPackageList;
+ }
+
+ public void setThisClassImportPackageList(List thisClassImportPackageList) {
+ this.thisClassImportPackageList = thisClassImportPackageList;
+ }
+
+ public List getChildClassImportPackageList() {
+ return childClassImportPackageList;
+ }
+
+ public void setChildClassImportPackageList(List childClassImportPackageList) {
+ this.childClassImportPackageList = childClassImportPackageList;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -505,7 +591,6 @@ public abstract class AbstractClassBean {
public MethodBean getOrAddMethodBean(String currentMethod){
Optional methodBeanOptional = getMatchMethodBean(currentMethod);
if(methodBeanOptional.isPresent()){
- methodBeanOptional.get().initInvokeRowContentList();
return methodBeanOptional.get();
}
if(!currentMethod.contains("(")){
@@ -518,7 +603,6 @@ public abstract class AbstractClassBean {
methodBean.buildParamArr();
methodBean.setReturnClass("void");
methodBean.setVisibility("public");
- methodBean.initInvokeRowContentList();
this.getMethodBeanList().add(methodBean);
return methodBean;
}
@@ -553,6 +637,22 @@ public abstract class AbstractClassBean {
}
+ /**
+ * 将classBean转换为WrteContentBean为后续的写文件做准备
+ * @param content
+ * @param templateFileCode
+ * @return
+ */
+ public WriteContentBean buildWriteContentBeanV2(String content, String templateFileCode, boolean custom){
+ return WriteContentBean.builder().content(content)
+ .templateName(templateFileCode)
+ .customCodeElement(custom)
+ .humpClassName(this.getClassName())
+ .classPackageName(this.getPackageName())
+ .build();
+ }
+
+
/**
* 由当前对象派生到新对象
* @param className
@@ -586,6 +686,42 @@ public abstract class AbstractClassBean {
}
}
+ /**
+ * 给方法增加导入类
+ * @param importClassList
+ */
+ public void addImportClassBatch(List importClassList){
+ if(CollectionUtils.isEmpty(importClassList)){
+ return;
+ }
+ importClassList.stream().forEach(this::addImportClass);
+ }
+
+ public void addDynamicImportClass(String packageName){
+ if(this.getDynamicImportPackageList().contains(packageName)){
+ return;
+ }
+ this.getDynamicImportPackageList().add(packageName);
+ }
+
+
+ public void addThisImportClass(String packageName){
+ if(this.getThisClassImportPackageList().contains(packageName)){
+ return;
+ }
+ this.getThisClassImportPackageList().add(packageName);
+ }
+
+
+ public void addChildImportClass(String packageName){
+ if(this.getChildClassImportPackageList().contains(packageName)){
+ return;
+ }
+ this.getChildClassImportPackageList().add(packageName);
+ }
+
+
+
/**
* 为class增加fieldBean,根据名称判断是否存在,已存在则忽略
* @param fieldBean
@@ -601,5 +737,12 @@ public abstract class AbstractClassBean {
this.getFieldBeanList().add(fieldBean);
}
+ /**
+ * 增加代码段
+ * @param segmentBean
+ */
+ public void addCodeSegment(SegmentBean segmentBean){
+ this.codeSegmentBeanList.add(segmentBean);
+ }
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/AnnotationBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/AnnotationBean.java
similarity index 68%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/AnnotationBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/AnnotationBean.java
index 3cf50dcf5c582e865723766e352e108bb7835cae..047c1f10c4ca2bd2e25d034645ff1a4976fc59fe 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/AnnotationBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/AnnotationBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.plantuml;
+package com.tianhua.codemaker.bean.plantuml;
/**
* Description:枚举模型
* date: 2021/11/23
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/ClassBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/ClassBean.java
similarity index 67%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/ClassBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/ClassBean.java
index e1c043e0b80b2c42ab795c291acaca70180d45d4..95d8f3267be9f03e67aff0edf85136b3db3739b0 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/ClassBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/ClassBean.java
@@ -1,4 +1,6 @@
-package com.coderman.codemaker.bean.plantuml;
+package com.tianhua.codemaker.bean.plantuml;
+
+import org.apache.commons.collections4.CollectionUtils;
import java.util.HashMap;
import java.util.Map;
@@ -8,7 +10,7 @@ import java.util.Map;
* class 类信息
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -20,8 +22,13 @@ public class ClassBean extends AbstractClassBean {
varMap.put("table",this.getTableBean());
varMap.put("columns",this.getColumnBeanList());
varMap.put("fields",this.getFieldBeanList());
+ if(CollectionUtils.isNotEmpty(this.getMethodBeanList())){
+ this.getMethodBeanList().stream().forEach(methodBean -> methodBean.getSimplMethodName());
+ }
+
varMap.put("methods",this.getMethodBeanList());
varMap.put("imports",this.getImportClassList());
+
return varMap;
}
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/EnumBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/EnumBean.java
similarity index 97%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/EnumBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/EnumBean.java
index 34d6a7796b6d1decf45f830013a328ef390da62f..9ffc42f0d52fdc6b4ee7695b52685bd0d7df5d82 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/EnumBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/EnumBean.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.bean.plantuml;
+package com.tianhua.codemaker.bean.plantuml;
import java.util.HashMap;
import java.util.List;
@@ -8,7 +8,7 @@ import java.util.Map;
* Description: 枚举类
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/ExtendFieldBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/ExtendFieldBean.java
similarity index 83%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/ExtendFieldBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/ExtendFieldBean.java
index 2817399b52cf4be1fd58b12feb87fb2f6aafc896..6aff42fc0576e873cb1dcab093074e981ed9f47f 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/ExtendFieldBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/ExtendFieldBean.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.bean.plantuml;
+package com.tianhua.codemaker.bean.plantuml;
/**
* Description:从plantUMl中解析出的扩展属性上下文
* date: 2021/10/21
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -35,7 +35,18 @@ public class ExtendFieldBean {
*/
private String[] voKeyList;
+ /**
+ * bo对应的校验对象列表
+ */
+ private String [] validateKeyList;
+ public String[] getValidateKeyList() {
+ return validateKeyList;
+ }
+
+ public void setValidateKeyList(String[] validateKeyList) {
+ this.validateKeyList = validateKeyList;
+ }
public String[] getInvokeFileKey() {
return invokeFileKey;
@@ -108,4 +119,8 @@ public class ExtendFieldBean {
public void buildInvokeFileKeyArr(String invokeFileKey){
this.setInvokeFileKey(invokeFileKey.replace("String","").replace("string","").trim().split(","));
}
+
+ public void buildValidteKeyArr(String invokeFileKey){
+ this.setValidateKeyList(invokeFileKey.replace("String","").replace("string","").trim().split(","));
+ }
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/FieldBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/FieldBean.java
similarity index 90%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/FieldBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/FieldBean.java
index 6c4f0bde0c828c47eb64e0ab0ec862e25adf4262..7981ab31984e51dc4968ce03e6375856a06527fc 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/FieldBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/FieldBean.java
@@ -1,8 +1,8 @@
-package com.coderman.codemaker.bean.plantuml;
+package com.tianhua.codemaker.bean.plantuml;
import com.alibaba.fastjson.annotation.JSONField;
-import com.coderman.codemaker.bean.GlobalConstant;
-import com.coderman.codemaker.enums.VisibilityEnum;
+import com.tianhua.codemaker.bean.GlobalConstant;
+import com.tianhua.codemaker.enums.VisibilityEnum;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
@@ -12,7 +12,7 @@ import java.util.List;
* Description:
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -57,6 +57,18 @@ public class FieldBean {
*/
private String originFieldStr;
+ /**
+ * vo/dto/do等模型属性上的扩展注解标示
+ */
+ private List annotationTagList = new ArrayList<>();
+
+ public List getAnnotationTagList() {
+ return annotationTagList;
+ }
+
+ public void setAnnotationTagList(List annotationTagList) {
+ this.annotationTagList = annotationTagList;
+ }
public String getOriginFieldStr() {
return originFieldStr;
@@ -216,6 +228,11 @@ public class FieldBean {
|| this.fieldName.toLowerCase().contains(GlobalConstant.EXPORT_ACL_KEY);
}
+ @JSONField(serialize = false)
+ public boolean isValidateKey(){
+ return this.desc.toLowerCase().contains(GlobalConstant.VALIDATE_KEY)
+ || this.fieldName.toLowerCase().contains(GlobalConstant.VALIDATE_KEY);
+ }
/**
* 根据条件判断是否是简单类型--非扩展字段信息判断
@@ -233,6 +250,7 @@ public class FieldBean {
&& !this.isQueryVoKey()
&& !this.isQueryDtoKey()
&& !this.isExportAclKey()
+ && !this.isValidateKey()
&& !this.isMethod();
}
@@ -349,4 +367,11 @@ public class FieldBean {
classBean.setFieldBeanList(fieldBeanList);
return classBean;
}
+
+ public void addAnnotationTag(String annotation){
+ if(this.annotationTagList.contains(annotation)){
+ return;
+ }
+ this.annotationTagList.add(annotation);
+ }
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/InterfaceBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/InterfaceBean.java
similarity index 64%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/InterfaceBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/InterfaceBean.java
index 74fd684e67ddbff284a2e739889557f5e00ecc04..c92a626f5e74fbbe8ff31b8fc1ee931063c32abf 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/InterfaceBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/InterfaceBean.java
@@ -1,4 +1,6 @@
-package com.coderman.codemaker.bean.plantuml;
+package com.tianhua.codemaker.bean.plantuml;
+
+import org.apache.commons.collections4.CollectionUtils;
import java.util.HashMap;
import java.util.Map;
@@ -9,7 +11,7 @@ import java.util.Map;
* 领域接口
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -18,6 +20,9 @@ public class InterfaceBean extends AbstractClassBean{
Map varMap = new HashMap<>();
varMap.put("class",this);
varMap.put("fields",this.getFieldBeanList());
+ if(CollectionUtils.isNotEmpty(this.getMethodBeanList())){
+ this.getMethodBeanList().stream().forEach(methodBean -> methodBean.getSimplMethodName());
+ }
varMap.put("methods",this.getMethodBeanList());
varMap.put("imports",this.getImportClassList());
return varMap;
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/MethodBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/MethodBean.java
similarity index 85%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/MethodBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/MethodBean.java
index 2f6853af074f46840d0b8419b3a73dbe0bedec1f..a6e511bd6197b1c1fec6321548a8f0b32fb502c2 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/MethodBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/MethodBean.java
@@ -1,13 +1,13 @@
-package com.coderman.codemaker.bean.plantuml;
+package com.tianhua.codemaker.bean.plantuml;
import com.alibaba.fastjson.annotation.JSONField;
-import com.coderman.codemaker.bean.GlobalConstant;
-import com.coderman.codemaker.bean.apidoc.ApiDocBean;
-import com.coderman.codemaker.bean.apidoc.ApiParamBean;
-import com.coderman.codemaker.bean.invoke.InvokeRowBean;
-import com.coderman.codemaker.enums.TemplateFileEnum;
-import com.coderman.codemaker.enums.VisibilityEnum;
-import com.coderman.codemaker.utils.StringHandleUtils;
+import com.tianhua.codemaker.bean.GlobalConstant;
+import com.tianhua.codemaker.bean.apidoc.ApiDocBean;
+import com.tianhua.codemaker.bean.apidoc.ApiParamBean;
+import com.tianhua.codemaker.bean.invoke.InvokeRowBean;
+import com.tianhua.codemaker.enums.TemplateFileEnum;
+import com.tianhua.codemaker.enums.VisibilityEnum;
+import com.tianhua.codemaker.utils.StringHandleUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -17,7 +17,7 @@ import java.util.*;
* Description:
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -84,15 +84,14 @@ public class MethodBean {
/**
* 方法调用内容,根据调用流程图-plantUML解析而来
*/
- private LinkedList invokeMethodList;
+ private LinkedList invokeMethodList = new LinkedList<>();
/**
* 方法调用内容,根据调用流程图-plantUML解析而来
* 与invokeMethodList保持一致
* 帮助去除重复和进行上下文调用分析辅助动态绘制
*/
- private List invokeRowBeanList;
-
+ private List invokeRowBeanList = new ArrayList<>();
/**
* 方法文档
@@ -104,11 +103,16 @@ public class MethodBean {
*/
private String [] paramArr;
+ /**
+ * 参数列表
+ */
+ private List paramBeanList;
/**
+ * list 扩展性比较强
* 对于mapper和controller需要增加参数注解的进行动态构建参数注解
*/
- private String [] paramAnnotationArr;
+ private List paramAnnotationList = new ArrayList<>(5);
/**
* 所属类名
@@ -135,6 +139,47 @@ public class MethodBean {
*/
private boolean modelExtendMethod;
+ /**
+ * plantUML的扩展注解标示
+ */
+ private List annotationTagList;
+
+
+
+ private String simpleMethodNameInfo;
+
+ public String getSimpleMethodNameInfo() {
+ return simpleMethodNameInfo;
+ }
+
+ public void setSimpleMethodNameInfo(String simpleMethodNameInfo) {
+ this.simpleMethodNameInfo = simpleMethodNameInfo;
+ }
+
+ public List getParamBeanList() {
+ return paramBeanList;
+ }
+
+ public void setParamBeanList(List paramBeanList) {
+ this.paramBeanList = paramBeanList;
+ }
+
+ public List getParamAnnotationList() {
+ return paramAnnotationList;
+ }
+
+ public void setParamAnnotationList(List paramAnnotationList) {
+ this.paramAnnotationList = paramAnnotationList;
+ }
+
+ public List getAnnotationTagList() {
+ return annotationTagList;
+ }
+
+ public void setAnnotationTagList(List annotationTagList) {
+ this.annotationTagList = annotationTagList;
+ }
+
public boolean isModelExtendMethod() {
return modelExtendMethod;
}
@@ -167,13 +212,6 @@ public class MethodBean {
this.annotation = annotation;
}
- public String[] getParamAnnotationArr() {
- return paramAnnotationArr;
- }
-
- public void setParamAnnotationArr(String[] paramAnnotationArr) {
- this.paramAnnotationArr = paramAnnotationArr;
- }
public List getInvokeRowBeanList() {
return invokeRowBeanList;
@@ -401,6 +439,7 @@ public class MethodBean {
newBean.setParamArr(this.getParamArr());
newBean.setStatic(this.isStatic());
newBean.setPathValue(this.getPathValue());
+ newBean.setAnnotationTagList(this.getAnnotationTagList());
newBean.setMethodName(refreshMethodName());
return newBean;
@@ -411,14 +450,14 @@ public class MethodBean {
* @return
*/
public String refreshMethodName(){
- if(this.getParamAnnotationArr() == null || this.getParamAnnotationArr().length == 0){
+ if(CollectionUtils.isEmpty(this.paramAnnotationList)){
return this.getMethodName();
}
String preMethod = this.getMethodName().split("\\(")[0];
StringBuilder builder = new StringBuilder(preMethod);
List paramList = new ArrayList<>();
- for (int i = 0;i < this.getParamArr().length;i++){
- String annotation = this.getParamAnnotationArr()[i];
+ for (int i = 0;i < this.getParamArr().length;i ++){
+ String annotation = this.paramAnnotationList.get(i);
String param = this.getParamArr()[i];
paramList.add(annotation + " " + param);
}
@@ -462,10 +501,12 @@ public class MethodBean {
*/
public String getSimplMethodName(){
if(this.getMethodName().contains("()")){
- return this.getMethodName().replace("()","");
+ this.simpleMethodNameInfo = this.getMethodName().replace("()","");
+ return this.simpleMethodNameInfo;
}
else {
- return this.getMethodName().split("\\(")[0];
+ this.simpleMethodNameInfo = this.getMethodName().split("\\(")[0];
+ return this.simpleMethodNameInfo;
}
}
@@ -503,19 +544,16 @@ public class MethodBean {
}
+
/**
- * 初始化
+ * 简化版本构建方法调用内容
+ * 代码段场景+分层场景使用
+ * @param invokeRowContent
*/
- public void initInvokeRowContentList(){
- if(CollectionUtils.isEmpty(invokeRowBeanList)){
- this.setInvokeRowBeanList(new ArrayList<>());
- }
- if(CollectionUtils.isEmpty(invokeMethodList)){
- this.setInvokeMethodList(new LinkedList<>());
- }
+ public void addInvokeRowContentSimple(String invokeRowContent){
+ this.invokeMethodList.add(invokeRowContent);
}
-
/**
* 解析方法返回参数类型,是否包含vo,dto,bo
* @return
@@ -690,4 +728,18 @@ public class MethodBean {
|| this.methodName.toLowerCase().contains(GlobalConstant.EXPORT_ACL_KEY);
}
+ public void addParamAnnotation(String paramAnnotation, int index){
+ this.paramAnnotationList.add(paramAnnotation);
+ if(StringUtils.isEmpty(this.paramAnnotationList.get(index))){
+ this.paramAnnotationList.set(index,paramAnnotation);
+ }else {
+ if(this.paramAnnotationList.get(index).contains(paramAnnotation)){
+ return;
+ }
+ String paramAnno = paramAnnotation + " " + this.paramAnnotationList.get(index);
+ this.paramAnnotationList.set(index,paramAnno);
+ }
+ }
+
+
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/PackageBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PackageBean.java
similarity index 94%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/PackageBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PackageBean.java
index 2877b4f529ffb05138c389049cdd02a3e11492ca..5664fbb69136e7c8504a6211d1c9008b781966c5 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/PackageBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PackageBean.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.bean.plantuml;
+package com.tianhua.codemaker.bean.plantuml;
import java.util.List;
@@ -6,7 +6,7 @@ import java.util.List;
* Description:
* date: 2021/7/2
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/ParamBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/ParamBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..18a73e42f5d4e087f540556f3b0fd7e4c17dfba3
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/ParamBean.java
@@ -0,0 +1,67 @@
+package com.tianhua.codemaker.bean.plantuml;
+
+/**
+ * Description:
+ * date: 2022/3/14
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public class ParamBean {
+
+
+ public ParamBean(){}
+ public ParamBean(String paramClass, String paramName){
+ this.paramClass = paramClass;
+ this.paramName = paramName;
+ }
+
+ /**
+ * 参数类型
+ */
+ private String paramClass;
+
+ /**
+ * 参数类型
+ */
+ private String paramName;
+
+
+ /**
+ * 是否是范型参数
+ */
+ private boolean genericType;
+
+
+ public String getParamName() {
+ return paramName;
+ }
+
+ public void setParamName(String paramName) {
+ this.paramName = paramName;
+ }
+
+ public String getParamClass() {
+ return paramClass;
+ }
+
+ public void setParamClass(String paramClass) {
+ this.paramClass = paramClass;
+ }
+
+
+ public boolean isGenericType() {
+ return genericType;
+ }
+
+ public void setGenericType(boolean genericType) {
+ this.genericType = genericType;
+ }
+
+ public static ParamBean getInstance(String paramClass, String paramName, Boolean genericType){
+ ParamBean paramBean = new ParamBean(paramClass,paramName);
+ paramBean.setGenericType(genericType);
+ return paramBean;
+ }
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PatternBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PatternBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..295fa527f1b1aae7d8ef300a29fed2fbf51131ef
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PatternBean.java
@@ -0,0 +1,55 @@
+package com.tianhua.codemaker.bean.plantuml;
+
+/**
+ * Description:范型模型
+ * date: 2022/3/14
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public class PatternBean {
+
+ /**
+ * 范型类型标示
+ * 或者类名
+ */
+ public String tagClass;
+
+ /**
+ * 范型类继承的父类
+ * ? extends T
+ */
+ public boolean withExtends;
+
+ /**
+ * 范型类的父类
+ * ? super T
+ */
+ public Boolean withSuper;
+
+
+ public String getTagClass() {
+ return tagClass;
+ }
+
+ public void setTagClass(String tagClass) {
+ this.tagClass = tagClass;
+ }
+
+ public boolean isWithExtends() {
+ return withExtends;
+ }
+
+ public void setWithExtends(boolean withExtends) {
+ this.withExtends = withExtends;
+ }
+
+ public Boolean getWithSuper() {
+ return withSuper;
+ }
+
+ public void setWithSuper(Boolean withSuper) {
+ this.withSuper = withSuper;
+ }
+}
diff --git a/codemaker-parent/codemaker-core/src/test/java/Test.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PatternMethodBean.java
similarity index 35%
rename from codemaker-parent/codemaker-core/src/test/java/Test.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PatternMethodBean.java
index 60257b4f1ad52a7fd0475d92c7515816942980db..ad8a9035a168916a4923e2076c71c274733e236a 100644
--- a/codemaker-parent/codemaker-core/src/test/java/Test.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PatternMethodBean.java
@@ -1,13 +1,14 @@
+package com.tianhua.codemaker.bean.plantuml;
+
/**
* Description:
- * date: 2021/11/22
+ * date: 2022/3/14
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
-public class Test {
- public static void main(String[] args) {
+public class PatternMethodBean {
+
- }
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/PlantUmlContextBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PlantUmlContextBean.java
similarity index 53%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/PlantUmlContextBean.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PlantUmlContextBean.java
index 01eae19065cb49e7f60155e0e4d5b58a21e88856..5ebfad485d70874a5523d68a0047ec24330a065c 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/bean/plantuml/PlantUmlContextBean.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/plantuml/PlantUmlContextBean.java
@@ -1,8 +1,11 @@
-package com.coderman.codemaker.bean.plantuml;
+package com.tianhua.codemaker.bean.plantuml;
-import com.coderman.codemaker.bean.component.ComponentContextBean;
-import com.coderman.codemaker.bean.invoke.InvokeContextBean;
+import com.tianhua.codemaker.bean.component.ComponentContextBean;
+import com.tianhua.codemaker.bean.config.FtlBean;
+import com.tianhua.codemaker.bean.config.PomBean;
+import com.tianhua.codemaker.bean.invoke.InvokeContextBean;
import com.google.common.collect.Sets;
+import org.apache.commons.lang3.StringUtils;
import java.util.*;
@@ -10,20 +13,23 @@ import java.util.*;
* Description:
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
public class PlantUmlContextBean {
- private Map classBeanMap = new HashMap<>();
+ private Map classBeanMap = new HashMap<>();
- private Map enumBeanMap = new HashMap<>();
+ private Map enumBeanMap = new HashMap<>();
private Map interfaceBeanMap = new HashMap<>();
- private Map packageBeanMap = new HashMap<>();
+ /**
+ * pom相关配置
+ */
+ public Map pomBeanMap = new HashMap<>();
/**
* 派生类上下文
@@ -33,7 +39,7 @@ public class PlantUmlContextBean {
/**
* 扫描到的依赖组件
*/
- private Map compContextBeanMap;
+ private Map compContextBeanMap = new HashMap<>();
/**
@@ -44,9 +50,7 @@ public class PlantUmlContextBean {
/**
* app应用类型
*/
- private String applicationType;
-
-
+ private String applicationType;
/**
* 动态调用时序图文件
@@ -58,7 +62,21 @@ public class PlantUmlContextBean {
* key:调用方的类名.方法名
* value:被调用方的类名.方法名
*/
- private Map> dynamicInvokeChainMap = new HashMap<>();
+ private Map> dynamicInvokeChainMap = new HashMap<>();
+
+
+ /**
+ * 自定义代码元素配置bean对象,在对应elementHandler做路由标示
+ */
+ private FtlBean ftlBean;
+
+ public FtlBean getFtlBean() {
+ return ftlBean;
+ }
+
+ public void setFtlBean(FtlBean ftlBean) {
+ this.ftlBean = ftlBean;
+ }
public Map> getDynamicInvokeChainMap() {
return dynamicInvokeChainMap;
@@ -72,6 +90,10 @@ public class PlantUmlContextBean {
this.derivedPlantUmlContextBean = derivedPlantUmlContextBean;
}
+ public Map getPomBeanMap() {
+ return pomBeanMap;
+ }
+
public Map getClassBeanMap() {
return classBeanMap;
}
@@ -84,26 +106,26 @@ public class PlantUmlContextBean {
return interfaceBeanMap;
}
- public void addClassBean(ClassBean classBean){
- this.classBeanMap.put(classBean.getClassName(),classBean);
+ public void addClassBean(ClassBean classBean) {
+ this.classBeanMap.put(classBean.getClassName(), classBean);
}
- public void addInterfaceBean(InterfaceBean interfaceBean){
+ public void addInterfaceBean(InterfaceBean interfaceBean) {
- this.interfaceBeanMap.put(interfaceBean.getClassName(),interfaceBean);
+ this.interfaceBeanMap.put(interfaceBean.getClassName(), interfaceBean);
}
- public void addEnumBean(EnumBean enumBean){
- this.enumBeanMap.put(enumBean.getClassName(),enumBean);
+ public void addPomBean(PomBean pomBean) {
+ if(StringUtils.isEmpty(pomBean.getModuleCode())){
+ return;
+ }
+ this.pomBeanMap.put(pomBean.getModuleCode(), pomBean);
}
- public Map getPackageBeanMap() {
- return packageBeanMap;
+ public void addEnumBean(EnumBean enumBean) {
+ this.enumBeanMap.put(enumBean.getClassName(), enumBean);
}
- public void addPacakge(PackageBean packageBean){
- this.packageBeanMap.put(packageBean.getPackageName(),packageBean);
- }
public List getDynamicInvokeFileList() {
return dynamicInvokeFileList;
@@ -111,12 +133,13 @@ public class PlantUmlContextBean {
/**
* 解析多个调用时序图文件名称
+ *
* @param plantUMLFileName
*/
- public void addDynamicInvokeFile(String plantUMLFileName){
- if(plantUMLFileName.contains(",")){
- String [] arr = plantUMLFileName.split(",");
- for (String fileName : arr){
+ public void addDynamicInvokeFile(String plantUMLFileName) {
+ if (plantUMLFileName.contains(",")) {
+ String[] arr = plantUMLFileName.split(",");
+ for (String fileName : arr) {
dynamicInvokeFileList.add(fileName.trim());
}
return;
@@ -126,25 +149,26 @@ public class PlantUmlContextBean {
/**
* 记录调用时序图中的调用方信息
+ *
* @param invokeContextBean
* @return 是否保存成功
*/
- public boolean addInvokeMethod(InvokeContextBean invokeContextBean){
+ public boolean addInvokeMethod(InvokeContextBean invokeContextBean) {
- String key = invokeContextBean.getInvokerClassBean().getClassName()+"."+invokeContextBean.getInvokerMethodBean().getMethodName();
+ String key = invokeContextBean.getInvokerClassBean().getClassName() + "." + invokeContextBean.getInvokerMethodBean().getMethodName();
Set providerMethodSet = this.dynamicInvokeChainMap.get(key);
- if(providerMethodSet == null){
+ if (providerMethodSet == null) {
providerMethodSet = Sets.newHashSet();
}
- String value = invokeContextBean.getProviderClassName()+invokeContextBean.getProviderClassMethod();
+ String value = invokeContextBean.getProviderClassName() + invokeContextBean.getProviderClassMethod();
- if(providerMethodSet.contains(value)){
+ if (providerMethodSet.contains(value)) {
return false;
}
providerMethodSet.add(value);
- this.getDynamicInvokeChainMap().put(key,providerMethodSet);
+ this.getDynamicInvokeChainMap().put(key, providerMethodSet);
return true;
}
@@ -170,7 +194,13 @@ public class PlantUmlContextBean {
return compContextBeanMap;
}
- public void setCompContextBeanMap(Map compContextBeanMap) {
- this.compContextBeanMap = compContextBeanMap;
+ public void addCompContextBean(String key, ComponentContextBean componentContextBean) {
+ this.compContextBeanMap.put(key, componentContextBean);
}
+
+
+ public void addCompContextBeanBatch(Map componentContextBeanMap) {
+ this.compContextBeanMap.putAll(componentContextBeanMap);
+ }
+
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/segment/SegmentBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/segment/SegmentBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..25d3d0cb24f4ee9b727726f2f543baee112d6105
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/bean/segment/SegmentBean.java
@@ -0,0 +1,113 @@
+package com.tianhua.codemaker.bean.segment;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Description;代码片段模型
+ * date; 2022/1/25
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public class SegmentBean {
+
+ public SegmentBean(){}
+ public SegmentBean(String identifer){
+ this.identifer = identifer;
+ }
+
+ public SegmentBean(String identifer, String code){
+ this.identifer = identifer;
+ this.code = code;
+ }
+ /**
+ * 代码段内容
+ */
+ private String code;
+ /**
+ * 代码段中需要导入的包
+ */
+ private List packageNameList = new ArrayList<>();
+ /**
+ * 代码段类型标示
+ */
+ private String identifer;
+ /**
+ * 代码段模板
+ */
+ private String segmentTemplate;
+
+ /**
+ * 代码段模板对应的变量列表map
+ */
+ private Map templateVarMap;
+
+ /**
+ * 关联的代码类名称
+ */
+ private String relationClassName;
+
+
+
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public List getPackageNameList() {
+ return packageNameList;
+ }
+
+ public void setPackageNameList(List packageNameList) {
+ this.packageNameList = packageNameList;
+ }
+
+ public String getIdentifer() {
+ return identifer;
+ }
+
+ public void setIdentifer(String identifer) {
+ this.identifer = identifer;
+ }
+
+ public String getSegmentTemplate() {
+ return segmentTemplate;
+ }
+
+ public void setSegmentTemplate(String segmentTemplate) {
+ this.segmentTemplate = segmentTemplate;
+ }
+
+ public Map getTemplateVarMap() {
+ return templateVarMap;
+ }
+
+ public void setTemplateVarMap(Map templateVarMap) {
+ this.templateVarMap = templateVarMap;
+ }
+
+ public String getRelationClassName() {
+ return relationClassName;
+ }
+
+ public void setRelationClassName(String relationClassName) {
+ this.relationClassName = relationClassName;
+ }
+
+
+ public static SegmentBean getInstance(String identifer, String code ){
+ return new SegmentBean(identifer, code);
+ }
+
+ public void importPackageName(String packageName){
+ this.packageNameList.add(packageName);
+ }
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/AdapterPomElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/AdapterPomElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..da21d30ceea9ba14a8841c5021ff272b15f2f3d0
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/AdapterPomElementBean.java
@@ -0,0 +1,17 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Deprecated
+public class AdapterPomElementBean extends ElementBean {
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/AppPomElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/AppPomElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..5221215d9d0c5b988cf328e0889ef22e5189fafc
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/AppPomElementBean.java
@@ -0,0 +1,17 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Deprecated
+public class AppPomElementBean extends ElementBean {
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/CustomElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/CustomElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..1c944ef33aa32a531b789a5c760965b0b65540a4
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/CustomElementBean.java
@@ -0,0 +1,16 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public class CustomElementBean extends ElementBean {
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/DomainPomElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/DomainPomElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..06422b47013119a2c027ed3f8cb9d1857f85d6a2
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/DomainPomElementBean.java
@@ -0,0 +1,17 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Deprecated
+public class DomainPomElementBean extends ElementBean {
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/FeignApiPomElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/FeignApiPomElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..4f10abb9e4e937af07d475675bfa979070fd7a9e
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/FeignApiPomElementBean.java
@@ -0,0 +1,17 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Deprecated
+public class FeignApiPomElementBean extends ElementBean {
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/FeignProviderPomElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/FeignProviderPomElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..9c535e632a3bb8090695a8d3d6e389dd02f1bb12
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/FeignProviderPomElementBean.java
@@ -0,0 +1,17 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Deprecated
+public class FeignProviderPomElementBean extends ElementBean {
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/InfrastPomElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/InfrastPomElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..b4f2a2ec3c68c25c284099cafce868c4f2d43788
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/InfrastPomElementBean.java
@@ -0,0 +1,17 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Deprecated
+public class InfrastPomElementBean extends ElementBean {
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/ParentPomElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/ParentPomElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..6b8727eb66268fe29a1ded68838064772fb6d952
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/ParentPomElementBean.java
@@ -0,0 +1,17 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Deprecated
+public class ParentPomElementBean extends ElementBean {
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/PomElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/PomElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..a7459ed06a80e1457ccc546d8325cb06ce3d4db6
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/PomElementBean.java
@@ -0,0 +1,16 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public class PomElementBean extends ElementBean {
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/StartPomElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/StartPomElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..92a16b0976fb55026904b151ee90a6d8b8ccdf60
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/StartPomElementBean.java
@@ -0,0 +1,17 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * date: 2022/1/17
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Deprecated
+public class StartPomElementBean extends ElementBean {
+
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/ValidatorElementBean.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/ValidatorElementBean.java
new file mode 100644
index 0000000000000000000000000000000000000000..df7bb760cfa6ce7202d2e223e79b43024846dd30
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/bean/ValidatorElementBean.java
@@ -0,0 +1,17 @@
+package com.tianhua.codemaker.custom.bean;
+
+import com.tianhua.codemaker.bean.dddelement.ElementBean;
+
+/**
+ * Description:
+ * 自定义代码元素实现
+ * date: 2021/6/28
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+@Deprecated
+public class ValidatorElementBean extends ElementBean {
+
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/package-info.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/package-info.java
new file mode 100644
index 0000000000000000000000000000000000000000..9ac5422a86e78313c87a2ac49d4a12c6fe08d3c7
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/custom/package-info.java
@@ -0,0 +1 @@
+package com.tianhua.codemaker.custom;
\ No newline at end of file
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/ClassEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ClassEnum.java
similarity index 35%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/ClassEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ClassEnum.java
index e2beb3766fedda6cb1607d3f893350cb74cfdf43..667eb5ed80315eb476274d6ec95bc68dcab5229e 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/ClassEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ClassEnum.java
@@ -1,10 +1,12 @@
-package com.coderman.codemaker.enums;
+package com.tianhua.codemaker.enums;
+
+import java.util.Objects;
/**
* Description:
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -13,6 +15,10 @@ public enum ClassEnum {
CLASS("class"),
INTERFACE("interface"),
ENUM("enum"),
+ POM("pom"),
+ PROPERTIES("properties"),
+ YML("YML"),
+
;
private String classType;
ClassEnum(String classType){
@@ -22,4 +28,22 @@ public enum ClassEnum {
public String getClassType() {
return classType;
}
+
+ public static boolean isClass(String classType){
+ return Objects.equals(classType,ClassEnum.CLASS.getClassType());
+ }
+
+ public static boolean isInterface(String classType){
+ return Objects.equals(classType,ClassEnum.INTERFACE.getClassType());
+ }
+
+ public static boolean isEnum(String classType){
+ return Objects.equals(classType,ClassEnum.ENUM.getClassType());
+ }
+
+ public static boolean isPom(String classType){
+ return Objects.equals(classType,ClassEnum.POM.getClassType());
+ }
+
+
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/ClassRelationEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ClassRelationEnum.java
similarity index 98%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/ClassRelationEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ClassRelationEnum.java
index 4df1655c1ac0ede9182b766c50a3be9608580363..1764f95b76ea6761e5247c1e26a4e29cf0b26eb0 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/ClassRelationEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ClassRelationEnum.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.enums;
+package com.tianhua.codemaker.enums;
import com.google.common.collect.Sets;
import org.apache.commons.lang3.StringUtils;
@@ -12,7 +12,7 @@ import java.util.concurrent.atomic.AtomicReference;
* Description:
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/CodeElementEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/CodeElementEnum.java
new file mode 100644
index 0000000000000000000000000000000000000000..9a312094389c6cbba2cd1662060da1f22fc480e2
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/CodeElementEnum.java
@@ -0,0 +1,78 @@
+package com.tianhua.codemaker.enums;
+
+/**
+ * description: TemplateFileEnum
+ * date: 2020/7/7 23:44
+ * author: coderman
+ * version: 1.0
+ * 代码元素类型枚举
+ */
+public enum CodeElementEnum {
+ ENTITY("entity", ClassEnum.CLASS.getClassType()),
+ MAPPER("mapper", ClassEnum.INTERFACE.getClassType()),
+ POM("pom",""),
+ CONTROLLER("controller",ClassEnum.CLASS.getClassType()),
+ MAPPER_XML("mapperxml",""),
+ SERVICE_CLASS("serviceclasss",ClassEnum.CLASS.getClassType()),
+ SERVICE_INTERFACE("serviceinterface",ClassEnum.INTERFACE.getClassType()),
+
+ SERVICE_IMPL("serviceImpl",ClassEnum.CLASS.getClassType()),
+ VO("vo",ClassEnum.CLASS.getClassType()),
+ TEST("test",ClassEnum.CLASS.getClassType()),
+ DTO("dto",ClassEnum.CLASS.getClassType()),
+ FACADE("facade",ClassEnum.INTERFACE.getClassType()),
+ DATA_OBJECT("do",ClassEnum.CLASS.getClassType()),
+ FACADE_IMPL("facadeImpl",ClassEnum.CLASS.getClassType()),
+ BUSINESS_OBJECT("bo",ClassEnum.CLASS.getClassType()),
+ CONVERT("convert",ClassEnum.INTERFACE.getClassType()),
+ DTOBO_CONVERT("dtoboconvert",ClassEnum.INTERFACE.getClassType()),
+ DTO2DTO_CONVERT("dto2dtoconvert",ClassEnum.INTERFACE.getClassType()),
+ DOBO_CONVERT("doboconvert",ClassEnum.INTERFACE.getClassType()),
+ GATAWAY("gataway",ClassEnum.INTERFACE.getClassType()),
+ REPOSITORY("repository",ClassEnum.INTERFACE.getClassType()),
+ REPOSITORY_IMPL("repositoryimpl",ClassEnum.CLASS.getClassType()),
+ FACTORY("factory",ClassEnum.CLASS.getClassType()),
+ ENUM("enum",ClassEnum.ENUM.getClassType()),
+ API_ENUM("apienum",ClassEnum.ENUM.getClassType()),
+ MESSAGE_BODY("msgbody",ClassEnum.CLASS.getClassType()),
+ EVENT_BODY("event",ClassEnum.CLASS.getClassType()),
+ GATAWAY_IMPL("gatawayimpl",ClassEnum.CLASS.getClassType()),
+ ACL_IMPL("aclimpl",ClassEnum.CLASS.getClassType()),
+ ACL_REQ("aclreq",ClassEnum.CLASS.getClassType()),
+ ACL_RES("aclres",ClassEnum.CLASS.getClassType()),
+ ACL_PARAM("aclparam",ClassEnum.CLASS.getClassType()),
+ CMD("cmd",ClassEnum.CLASS.getClassType()),
+ EXE("exe",ClassEnum.INTERFACE.getClassType()),
+ EXE_IMPL("exeimpl",ClassEnum.CLASS.getClassType()),
+ EXE_ABSTRACT("abstractexe" ,ClassEnum.CLASS.getClassType()),
+ VALUE_OBJECT("valueobject", ClassEnum.CLASS.getClassType()),
+ VOBO_CONVERT("voboconvert",ClassEnum.INTERFACE.getClassType()),
+
+ MQ_CONSUMER("mqconsumer",ClassEnum.CLASS.getClassType()),
+ MQ_HANDLER("mqhandler",ClassEnum.CLASS.getClassType()),
+ MQ_LISTENER("mqlistener",ClassEnum.CLASS.getClassType()),
+ MQ_PRODUCER("mqproducer",ClassEnum.CLASS.getClassType()),
+
+
+
+ FEIGN("feign",ClassEnum.INTERFACE.getClassType()),
+
+
+ ;
+ private String code;
+
+ private String classType;
+
+ CodeElementEnum(String code,String classType){
+ this.code = code;
+ this.classType = classType;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public String getClassType() {
+ return classType;
+ }
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/CodeSegmentEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/CodeSegmentEnum.java
new file mode 100644
index 0000000000000000000000000000000000000000..0ba3f8ea62d7a2f7112c67c494bec54a14635173
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/CodeSegmentEnum.java
@@ -0,0 +1,37 @@
+package com.tianhua.codemaker.enums;
+
+/**
+ * Description:
+ * date: 2022/1/25
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public enum CodeSegmentEnum {
+ VALIDATE("validate","校验标示")
+ ;
+
+ private String tag;
+ private String desc;
+ CodeSegmentEnum(String tag, String desc){
+ this.tag = tag;
+ this.desc = desc;
+ }
+
+ public String getTag() {
+ return tag;
+ }
+
+ public void setTag(String tag) {
+ this.tag = tag;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ public void setDesc(String desc) {
+ this.desc = desc;
+ }
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/CompTypeEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/CompTypeEnum.java
similarity index 91%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/CompTypeEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/CompTypeEnum.java
index 0b6cc82ee9ebc629a825d4115a480251d11878ad..d3f2bcc821b7c793df41d6d1ee6b19876aa58ce7 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/CompTypeEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/CompTypeEnum.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.enums;
+package com.tianhua.codemaker.enums;
/**
* Description:组件类型
* date: 2021/12/23
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ConfigFileEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ConfigFileEnum.java
new file mode 100644
index 0000000000000000000000000000000000000000..174d339e73af10fb9c4294d6aaae25d6b950db14
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ConfigFileEnum.java
@@ -0,0 +1,27 @@
+package com.tianhua.codemaker.enums;
+
+/**
+ * Description:
+ * date: 2022/3/30
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public enum ConfigFileEnum {
+
+ PROPERTIES("properties"),
+ YML("yml"),
+ CONFIG("config"),
+ SH("sh"),
+ ;
+
+ private String fileExtName;
+ ConfigFileEnum(String fileExtName){
+ this.fileExtName = fileExtName;
+ }
+
+ public String getFileExtName() {
+ return fileExtName;
+ }
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/DomainDerivedElementEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/DomainDerivedElementEnum.java
similarity index 94%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/DomainDerivedElementEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/DomainDerivedElementEnum.java
index fff2bc3ac62d3ceef45e9274710e8decf61e5a9b..0725049203c0818e96667651be3d3f00d5ad1069 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/DomainDerivedElementEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/DomainDerivedElementEnum.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.enums;
+package com.tianhua.codemaker.enums;
/**
* Description:领域派生类枚举
* date: 2021/6/29
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/DomainElementEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/DomainElementEnum.java
similarity index 93%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/DomainElementEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/DomainElementEnum.java
index d6d9ec2d0eb78a6e16236012655c9fbfba76cd91..650da1e9879e001195fdc73cc53de5ecfaf3b641 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/DomainElementEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/DomainElementEnum.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.enums;
+package com.tianhua.codemaker.enums;
/**
* Description:
* date: 2021/6/29
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -30,6 +30,7 @@ public enum DomainElementEnum {
MQ_HANDLER("mqhandler","消息处理器"),
CACHE("cache","缓存"),
+ SERVICE_IMPL("serviceimpl","领域服务实现"),
GATAWAY_IMPL("gatawayimpl","领域网关服务实现"),
REPOSITORY_IMPL("repositoryimpl","领域仓库实现"),
ACL_IMPL("aclimpl","适配器防腐层实现"),
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/MethodReturnClassTypeEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/MethodReturnClassTypeEnum.java
similarity index 96%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/MethodReturnClassTypeEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/MethodReturnClassTypeEnum.java
index e71b7080abdef3eceee0e24f70f1409b572b1fa7..26d3880c95d13d4083585a4ab74898c4f7827744 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/MethodReturnClassTypeEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/MethodReturnClassTypeEnum.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.enums;
+package com.tianhua.codemaker.enums;
/**
* Description:方法返回类型
* date: 2021/10/29
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/ModuleEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ModuleEnum.java
similarity index 80%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/ModuleEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ModuleEnum.java
index 187ff700318e9b776b1c94182d252bedc7691868..89ba06e47c5d64711c1895e2b9746222857b9466 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/ModuleEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/ModuleEnum.java
@@ -1,7 +1,7 @@
-package com.coderman.codemaker.enums;
+package com.tianhua.codemaker.enums;
-import com.coderman.codemaker.bean.GlobalConstant;
+import com.tianhua.codemaker.bean.GlobalConstant;
import com.google.common.collect.Sets;
import java.util.Set;
@@ -10,7 +10,7 @@ import java.util.Set;
* Description: 项目模块枚举
* date: 2021/6/22
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -18,17 +18,18 @@ public enum ModuleEnum {
/**
*
*/
- SPRING_BOOT_WEB("springboot","codemaker-springboot",
- Sets.newHashSet(TemplateFileEnum.APPLICATION.getTempFileName(),
+ SPRING_BOOT_WEB("springboot","springboot",
+ Sets.newHashSet(
TemplateFileEnum.MAPPER_XML.getTempFileName(),
TemplateFileEnum.MAPPER.getTempFileName(),
TemplateFileEnum.MAPPER_DDD.getTempFileName(),
TemplateFileEnum.MAPPER_XML_DDD.getTempFileName(),
-
TemplateFileEnum.CONTROLLER.getTempFileName(),
TemplateFileEnum.CONTROLLER_DDD.getTempFileName(),
TemplateFileEnum.SERVICE_IMPL.getTempFileName(),
TemplateFileEnum.SERVICE.getTempFileName(),
+ TemplateFileEnum.SERVICE_DDD.getTempFileName(),
+ TemplateFileEnum.SERVICE_IMPL_DDD.getTempFileName(),
TemplateFileEnum.VO.getTempFileName(),
TemplateFileEnum.VO_DDD.getTempFileName(),
TemplateFileEnum.DTO_DDD.getTempFileName(),
@@ -39,6 +40,7 @@ public enum ModuleEnum {
TemplateFileEnum.BUSINESS_OBJECT_DDD.getTempFileName(),
TemplateFileEnum.TEST.getTempFileName(),
+ TemplateFileEnum.TEST_DDD.getTempFileName(),
TemplateFileEnum.VALUE_OBJECT.getTempFileName(),
TemplateFileEnum.ENUM.getTempFileName(),
TemplateFileEnum.CMD.getTempFileName(),
@@ -53,7 +55,7 @@ public enum ModuleEnum {
TemplateFileEnum.ACL_IMPL.getTempFileName(),
TemplateFileEnum.ACL_PARAM.getTempFileName(),
TemplateFileEnum.DTOBO_CONVERT.getTempFileName(),
- TemplateFileEnum.BASE_CONTROLLER.getTempFileName(),
+ //TemplateFileEnum.BASE_CONTROLLER.getTempFileName(),
TemplateFileEnum.VOBO_CONVERT.getTempFileName(),
TemplateFileEnum.FACTORY.getTempFileName(),
TemplateFileEnum.MESSAGE_BODY.getTempFileName(),
@@ -65,13 +67,11 @@ public enum ModuleEnum {
TemplateFileEnum.MQ_PRODUCER.getTempFileName(),
TemplateFileEnum.MQ_LISTENER.getTempFileName(),
TemplateFileEnum.MQ_HANDLER.getTempFileName(),
+ TemplateFileEnum.PARENT_POM.getTempFileName(),
TemplateFileEnum.MQ_HANDLER.getTempFileName(),
TemplateFileEnum.CACHE.getTempFileName(),
-
- TemplateFileEnum.BASE_EVENT.getTempFileName(),
- TemplateFileEnum.APP_EVENT_PUBLISHER.getTempFileName(),
- GlobalConstant.SINGLE_CLASS_COMMON,
- TemplateFileEnum.SPRING_APPLICATION_CONTEXT.getTempFileName())),
+ GlobalConstant.SINGLE_CLASS_COMMON)
+ ),
@@ -86,6 +86,7 @@ public enum ModuleEnum {
TemplateFileEnum.DTO_DDD.getTempFileName(),
TemplateFileEnum.DTO.getTempFileName(),
TemplateFileEnum.API_ENUM.getTempFileName(),
+ TemplateFileEnum.API_POM.getTempFileName(),
GlobalConstant.SINGLE_CLASS_COMMON
)),
@@ -93,7 +94,7 @@ public enum ModuleEnum {
*
*/
SC_FEIGN_PROVIDER("springcloud","springcloud-provider",
- Sets.newHashSet(TemplateFileEnum.APPLICATION.getTempFileName(),
+ Sets.newHashSet(
TemplateFileEnum.MAPPER_XML.getTempFileName(),
TemplateFileEnum.MAPPER.getTempFileName(),
TemplateFileEnum.MAPPER_DDD.getTempFileName(),
@@ -103,15 +104,15 @@ public enum ModuleEnum {
TemplateFileEnum.CONTROLLER_DDD.getTempFileName(),
TemplateFileEnum.SERVICE_IMPL.getTempFileName(),
TemplateFileEnum.SERVICE.getTempFileName(),
- /* TemplateFileEnum.VO.getTempFileName(),
- TemplateFileEnum.VO_DDD.getTempFileName(),*/
+ TemplateFileEnum.SERVICE_DDD.getTempFileName(),
+ TemplateFileEnum.SERVICE_IMPL_DDD.getTempFileName(),
TemplateFileEnum.DTO_DDD.getTempFileName(),
TemplateFileEnum.DTO.getTempFileName(),
TemplateFileEnum.ENTITY.getTempFileName(),
TemplateFileEnum.DATA_OBJECT.getTempFileName(),
TemplateFileEnum.BUSINESS_OBJECT.getTempFileName(),
TemplateFileEnum.BUSINESS_OBJECT_DDD.getTempFileName(),
-
+ TemplateFileEnum.TEST_DDD.getTempFileName(),
TemplateFileEnum.TEST.getTempFileName(),
TemplateFileEnum.VALUE_OBJECT.getTempFileName(),
TemplateFileEnum.ENUM.getTempFileName(),
@@ -127,10 +128,6 @@ public enum ModuleEnum {
TemplateFileEnum.ACL_IMPL.getTempFileName(),
TemplateFileEnum.ACL_PARAM.getTempFileName(),
TemplateFileEnum.DTOBO_CONVERT.getTempFileName(),
- TemplateFileEnum.BASE_CONTROLLER.getTempFileName(),
-/*
- TemplateFileEnum.VOBO_CONVERT.getTempFileName(),
-*/
TemplateFileEnum.FACTORY.getTempFileName(),
TemplateFileEnum.MESSAGE_BODY.getTempFileName(),
TemplateFileEnum.EVENT_BODY.getTempFileName(),
@@ -148,15 +145,13 @@ public enum ModuleEnum {
TemplateFileEnum.FEIGN_DDD.getTempFileName(),
TemplateFileEnum.FEIGN_CONTROLLER.getTempFileName(),
TemplateFileEnum.FEIGN_CONTROLLER_DDD.getTempFileName(),
+ TemplateFileEnum.PROVIDER_POM.getTempFileName(),
- TemplateFileEnum.BASE_EVENT.getTempFileName(),
- TemplateFileEnum.APP_EVENT_PUBLISHER.getTempFileName(),
- GlobalConstant.SINGLE_CLASS_COMMON,
- TemplateFileEnum.SPRING_APPLICATION_CONTEXT.getTempFileName())),
-
-
-
-
+ //TemplateFileEnum.BASE_EVENT.getTempFileName(),
+ //TemplateFileEnum.APP_EVENT_PUBLISHER.getTempFileName(),
+ GlobalConstant.SINGLE_CLASS_COMMON
+ //TemplateFileEnum.SPRING_APPLICATION_CONTEXT.getTempFileName()
+ )),
@@ -169,6 +164,8 @@ public enum ModuleEnum {
TemplateFileEnum.DTO_DDD.getTempFileName(),
TemplateFileEnum.DTO.getTempFileName(),
TemplateFileEnum.API_ENUM.getTempFileName(),
+ TemplateFileEnum.API_POM.getTempFileName(),
+
GlobalConstant.SINGLE_CLASS_COMMON
)),
/**
@@ -181,6 +178,8 @@ public enum ModuleEnum {
TemplateFileEnum.MAPPER_XML_DDD.getTempFileName(),
TemplateFileEnum.DATA_OBJECT.getTempFileName(),
+ TemplateFileEnum.COMMON_POM.getTempFileName(),
+
GlobalConstant.SINGLE_CLASS_COMMON
)),
/**
@@ -194,12 +193,11 @@ public enum ModuleEnum {
TemplateFileEnum.CONVERT.getTempFileName(),
TemplateFileEnum.SERVICE_IMPL.getTempFileName(),
TemplateFileEnum.TEST.getTempFileName(),
- TemplateFileEnum.SPRING_APPLICATION_CONTEXT.getTempFileName(),
+ TemplateFileEnum.TEST_DDD.getTempFileName(),
TemplateFileEnum.FACADE_IMPL.getTempFileName(),
TemplateFileEnum.FACADE_IMPL_DDD.getTempFileName(),
-
- TemplateFileEnum.APPLICATION.getTempFileName(),
- TemplateFileEnum.FACADE_AOP.getTempFileName(),
+ TemplateFileEnum.SERVICE_DDD.getTempFileName(),
+ TemplateFileEnum.SERVICE_IMPL_DDD.getTempFileName(),
TemplateFileEnum.VALUE_OBJECT.getTempFileName(),
TemplateFileEnum.ENUM.getTempFileName(),
TemplateFileEnum.CMD.getTempFileName(),
@@ -218,30 +216,28 @@ public enum ModuleEnum {
TemplateFileEnum.MESSAGE_BODY.getTempFileName(),
TemplateFileEnum.EVENT_BODY.getTempFileName(),
TemplateFileEnum.ACL_PARAM.getTempFileName(),
-
- TemplateFileEnum.BASE_EVENT.getTempFileName(),
- TemplateFileEnum.APP_EVENT_PUBLISHER.getTempFileName(),
-
TemplateFileEnum.MQ_CONSUMER.getTempFileName(),
TemplateFileEnum.MQ_PRODUCER.getTempFileName(),
TemplateFileEnum.MQ_LISTENER.getTempFileName(),
TemplateFileEnum.MQ_HANDLER.getTempFileName(),
TemplateFileEnum.CACHE.getTempFileName(),
+ TemplateFileEnum.CORE_POM.getTempFileName(),
GlobalConstant.SINGLE_CLASS_COMMON
-
)),
/**
*
*/
- COLA_FEIGN_API("cola","cola-feign-api", Sets.newHashSet(
+ COLA_FEIGN_API("cola","cola-feignapi", Sets.newHashSet(
TemplateFileEnum.FEIGN.getTempFileName(),
TemplateFileEnum.FEIGN_DDD.getTempFileName(),
TemplateFileEnum.DTO_DDD.getTempFileName(),
TemplateFileEnum.DTO.getTempFileName(),
TemplateFileEnum.API_ENUM.getTempFileName(),
+ TemplateFileEnum.FEIGN_API_POM.getTempFileName(),
+
GlobalConstant.SINGLE_CLASS_COMMON
)),
@@ -250,11 +246,13 @@ public enum ModuleEnum {
*/
COLA_ADAPTER("cola","cola-adapter", Sets.newHashSet(
TemplateFileEnum.CONTROLLER.getTempFileName(),
- TemplateFileEnum.BASE_CONTROLLER.getTempFileName(),
+ //TemplateFileEnum.BASE_CONTROLLER.getTempFileName(),
TemplateFileEnum.VO.getTempFileName(),
TemplateFileEnum.CONTROLLER_DDD.getTempFileName(),
TemplateFileEnum.VOBO_CONVERT.getTempFileName(),
+ TemplateFileEnum.CONVERT.getTempFileName(),
TemplateFileEnum.VO_DDD.getTempFileName(),
+ TemplateFileEnum.ADAPTER_POM.getTempFileName(),
GlobalConstant.SINGLE_CLASS_COMMON
)),
@@ -273,9 +271,10 @@ public enum ModuleEnum {
TemplateFileEnum.VALUE_OBJECT.getTempFileName(),
TemplateFileEnum.MESSAGE_BODY.getTempFileName(),
TemplateFileEnum.EVENT_BODY.getTempFileName(),
- TemplateFileEnum.BASE_EVENT.getTempFileName(),
TemplateFileEnum.ENUM.getTempFileName(),
- GlobalConstant.SINGLE_CLASS_COMMON
+ TemplateFileEnum.DOMAIN_POM.getTempFileName(),
+ GlobalConstant.SINGLE_CLASS_COMMON,
+ TemplateFileEnum.SERVICE_DDD.getTempFileName()
)),
/**
@@ -287,6 +286,8 @@ public enum ModuleEnum {
TemplateFileEnum.FACADE.getTempFileName(),
TemplateFileEnum.FACADE_DDD.getTempFileName(),
TemplateFileEnum.API_ENUM.getTempFileName(),
+ TemplateFileEnum.ENUM.getTempFileName(),
+ TemplateFileEnum.CLIENT_POM.getTempFileName(),
GlobalConstant.SINGLE_CLASS_COMMON
)),
@@ -298,12 +299,13 @@ public enum ModuleEnum {
TemplateFileEnum.REPOSITORY_IMPL.getTempFileName(),
TemplateFileEnum.MAPPER_XML.getTempFileName(),
TemplateFileEnum.MAPPER_XML_DDD.getTempFileName(),
-
+ TemplateFileEnum.CONVERT.getTempFileName(),
TemplateFileEnum.MAPPER.getTempFileName(),
TemplateFileEnum.MAPPER_DDD.getTempFileName(),
TemplateFileEnum.DATA_OBJECT.getTempFileName(),
TemplateFileEnum.DOBO_CONVERT.getTempFileName(),
TemplateFileEnum.SERVICE_IMPL.getTempFileName(),
+ TemplateFileEnum.SERVICE_IMPL_DDD.getTempFileName(),
TemplateFileEnum.ACL.getTempFileName(),
TemplateFileEnum.ACL_IMPL.getTempFileName(),
TemplateFileEnum.ACL_PARAM.getTempFileName(),
@@ -313,6 +315,7 @@ public enum ModuleEnum {
TemplateFileEnum.MQ_CONSUMER.getTempFileName(),
TemplateFileEnum.MQ_PRODUCER.getTempFileName(),
TemplateFileEnum.MQ_HANDLER.getTempFileName(),
+ TemplateFileEnum.INFRAST_POM.getTempFileName(),
GlobalConstant.SINGLE_CLASS_COMMON
)),
@@ -320,7 +323,8 @@ public enum ModuleEnum {
*
*/
COLA_APP("cola","cola-app", Sets.newHashSet(
- TemplateFileEnum.TEST.getTempFileName(),
+ //todo test
+ //TemplateFileEnum.TEST.getTempFileName(),
TemplateFileEnum.FACADE_IMPL.getTempFileName(),
TemplateFileEnum.FACADE_IMPL_DDD.getTempFileName(),
@@ -329,11 +333,9 @@ public enum ModuleEnum {
TemplateFileEnum.EXE_ABSTRACT.getTempFileName(),
TemplateFileEnum.EXE.getTempFileName(),
TemplateFileEnum.EXE_IMPL.getTempFileName(),
- TemplateFileEnum.SPRING_APPLICATION_CONTEXT.getTempFileName(),
TemplateFileEnum.DTOBO_CONVERT.getTempFileName(),
- TemplateFileEnum.FACADE_AOP.getTempFileName(),
- TemplateFileEnum.APP_EVENT_PUBLISHER.getTempFileName(),
TemplateFileEnum.MQ_LISTENER.getTempFileName(),
+ TemplateFileEnum.APP_POM.getTempFileName(),
GlobalConstant.SINGLE_CLASS_COMMON
)),
@@ -343,6 +345,7 @@ public enum ModuleEnum {
*/
COLA_API_DOC("cola","api-doc", Sets.newHashSet(
TemplateFileEnum.API_HTTP.getTempFileName(),
+ TemplateFileEnum.PARENT_POM.getTempFileName(),
TemplateFileEnum.API_RPC.getTempFileName()
)),
@@ -350,6 +353,9 @@ public enum ModuleEnum {
*
*/
COLA_START("cola","cola-start", Sets.newHashSet(
+ TemplateFileEnum.START_POM.getTempFileName(),
+ TemplateFileEnum.TEST_DDD.getTempFileName(),
+
GlobalConstant.SINGLE_CLASS_COMMON
)),
@@ -358,14 +364,18 @@ public enum ModuleEnum {
*
*/
DUBBO_API_DOC("dubbo","api-doc", Sets.newHashSet(
- TemplateFileEnum.API_RPC.getTempFileName()
- )),
+ TemplateFileEnum.API_RPC.getTempFileName(),
+ TemplateFileEnum.PARENT_POM.getTempFileName()
+
+ )),
/**
*
*/
SPRINGBOOT_API_DOC("springboot","api-doc", Sets.newHashSet(
- TemplateFileEnum.API_HTTP.getTempFileName()
+ TemplateFileEnum.API_HTTP.getTempFileName(),
+ TemplateFileEnum.PARENT_POM.getTempFileName()
+
)),
/**
@@ -373,7 +383,9 @@ public enum ModuleEnum {
*/
SC_API_DOC("springcloud","api-doc", Sets.newHashSet(
TemplateFileEnum.API_HTTP.getTempFileName(),
- TemplateFileEnum.API_RPC.getTempFileName()
+ TemplateFileEnum.API_RPC.getTempFileName(),
+ TemplateFileEnum.PARENT_POM.getTempFileName()
+
)),
;
@@ -397,4 +409,17 @@ public enum ModuleEnum {
public Set getTemplateFileSet() {
return templateFileSet;
}
+
+ /**
+ * 增加自定义代码元素
+ */
+ public static void addCustomTemplateFile(String appName,String moduleName, String templateCode){
+ String module = appName + "-" + moduleName;
+ for (ModuleEnum moduleEnum : ModuleEnum.values()){
+ if(moduleEnum.getAppName().equals(appName) && moduleEnum.getModuleName().equals(module)){
+ moduleEnum.getTemplateFileSet().add(templateCode);
+ }
+ }
+ }
+
}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/TemplateFileEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/TemplateFileEnum.java
new file mode 100644
index 0000000000000000000000000000000000000000..5af808eb3e8e1cce6dc1add72e15c7f88add83dd
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/TemplateFileEnum.java
@@ -0,0 +1,168 @@
+package com.tianhua.codemaker.enums;
+
+/**
+ * description: TemplateFileEnum
+ * date: 2020/7/7 23:44
+ * author: coderman
+ * version: 1.0
+ * 设置要生成的模板文件的类型
+ */
+public enum TemplateFileEnum {
+ ENTITY("entity","dao.dataobject",".java","infrast"),
+ MAPPER("mapper","dao.mapper",".java","infrast"),
+ POM("pom","",".xml","resources"),
+ CONTROLLER("controller","controller",".java","adapter"),
+ MAPPER_XML("mapperxml","",".xml","resource"),
+ SERVICE("service","service",".java","app,domain"),
+ SERVICE_DDD("serviceddd","service",".java","app,domain"),
+ SERVICE_IMPL_DDD("serviceimplddd","serviceimpl",".java","app,domain,infrast"),
+ SERVICE_IMPL("serviceImpl","serviceimpl",".java","app,domain,infrast"),
+ VO("vo","vo",".java","adapter"),
+ BASE_CONTROLLER("baseController","",".java","adapter"),
+ SPRING_APPLICATION_CONTEXT("SpringApplicationContext","",".java","support"),
+ TEST("test","",".java","test"),
+ TEST_DDD("testddd","",".java","test"),
+ APPLICATION("application","",".java","start"),
+ DTO("dto","api.dto",".java","client,feignapi,api"),
+ FACADE("facade","api.facade",".java","client,api"),
+ DATA_OBJECT("do","dao.dataobject",".java","infrast"),
+ FACADE_IMPL("facadeImpl","facadeimpl",".java","app"),
+ BUSINESS_OBJECT("bo","bo",".java","domain"),
+ CONVERT("convert","convert",".java","adapter,app,infrast"),
+ DTOBO_CONVERT("dtoboconvert","convert",".java","app"),
+ DTO2DTO_CONVERT("dto2dtoconvert","convert",".java","app"),
+ DOBO_CONVERT("doboconvert","convert",".java","infrast"),
+ FACADE_AOP("facadeaop","",".java","app"),
+ GATAWAY("gataway","gataway",".java","domain"),
+ REPOSITORY("repository","repository",".java","domain"),
+ REPOSITORY_IMPL("repositoryimpl","repositoryimpl",".java","infrast"),
+ FACTORY("factory","factory",".java","app,domain,infrast"),
+ ENUM("enum","enum",".java","domain,client"),
+ API_ENUM("apienum","api.enum",".java","api,feignapi"),
+ MESSAGE_BODY("msgbody","bo.msgbody",".java","domain"),
+ EVENT_BODY("event","bo.event",".java","domain"),
+ GATAWAY_IMPL("gatawayimpl","repositoryimpl",".java","infrast"),
+ ACL("acl","acl",".java","infrast"),
+ ACL_IMPL("aclimpl","acl.aclimpl",".java","infrast"),
+ ACL_REQ("aclreq","acl.param.req",".java","infrast"),
+ ACL_RES("aclres","acl.param.res",".java","infrast"),
+ ACL_PARAM("aclparam","acl.param",".java","infrast"),
+ CMD("cmd","command",".java","app"),
+ EXE("exe","executor",".java","app"),
+ EXE_IMPL("exeimpl","exeimpl",".java","app"),
+ EXE_ABSTRACT("abstractexe","executor",".java","app"),
+ VALUE_OBJECT("valueobject","bo.valueobject",".java","domain"),
+ BUSINESS_OBJECT_DDD("boddd","bo",".java","domain"),
+ FACADE_DDD("facadeddd","api.facade",".java","client,api"),
+ FACADE_IMPL_DDD("facadeimplddd","facadeimpl",".java","client,api"),
+ CONTROLLER_DDD("controllerddd","adapter.controller",".java","adapter,feignprovider"),
+ VO_DDD("voddd","adapter.vo",".java","adapter"),
+ VOBO_CONVERT("voboconvert","convert",".java","adapter"),
+ DTO_DDD("dtoddd","api.dto",".java","client,api"),
+ MQ_CONSUMER("mqconsumer","mq.consumer",".java","infrast"),
+ MQ_HANDLER("mqhandler","mq.handler",".java","infrast"),
+ MQ_LISTENER("mqlistener","mq.listener",".java","infrast"),
+ MQ_PRODUCER("mqproducer","mq.producer",".java","infrast"),
+ APP_EVENT_PUBLISHER("AppEventPublisher","",".java","domain"),
+ BASE_EVENT("BaseEvent","",".java",""),
+ MAPPER_DDD("mapperddd","dao.mapper",".java","infrast"),
+ MAPPER_XML_DDD("mapperxmlddd","",".xml","resources"),
+ API_HTTP("http","http",".md","api-doc"),
+ API_RPC("rpc","rpc",".md","api-doc"),
+ SQL("sql","sql",".sql","sql-doc"),
+ CACHE("cache","cache",".java","infrast"),
+
+ FEIGN("feign","api.feign",".java","feignapi"),
+ FEIGN_DDD("feignddd","api.feign",".java","feignapi"),
+ FEIGN_CONTROLLER("feigncontroller","api.feign.controller",".java","feignprovider"),
+ FEIGN_CONTROLLER_DDD("feigncontrollerddd","api.feign.controller",".java","feignprovider"),
+
+
+ CLIENT_POM("clientpom","",".xml","client"),
+ DOMAIN_POM("domainpom", "",".xml","domain"),
+ INFRAST_POM("infrastpom","",".xml","infrast"),
+ API_POM("apipom","",".xml","api"),
+ CORE_POM("corepom","",".xml","core"),
+ COMMON_POM("commonpom","",".xml","common"),
+ APP_POM("apppom","",".xml","app"),
+ PARENT_POM("parentpom","",".xml","parent"),
+ START_POM("startpom","",".xml","start"),
+ ADAPTER_POM("adapterpom","",".xml","adapter"),
+ FEIGN_API_POM("feignapipom","",".xml","feignapi"),
+ PROVIDER_POM("providerpom","",".xml","provider"),
+
+ ;
+ private String tempFileName;
+ /**
+ * 最后一级子包名,也是代码元素别名
+ */
+ private String childPackageName;
+
+ /**
+ * 类后缀
+ */
+ private String classSuffix;
+
+ /**
+ * 所属层
+ * todo
+ */
+ private String layerCodes;
+
+ TemplateFileEnum(String tempFileName, String childPackageName, String classSuffix, String layerCodes){
+ this.tempFileName = tempFileName;
+ this.childPackageName = childPackageName;
+ this.classSuffix = classSuffix;
+ this.layerCodes = layerCodes;
+ }
+
+ public String getTempFileName() {
+ return tempFileName;
+ }
+
+ public String getChildPackageName() {
+ return childPackageName;
+ }
+
+ public String getClassSuffix() {
+ return classSuffix;
+ }
+
+ /**
+ * 判断类名是否是bo,vo,dto,entity
+ * @param className
+ * @return
+ */
+ public static boolean isClassModel(String className){
+ String classType = className.toLowerCase();
+ return classType.endsWith(TemplateFileEnum.VO.getTempFileName())
+ || classType.endsWith(TemplateFileEnum.BUSINESS_OBJECT.getTempFileName())
+ || classType.endsWith(TemplateFileEnum.DTO.getTempFileName())
+ || classType.endsWith(TemplateFileEnum.DATA_OBJECT.getTempFileName())
+ || classType.endsWith(TemplateFileEnum.ENTITY.getTempFileName());
+ }
+
+ public static String getChildPackageName(String templateCode){
+ for (TemplateFileEnum templateFileEnum : TemplateFileEnum.values()){
+ if(templateFileEnum.getTempFileName().equals(templateCode)){
+ return templateFileEnum.getChildPackageName();
+ }
+ }
+ return templateCode;
+ }
+
+
+ /**
+ * 获取模板文件名后缀
+ * @param templateCode
+ * @return
+ */
+ public static String getClassSuffix(String templateCode){
+ for (TemplateFileEnum templateFileEnum : TemplateFileEnum.values()){
+ if(templateFileEnum.getTempFileName().equals(templateCode)){
+ return templateFileEnum.getClassSuffix();
+ }
+ }
+ return null;
+ }
+}
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/VisibilityEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/VisibilityEnum.java
similarity index 95%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/VisibilityEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/VisibilityEnum.java
index 1bbcab1fba69a523e8a24d0340c6e199889bfa9b..b7247918f955cd8271c1079080b7e1dfe3f470c1 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/VisibilityEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/VisibilityEnum.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.enums;
+package com.tianhua.codemaker.enums;
/**
* Description:
* date: 2021/6/28
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/AnnotationModifyOnEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/AnnotationModifyOnEnum.java
new file mode 100644
index 0000000000000000000000000000000000000000..d384dcabee90f8b9f1fea16fb0cbb36ec1b025df
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/AnnotationModifyOnEnum.java
@@ -0,0 +1,36 @@
+package com.tianhua.codemaker.enums.dynamic;
+
+/**
+ * Description:动态注解需要修饰的类型
+ * date: 2021/10/16
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public enum AnnotationModifyOnEnum {
+ THIS("this", "当前类"),
+ CHILD("child", "子类"),
+ ;
+ private String code;
+ private String desc;
+
+
+ AnnotationModifyOnEnum(String code, String desc) {
+ this.code = code;
+ this.desc = desc;
+ }
+
+
+ public String getCode() {
+ return code;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+
+
+
+}
\ No newline at end of file
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/DecorateTypeEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/DecorateTypeEnum.java
similarity index 92%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/DecorateTypeEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/DecorateTypeEnum.java
index 0b13ed47ed4814691193ae96454f46194232395a..563dca82edba50c320c2255aec1b77fb6d1a319e 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/DecorateTypeEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/DecorateTypeEnum.java
@@ -1,10 +1,10 @@
-package com.coderman.codemaker.enums.dynamic;
+package com.tianhua.codemaker.enums.dynamic;
/**
* Description:
* date: 2021/11/24
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/InvokeLayerTypeEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/InvokeLayerTypeEnum.java
similarity index 95%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/InvokeLayerTypeEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/InvokeLayerTypeEnum.java
index 63cdd453a6fee7e3bcbf4e99c4a1e39b0d59466c..62bae6b5e5bd4063d940144a62c14b6dcd1a90be 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/InvokeLayerTypeEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/InvokeLayerTypeEnum.java
@@ -1,7 +1,7 @@
-package com.coderman.codemaker.enums.dynamic;
+package com.tianhua.codemaker.enums.dynamic;
-import com.coderman.codemaker.enums.DomainElementEnum;
-import com.coderman.codemaker.enums.TemplateFileEnum;
+import com.tianhua.codemaker.enums.DomainElementEnum;
+import com.tianhua.codemaker.enums.TemplateFileEnum;
import com.google.common.collect.Sets;
import java.util.Set;
@@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicReference;
* Description: 调用层有哪些调用入口枚举
* date: 2021/10/16
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/InvokeSceneTypeEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/InvokeSceneTypeEnum.java
similarity index 98%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/InvokeSceneTypeEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/InvokeSceneTypeEnum.java
index 579a1f8bde6b6998bb671ea91255e2a7854b3271..90bca05a4502083068338dfcb90eb7dd9386f9ef 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/InvokeSceneTypeEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/InvokeSceneTypeEnum.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.enums.dynamic;
+package com.tianhua.codemaker.enums.dynamic;
import org.apache.commons.lang3.StringUtils;
@@ -6,7 +6,7 @@ import org.apache.commons.lang3.StringUtils;
* Description:调用场景枚举
* date: 2021/10/16
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/ReadWriteTypeEnum.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/ReadWriteTypeEnum.java
similarity index 98%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/ReadWriteTypeEnum.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/ReadWriteTypeEnum.java
index 68eb26251cd8b398f46a0411f8c375eed918a7b2..99cd92d8f5dc98617dc8b1ae2c2c7dc341e99119 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/enums/dynamic/ReadWriteTypeEnum.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/enums/dynamic/ReadWriteTypeEnum.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.enums.dynamic;
+package com.tianhua.codemaker.enums.dynamic;
import com.google.common.collect.Sets;
import org.apache.commons.lang3.StringUtils;
@@ -10,7 +10,7 @@ import java.util.concurrent.atomic.AtomicReference;
* Description:读写类型枚举
* date: 2021/10/16
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/service/ImportPackageService.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/service/ImportPackageService.java
new file mode 100644
index 0000000000000000000000000000000000000000..55cc3349c69883e91eae27a0e3b5968158b6daa2
--- /dev/null
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/service/ImportPackageService.java
@@ -0,0 +1,58 @@
+package com.tianhua.codemaker.service;
+
+import com.tianhua.codemaker.bean.plantuml.AbstractClassBean;
+import com.tianhua.codemaker.bean.plantuml.PlantUmlContextBean;
+
+/**
+ * Description:
+ * date: 2022/1/26
+ *
+ * @author shenshuai
+ * @version 1.0.0
+ * @since JDK 1.8
+ */
+public interface ImportPackageService {
+
+ /**
+ * 处理需要导入的包
+ *
+ * @param abstractClassBean
+ * @param plantUmlContextBean
+ */
+ void dealImportClass(AbstractClassBean abstractClassBean, PlantUmlContextBean plantUmlContextBean);
+
+
+ /**
+ * 设置包名
+ *
+ * @param abstractClassBean
+ * @param defaultChildPackage 当plantUML中没有包名则使用配置的全局包名+子包名
+ */
+ void setPackageName(AbstractClassBean abstractClassBean, String defaultChildPackage);
+
+
+ /**
+ * 在动态调用中处理引用包
+ *
+ * @param invokerClassBean
+ * @param plantUmlContextBean
+ * @param importClassName
+ */
+ void dealImportPackage(AbstractClassBean invokerClassBean, PlantUmlContextBean plantUmlContextBean, String importClassName);
+
+
+ String getMatchPackageDefault(String targetClass);
+
+
+ /**
+ * 设置包名
+ * @param abstractClassBean
+ * @param moduleTag 当前类元素所在模块
+ * 返回的包路径简化为
+ * 全局包路径+模块标示+plantUMLPackage
+ */
+ public void setPackageNameWithModule(AbstractClassBean abstractClassBean, String moduleTag);
+
+
+}
+
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/utils/StringHandleUtils.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/utils/StringHandleUtils.java
similarity index 98%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/utils/StringHandleUtils.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/utils/StringHandleUtils.java
index 2847a642f6a6e7dd8fe42681f8f61e0cb8a4ef1f..c183ca22ee0856263d1635e9c17a59cb22ecd520 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/utils/StringHandleUtils.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/utils/StringHandleUtils.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.utils;
+package com.tianhua.codemaker.utils;
import com.google.common.collect.Sets;
import org.apache.commons.lang3.StringUtils;
@@ -12,7 +12,7 @@ import java.util.regex.Pattern;
* Description:
* date: 2021/10/12
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/utils/StringHelperUtils.java b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/utils/StringHelperUtils.java
similarity index 97%
rename from codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/utils/StringHelperUtils.java
rename to codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/utils/StringHelperUtils.java
index 809a64a4f88a1d72f37d2ae10dbfa6ef3cf5c2eb..6b77cbd9f07612b5191e723aaaecdd6f5503384c 100644
--- a/codemaker-parent/codemaker-api/src/main/java/com/coderman/codemaker/utils/StringHelperUtils.java
+++ b/codemaker-parent/codemaker-api/src/main/java/com/tianhua/codemaker/utils/StringHelperUtils.java
@@ -1,4 +1,4 @@
-package com.coderman.codemaker.utils;
+package com.tianhua.codemaker.utils;
import java.util.regex.Pattern;
@@ -6,7 +6,7 @@ import java.util.regex.Pattern;
* Description:
* date: 2021/10/21
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
diff --git a/codemaker-parent/codemaker-apiImpl/pom.xml b/codemaker-parent/codemaker-apiImpl/pom.xml
index 542e84495fd31a7af6e74bde4da1c993d278e079..5dc1668cf64bafce0afe21134a765debef4017d7 100644
--- a/codemaker-parent/codemaker-apiImpl/pom.xml
+++ b/codemaker-parent/codemaker-apiImpl/pom.xml
@@ -6,11 +6,11 @@
com.coderman.codemaker
codemaker-parent
- 1.2.2-SNAPSHOT
+ 1.3.0-SNAPSHOT
com.coderman.codemaker
codemaker-apiImpl
- 1.0-SNAPSHOT
+ 1.1-SNAPSHOT
jar
@@ -29,7 +29,7 @@
com.coderman.codemaker
codemaker-api
- 1.0-SNAPSHOT
+ 1.1-SNAPSHOT
@@ -59,20 +59,22 @@
org.projectlombok
lombok
- 1.18.12
-
- com.coderman.utils
- coderman-utils
- 1.0.4-SNAPSHOT
-
-
-
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 8
+
+
+
diff --git a/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/component/package-info.java b/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/component/package-info.java
deleted file mode 100644
index f4f11691452197e99efde04019b9ee0bbecfb73d..0000000000000000000000000000000000000000
--- a/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/component/package-info.java
+++ /dev/null
@@ -1 +0,0 @@
-package com.coderman.codemaker.component;
\ No newline at end of file
diff --git a/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/classloader/CompClassFactory.java b/codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/classloader/CompClassFactory.java
similarity index 68%
rename from codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/classloader/CompClassFactory.java
rename to codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/classloader/CompClassFactory.java
index 8368a146baa40c2dc75f95e589172dffdc124447..020f3721468ee71698a0fc00f7396a61a0a0b5d9 100644
--- a/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/classloader/CompClassFactory.java
+++ b/codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/classloader/CompClassFactory.java
@@ -1,6 +1,9 @@
-package com.coderman.codemaker.classloader;
+package com.tianhua.codemaker.classloader;
-import com.coderman.codemaker.bean.plantuml.*;
+import com.tianhua.codemaker.bean.component.ComponentConfigBean;
+import com.tianhua.codemaker.bean.plantuml.*;
+import com.tianhua.codemaker.enums.VisibilityEnum;
+import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
@@ -14,27 +17,26 @@ import java.util.regex.Pattern;
* Description:
* date: 2021/11/23
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@Service
public class CompClassFactory {
-
/**
* 批量转换
* @param classList
- * @param compName
+ * @param componentConfigBean
* @return
*/
- public List convert2ClassBean(List> classList,String compName){
+ public List convert2ClassBean(List> classList, ComponentConfigBean componentConfigBean){
if(CollectionUtils.isEmpty(classList)){
return new ArrayList<>();
}
List list = new ArrayList<>();
for (Class> clazz : classList){
- list.add(buildClassBean(clazz,compName));
+ list.add(buildClassBean(clazz, componentConfigBean));
}
return list;
}
@@ -57,17 +59,29 @@ public class CompClassFactory {
}
/**
- * 通过类加载将类的信息转换到代码模型上
+ *
+ * 通过类加载+动态配置将类的信息转换到代码模型上
* @param clazz
+ * @param componentConfigBean
* @return
*/
- private ClassBean buildClassBean(Class clazz,String compName){
+ private ClassBean buildClassBean(Class clazz, ComponentConfigBean componentConfigBean){
ClassBean classBean = new ClassBean();
classBean.setPackageName(clazz.getCanonicalName());
classBean.setClassName(clazz.getSimpleName());
- classBean.setCompName(compName);
- classBean.setFieldBeanList(buildFieldBeanList(clazz.getDeclaredFields()));
- classBean.setMethodBeanList(buildMethodBeanList(clazz.getDeclaredMethods()));
+ classBean.setCompName(componentConfigBean.getServiceName());
+
+ if(componentConfigBean.getFieldMap().isEmpty()){
+ classBean.setFieldBeanList(buildFieldBeanList(clazz.getDeclaredFields()));
+ }else {
+ classBean.setFieldBeanList(buildFieldBeanList(componentConfigBean.getFieldMap().get(clazz.getSimpleName())));
+ }
+
+ if(componentConfigBean.getMethodMap().isEmpty()){
+ classBean.setMethodBeanList(buildMethodBeanList(clazz.getDeclaredMethods()));
+ }else {
+ classBean.setMethodBeanList(buildMethodBeanList(componentConfigBean.getMethodMap().get(clazz.getSimpleName())));
+ }
return classBean;
}
@@ -291,4 +305,79 @@ public class CompClassFactory {
return paramList;
}
+
+ /**
+ * 构建方法列表
+ * @param methodStrList
+ * @return
+ */
+ private List buildMethodBeanList(List methodStrList){
+ if(CollectionUtils.isEmpty(methodStrList)){
+ return Lists.newArrayList();
+ }
+ List methodBeanList = new ArrayList<>();
+ for (String method : methodStrList){
+ MethodBean methodBean = new MethodBean();
+ if(method.contains("void")){
+ methodBean.setReturnClass("void");
+
+ }else {
+ String returnClass = method.replace("private","")
+ .replace("public","")
+ .replace("protected","")
+ .replace("final","")
+ .replace("volatile","")
+ .replace("static","").trim().split(" ")[0];
+ methodBean.setReturnClass(returnClass);
+ }
+ methodBean.setStatic(method.contains("static"));
+ String [] methodArr = method.split(" ");
+ for (String str : methodArr){
+ if(str.contains("(")){
+ String methodName = str.split("\\(")[0];
+ methodBean.setMethodName(methodName+method.substring(method.indexOf("(")));
+ methodBean.buildParamArr();
+ }
+ }
+ methodBeanList.add(methodBean);
+ }
+ return methodBeanList;
+ }
+
+
+ /**
+ * 构建属性列表
+ * @param fieldStrList
+ * @return
+ */
+ private List buildFieldBeanList(List fieldStrList){
+ if(CollectionUtils.isEmpty(fieldStrList)){
+ return Lists.newArrayList();
+ }
+ List fieldBeanList = new ArrayList<>();
+ for (String fieldStr : fieldStrList){
+ FieldBean fieldBean = new FieldBean();
+ if(fieldStr.trim().contains(VisibilityEnum.PRIVATE.getVisibility())){
+ fieldBean.setVisibility(VisibilityEnum.PRIVATE.getVisibility());
+ }
+ if(fieldStr.trim().contains(VisibilityEnum.PUBLIC.getVisibility())){
+ fieldBean.setVisibility(VisibilityEnum.PUBLIC.getVisibility());
+ }
+ if(fieldStr.trim().contains(VisibilityEnum.PROTECT.getVisibility())){
+ fieldBean.setVisibility(VisibilityEnum.PROTECT.getVisibility());
+ }
+ String [] fieldArr = fieldStr.trim().split(" ");
+ fieldBean.setFieldSimpleName(fieldArr[fieldArr.length - 1]);
+
+ for (int i = fieldArr.length - 2;i > 0;i --){
+ if(StringUtils.isEmpty(fieldArr[i].trim())){
+ continue;
+ }
+ fieldBean.setFieldType(fieldArr[i]);
+ fieldBean.setFieldName(fieldArr[i] + " " + fieldBean.getFieldSimpleName());
+ break;
+ }
+ }
+ return fieldBeanList;
+ }
}
diff --git a/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/classloader/CompClassLoadService.java b/codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/classloader/CompClassLoadService.java
similarity index 89%
rename from codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/classloader/CompClassLoadService.java
rename to codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/classloader/CompClassLoadService.java
index 0bac3fb722a843bf96f595409ad2ab2a1fdbdd8c..d7fd1f710ac133b416fee2d10a2b46c5fab7e82e 100644
--- a/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/classloader/CompClassLoadService.java
+++ b/codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/classloader/CompClassLoadService.java
@@ -1,13 +1,10 @@
-package com.coderman.codemaker.classloader;
-
-import com.coderman.codemaker.bean.component.ComponentConfigBean;
-import com.coderman.codemaker.bean.component.ComponentContextBean;
-import com.coderman.codemaker.bean.plantuml.AnnotationBean;
-import com.coderman.codemaker.bean.plantuml.ClassBean;
-import com.coderman.codemaker.bean.plantuml.EnumBean;
-import com.coderman.codemaker.bean.plantuml.InterfaceBean;
-import com.coderman.utils.clazz.ClassUtils;
-import org.apache.commons.lang3.ClassLoaderUtils;
+package com.tianhua.codemaker.classloader;
+
+import com.tianhua.codemaker.bean.component.ComponentConfigBean;
+import com.tianhua.codemaker.bean.component.ComponentContextBean;
+import com.tianhua.codemaker.bean.plantuml.AnnotationBean;
+import com.tianhua.codemaker.bean.plantuml.ClassBean;
+import com.tianhua.codemaker.bean.plantuml.InterfaceBean;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -26,7 +23,7 @@ import java.util.jar.JarFile;
* Description:
* date: 2021/11/22
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -55,7 +52,7 @@ public class CompClassLoadService {
ComponentContextBean componentContextBean = new ComponentContextBean();
CompClassLoader classLoader = buildClassLoader(componentConfigBean);
List> classList = classLoader.loadClassList(componentConfigBean.getClassList());
- List classBeanList = compClassFactory.convert2ClassBean(classList, componentConfigBean.getServiceName());
+ List classBeanList = compClassFactory.convert2ClassBean(classList, componentConfigBean);
componentContextBean.setClassBeanList(classBeanList);
@@ -71,11 +68,10 @@ public class CompClassLoadService {
try {
return loadComp(componentConfigBean);
} catch (IOException e) {
- e.printStackTrace();
+ return componentContextBean;
} catch (ClassNotFoundException e) {
- e.printStackTrace();
+ return componentContextBean;
}
-
}
return componentContextBean;
}
@@ -163,7 +159,7 @@ public class CompClassLoadService {
}
else if(clazz.isInterface()){
interfaceClassList.add(clazz);
- }else if(clazz.isArray() || clazz.isMemberClass()){
+ }else if(clazz.isArray()){
classList.add(clazz);
}else if(clazz.isEnum()){
enumClassList.add(clazz);
@@ -174,7 +170,7 @@ public class CompClassLoadService {
}
}
}
- List classBeanList = compClassFactory.convert2ClassBean(classList,componentConfigBean.getServiceName());
+ List classBeanList = compClassFactory.convert2ClassBean(classList,componentConfigBean);
List interfaceBeanList = compClassFactory.convert2InterfaceBean(interfaceClassList,componentConfigBean.getServiceName());
List annotationBeanList = compClassFactory.convert2AnnotationBeanClass(annotationClassList);
//todo 枚举
diff --git a/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/classloader/CompClassLoader.java b/codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/classloader/CompClassLoader.java
similarity index 95%
rename from codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/classloader/CompClassLoader.java
rename to codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/classloader/CompClassLoader.java
index 674a39abc4c04f46865e716d6288259eea78d968..86b8013dbc5737f24d6d0355d4ad8a00238c8287 100644
--- a/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/classloader/CompClassLoader.java
+++ b/codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/classloader/CompClassLoader.java
@@ -1,7 +1,6 @@
-package com.coderman.codemaker.classloader;
+package com.tianhua.codemaker.classloader;
import com.alibaba.fastjson.JSON;
-import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import java.io.IOException;
@@ -17,7 +16,7 @@ import java.util.List;
* Description:
* date: 2021/11/22
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@@ -71,6 +70,9 @@ public class CompClassLoader extends URLClassLoader {
List> list = new ArrayList<>();
for (String classNamePath : classList){
Class clazz = loadTargetClass(classNamePath);
+ if(clazz == null){
+ continue;
+ }
list.add(clazz);
}
return list;
diff --git a/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/component/CompPropReadService.java b/codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/component/CompPropReadService.java
similarity index 50%
rename from codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/component/CompPropReadService.java
rename to codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/component/CompPropReadService.java
index 11a9fba4b5fc20142b45eff8d14e4d1a7990d04a..f62c7ca522fbdfa551bbdf7d2dd1ac5a11ccb5f9 100644
--- a/codemaker-parent/codemaker-apiImpl/src/main/java/com/coderman/codemaker/component/CompPropReadService.java
+++ b/codemaker-parent/codemaker-apiImpl/src/main/java/com/tianhua/codemaker/component/CompPropReadService.java
@@ -1,8 +1,12 @@
-package com.coderman.codemaker.component;
+package com.tianhua.codemaker.component;
-import com.coderman.codemaker.bean.GlobalConstant;
-import com.coderman.codemaker.bean.component.ComponentConfigBean;
-import lombok.extern.slf4j.Slf4j;
+import com.google.common.collect.Lists;
+import com.tianhua.codemaker.bean.GlobalConstant;
+import com.tianhua.codemaker.bean.component.ComponentConfigBean;
+import com.tianhua.codemaker.enums.ConfigFileEnum;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
@@ -15,13 +19,13 @@ import java.util.*;
* Description:
* date: 2021/11/23
*
- * @author fanchunshuai
+ * @author shenshuai
* @version 1.0.0
* @since JDK 1.8
*/
@Service
-//@Slf4j
public class CompPropReadService {
+
/**
* 从配置文件中构建组件bean
* @return
@@ -30,12 +34,12 @@ public class CompPropReadService {
try {
Properties properties = readPropertiesFile(componentPath);
if(properties == null){
+ //System.out.println("加载组件配置失败,componentPath = "+componentPath);
System.out.println("加载组件配置失败,componentPath = "+componentPath);
return null;
}
ComponentConfigBean componentBean = new ComponentConfigBean();
-
Object packageValue = properties.getProperty(GlobalConstant.COMP_PACKAGE);
if(packageValue == null){
componentBean.setPackageName("");
@@ -59,6 +63,12 @@ public class CompPropReadService {
if(entry.getKey().toString().equals(GlobalConstant.COMP_TYPE)){
componentBean.setCompType(entry.getValue().toString());
}
+ if(entry.getKey().toString().equals(GlobalConstant.COMP_GAV_TYPE)){
+ componentBean.setType(entry.getValue().toString());
+ }
+ if(entry.getKey().toString().equals(GlobalConstant.COMP_GAV_SCOPE)){
+ componentBean.setScope(entry.getValue().toString());
+ }
if(entry.getKey().toString().equals(GlobalConstant.COMP_SITE)){
componentBean.setCompSite(entry.getValue().toString());
}
@@ -68,7 +78,9 @@ public class CompPropReadService {
if(entry.getKey().toString().equals(GlobalConstant.COMP_SINGLE_CLASS_TYPE)){
componentBean.setClassType(entry.getValue().toString());
}
-
+ if(entry.getKey().toString().equals(GlobalConstant.COMP_SINGLE_CLASS_TYPE)){
+ componentBean.setClassType(entry.getValue().toString());
+ }
if(entry.getKey().toString().startsWith(GlobalConstant.COMP_CLASS_PRE)){
componentBean.addClass(entry.getValue().toString());
}
@@ -82,8 +94,37 @@ public class CompPropReadService {
componentBean.addEnum(entry.getValue().toString());
}
- if(entry.getKey().toString().startsWith(GlobalConstant.COMP_CLASS_METHOD_PRE)){
- componentBean.addMethod(entry.getValue().toString());
+ if(entry.getKey().toString().startsWith(GlobalConstant.COMP_CONFIG_NAME)){
+ componentBean.setConfigName(entry.getValue().toString());
+ }
+
+ if(entry.getKey().toString().startsWith(GlobalConstant.COMP_EXCLUSION_GA_LIST)){
+ componentBean.setExclusionGAList(entry.getValue().toString());
+ }
+
+ if(entry.getKey().toString().contains(".")){
+ String [] classKeyArr = entry.getKey().toString().split("\\.");
+ if(classKeyArr[1].startsWith(GlobalConstant.COMP_CLASS_METHOD_PRE)){
+ componentBean.addMethod(classKeyArr[0], entry.getValue().toString());
+ }
+ if(classKeyArr[1].startsWith(GlobalConstant.COMP_FIELD_PRE)){
+ componentBean.addField(classKeyArr[0], entry.getValue().toString());
+ }
+ }
+ }
+
+ //如果组件需要有配置内容配置到目标工程的配置文件中
+ if(StringUtils.isNotEmpty(componentBean.getConfigName())){
+ int index = componentPath.lastIndexOf("/")+1;
+ String configPath = componentPath.substring(0,index)+"config.properties";
+ List configList = getConfigList(configPath);
+ if(CollectionUtils.isEmpty(configList)){
+ //todo yml配置支持
+ configPath = componentPath.substring(0,index)+"config.yml";
+ configList = getConfigList(configPath);
+ componentBean.setConfigList(configList);
+ }else {
+ componentBean.setConfigList(configList);
}
}
return componentBean;
@@ -93,6 +134,36 @@ public class CompPropReadService {
return null;
}
+ /**
+ * 读取组件的自身配置
+ * @param filePath
+ * @return
+ */
+ private List getConfigList(String filePath){
+ List list = new ArrayList<>();
+ try {
+
+ if(filePath.endsWith(ConfigFileEnum.PROPERTIES.getFileExtName())){
+ Properties configProperties = readPropertiesFile(filePath);
+ if(configProperties == null){
+ System.out.println("not find component filePath = "+filePath);
+ return list;
+ }
+ for (Map.Entry