优化注释
This commit is contained in:
parent
41e8290104
commit
4b11fa5ba1
|
@ -27,7 +27,7 @@ diboot 2.0版本,实现: diboot-core全新内核 + diboot-devtools代码生成
|
|||
|
||||
|
||||
|
||||
## 二、 diboot-devtools 代码生成工具 [(我要试试)](https://www.diboot.com/guide/diboot-devtools/%E4%BB%8B%E7%BB%8D.html)
|
||||
## 二、 diboot-devtools 自动化开发助理 [(我要试试)](https://www.diboot.com/guide/diboot-devtools/%E4%BB%8B%E7%BB%8D.html)
|
||||
|
||||
##### 1. 支持多数据库(MySQL、MariaDB、ORACLE、SQLServer、PostgreSQL)
|
||||
##### 2. 使用很简单(引入依赖jar,配置参数后,即可随SpringBoot启动运行)
|
||||
|
|
|
@ -62,7 +62,7 @@ public abstract class BaseEntity implements Serializable {
|
|||
}
|
||||
|
||||
/***
|
||||
* model对象转为map
|
||||
* Entity对象转为map
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> toMap(){
|
||||
|
@ -71,7 +71,7 @@ public abstract class BaseEntity implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* model对象转为String
|
||||
* Entity对象转为String
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Model的List包装类,用于接收List并绑定校验的情况
|
||||
* Entity的List包装类,用于接收List并绑定校验的情况
|
||||
* @author Mazhicheng
|
||||
* @version 2.0
|
||||
* @date 2018/11/8
|
||||
|
@ -23,7 +23,7 @@ public class EntityList<T extends BaseEntity> {
|
|||
this.entityList = entityList;
|
||||
}
|
||||
|
||||
public List<T> getModelList(){
|
||||
public List<T> getEntityList(){
|
||||
return entityList;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public class BaseServiceImpl<M extends BaseCrudMapper<T>, T> extends ServiceImpl
|
|||
@Override
|
||||
public boolean createEntity(T entity) {
|
||||
if(entity == null){
|
||||
warning("createModel", "参数entity为null");
|
||||
warning("createEntity", "参数entity为null");
|
||||
return false;
|
||||
}
|
||||
return super.save(entity);
|
||||
|
|
|
@ -58,7 +58,7 @@ public enum Status {
|
|||
FAIL_EXCEPTION(5000, "系统异常"),
|
||||
|
||||
/***
|
||||
* 系统异常
|
||||
* 缓存清空
|
||||
*/
|
||||
MEMORY_EMPTY_LOST(9999, "缓存清空");
|
||||
|
||||
|
|
|
@ -91,17 +91,17 @@ Map map = BeanUtils.convertToStringKeyObjectListMap(allLists, fields);
|
|||
|
||||
* buildTree 方法
|
||||
```java
|
||||
//该方法用来构建上下级关联的实体关系树形结构,顶层父级实体的parentId必须是为null或0,入参为对象集合(allModels)
|
||||
//该方法用来构建支持无限层级的树形结构,默认顶层父级节点的parentId=0,入参为对象集合(allNodes)
|
||||
//方法定义
|
||||
public static <T extends BaseEntity> List<T> buildTree(List<T> allModels){...}
|
||||
public static <T> List<T> buildTree(List<T> allNodes){...}
|
||||
//方法调用示例
|
||||
List list = BeanUtils.buildTree(allModels);
|
||||
List<Menu> menuTree = BeanUtils.buildTree(allNodes);
|
||||
|
||||
//该方法用来构建上下级关联的实体关系树形结构,去除顶层父级实体的parentId必须是为null或0的限制,入参为对象集合(allModels)
|
||||
//该方法用来构建支持无限层级的树形结构,指定顶层父级节点的parentId,入参为(allNodes, rootNodeId)
|
||||
//方法定义
|
||||
public static <T extends BaseEntity> List<T> buildTree(List<T> parentModels, List<T> allModels){...}
|
||||
public static <T> List<T> buildTree(List<T> allNodes, Object rootNodeId){
|
||||
//方法调用示例
|
||||
List list = BeanUtils.buildTree(parentModels, allModels);
|
||||
List<Menu> menuTree = BeanUtils.buildTree(allNodes, 1L);
|
||||
```
|
||||
|
||||
* extractDiff 方法
|
||||
|
|
Loading…
Reference in New Issue