Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Diboot
Commits
8464639a
Unverified
Commit
8464639a
authored
5 years ago
by
Mazc
Committed by
GitHub
5 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #19 from dibo-software/develop
更新README
parents
cd9fa8ff
f74e06bd
develop
dev-feature
master
2.2.0
2.1.2
2.1.1
2.0.5
2.0.4
2.0.3
2.0.3-RC2
2.0.3-RC1
v2.7.1
v2.7.0
v2.6.0
v2.5.0
v2.4.0
v2.3.1
v2.3.0
v2.2.1
v2.0.2
v2.0.1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
diboot-core/README.md
+7
-7
diboot-core/README.md
with
7 additions
and
7 deletions
+7
-7
diboot-core/README.md
+
7
-
7
View file @
8464639a
...
...
@@ -7,10 +7,10 @@
> 依赖Mybatis-Plus实现(Mybatis-Plus具备通用Mapper方案和灵活的查询构造器)
## ** 二. 多表关联查询无SQL(适用于大多数场景,拆分成单表查询自动实现结果绑定)
> 通过注解实现多数场景下的关联查询无SQL
### 1. 注解自动绑定数据字典(枚举
值
)的显示值Label
### 1. 注解自动绑定数据字典(
自定义
枚举)的显示值Label
~~~
java
@BindDict
(
type
=
"
GENDER
"
,
field
=
"
gender
"
)
private
String
gender
Label
;
@BindDict
(
type
=
"
USER_STATUS
"
,
field
=
"
status
"
)
private
String
status
Label
;
~~~
### 2. 注解自动绑定其他表的字段
~~~
java
...
...
@@ -44,7 +44,7 @@ private List<Role> roleList;
~~~
## ** 三. 使用方式
### 引入依赖
###
1.
引入依赖
Gradle:
~~~
gradle
compile
(
"com.diboot:diboot-core:2.0.1"
)
...
...
@@ -57,9 +57,9 @@ compile("com.diboot:diboot-core:2.0.1")
<version>
2.0.1
</version>
</dependency>
~~~
### 定义你的Service(继承diboot的BaseService或Mybatis-plus的ISerivice)及Mapper
###
2.
定义你的Service(继承diboot的BaseService或Mybatis-plus的ISerivice)及Mapper
### 使用注解绑定:
###
3.
使用注解绑定:
调用RelationsBinder自动绑定注解相关关联:
#### 方式1. 自动绑定关联(不需要转型)
~~~
java
...
...
@@ -73,4 +73,4 @@ RelationsBinder.bind(voList);
List
<
MyUserVO
>
voList
=
RelationsBinder
.
convertAndBind
(
userList
,
MyUserVO
.
class
);
~~~
##
使用
样例
请
参考 - [diboot-core-example](https://github.com/dibo-software/diboot-v2-example/tree/master/diboot-core-example)
##
四.
样例参考 - [diboot-core-example](https://github.com/dibo-software/diboot-v2-example/tree/master/diboot-core-example)
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help