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
5508c826
Commit
5508c826
authored
Sep 17, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口文档的支持
parent
5a3916c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
31 deletions
+54
-31
SqlData.java
...il-db/src/main/java/com/yanzuoguang/dao/impl/SqlData.java
+54
-31
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/SqlData.java
View file @
5508c826
...
...
@@ -38,6 +38,21 @@ public class SqlData {
this
(
""
,
""
);
}
/**
* SQL语句的基本信息
*
* @param name SQL语句的名称
* @param sql 需要执行的SQL语句,其中可以包含大括号括起来的代码片段。 如: {WHERE}
* @param paras SQL语句参数名称数组
*/
public
SqlData
(
String
name
,
String
sql
,
String
...
paras
)
{
this
.
name
=
name
;
this
.
sql
=
sql
;
for
(
String
input
:
paras
)
{
this
.
add
(
input
);
}
}
/**
* Sql语句类型
* @return Sql语句类型
...
...
@@ -50,45 +65,64 @@ public class SqlData {
* Sql语句类型
* @param sqlType Sql语句类型
*/
public
void
setSqlType
(
int
sqlType
)
{
public
SqlData
setSqlType
(
int
sqlType
)
{
this
.
sqlType
=
sqlType
;
return
this
;
}
public
List
<
SqlDataField
>
getSqlDataFields
()
{
return
sqlDataFields
;
public
String
getName
()
{
return
name
;
}
public
void
setSqlDataFields
(
List
<
SqlDataField
>
sqlDataFields
)
{
this
.
sqlDataFields
=
sqlDataFields
;
/**
* 设置SQL语句名称
*
* @param name SQL语句名称
* @return
*/
public
SqlData
setName
(
String
name
)
{
this
.
name
=
name
;
return
this
;
}
public
String
getName
()
{
return
name
;
}
/**
* 获取SQL语句
* @return
*/
public
String
getSql
()
{
return
sql
;
}
public
void
setSql
(
String
sql
)
{
/**
* 设置SQL语句
* @param sql
* @return
*/
public
SqlData
setSql
(
String
sql
)
{
this
.
sql
=
sql
;
return
this
;
}
/**
* SQL语句的基本信息
*
* @param name SQL语句的名称
* @param sql 需要执行的SQL语句,其中可以包含大括号括起来的代码片段。 如: {WHERE}
* @param paras SQL语句参数名称数组
* 获取SQL语句字段
* @return
*/
public
SqlData
(
String
name
,
String
sql
,
String
...
paras
)
{
this
.
name
=
name
;
this
.
sql
=
sql
;
for
(
String
input
:
paras
)
{
this
.
add
(
input
);
}
public
List
<
SqlDataField
>
getSqlDataFields
()
{
return
sqlDataFields
;
}
/**
* 设置SQL语句字段
* @param sqlDataFields
* @return
*/
public
SqlData
setSqlDataFields
(
List
<
SqlDataField
>
sqlDataFields
)
{
this
.
sqlDataFields
=
sqlDataFields
;
return
this
;
}
/**
* 根据字段名称获取字段
*
...
...
@@ -269,15 +303,4 @@ public class SqlData {
}
return
to
;
}
/**
* 设置SQL语句名称
*
* @param name SQL语句名称
* @return
*/
public
SqlData
setName
(
String
name
)
{
this
.
name
=
name
;
return
this
;
}
}
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