Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
3318939e
Commit
3318939e
authored
Oct 11, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口文档的支持
parent
873906aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
0 deletions
+98
-0
SqlAnnotation.java
...l-db/src/main/java/com/yanzuoguang/dao/SqlAnnotation.java
+90
-0
TableAnnotation.java
...db/src/main/java/com/yanzuoguang/dao/TableAnnotation.java
+8
-0
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/SqlAnnotation.java
0 → 100755
View file @
3318939e
package
com
.
yanzuoguang
.
dao
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* 途比达列明映射
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
({
ElementType
.
TYPE
})
public
@interface
SqlAnnotation
{
/**
* Sql语句名称,当为空时,则为当前类
*
* @return
*/
String
[]
name
()
default
{};
/**
* 关联的基本表结构实体,当关联时,会根据实体类型自动生成SQL语句.
*/
Class
[]
table
()
default
{};
/**
* Sql语句列表,当table和sql都为空时,则根据当前注解 @TableAnnotation 生成对应类型的SQL语句
*
* @return
*/
String
[]
sql
()
default
{};
/**
* 需要移除的前台输入参数
*
* @return
*/
String
[]
remove
()
default
{};
/**
* 字段代码片段,关联到 {FIELD}
*
* @return
*/
String
[]
field
()
default
{};
/**
* inner代码片段,关联到 {INNER}
*
* @return
*/
String
[]
inner
()
default
{};
/**
* 条件代码片段,关联到 {INNER}
*
* @return
*/
String
[]
where
()
default
{};
/**
* 统计代码片段,关联到 {GROUP}
*
* @return
*/
String
[]
group
()
default
{};
/**
* 统计代码片段,关联到 {ORDER}
*
* @return
*/
String
[]
order
()
default
{};
/**
* 统计代码片段,关联到 {LIMIT}
*
* @return
*/
String
[]
limit
()
default
{};
/**
* 包含的代码片段
*
* @return
*/
String
[]
codes
()
default
{};
}
yzg-util-db/src/main/java/com/yanzuoguang/dao/TableAnnotation.java
View file @
3318939e
...
@@ -24,7 +24,15 @@ public @interface TableAnnotation {
...
@@ -24,7 +24,15 @@ public @interface TableAnnotation {
/**
/**
* 字段类型
* 字段类型
*
* @return
* @return
*/
*/
int
type
()
default
DaoConst
.
FIELD_NONE
;
int
type
()
default
DaoConst
.
FIELD_NONE
;
/**
* 包含的Sql语句,会根据SQL语句名称替换默认的SQL语句
*
* @return
*/
Class
[]
sql
()
default
{};
}
}
Write
Preview
Markdown
is supported
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