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
8ddd11c1
Commit
8ddd11c1
authored
Jun 18, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
常规BUG的修改
parent
7758a4eb
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
183 additions
and
67 deletions
+183
-67
DaoConst.java
yzg-util-db/src/main/java/com/yanzuoguang/dao/DaoConst.java
+56
-0
TableStruct.java
...b/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
+127
-67
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/DaoConst.java
View file @
8ddd11c1
...
...
@@ -102,6 +102,62 @@ public class DaoConst {
* 加载SQL语句模板
*/
public
static
final
String
LOAD_MODEL
=
"SELECT a.*{FIELD} FROM {TABLE} AS a {INNER} WHERE 1=1 {WHERE}"
;
/**
* 更新字段模板
*/
public
static
final
String
CODE_UPDATE_FIELD
=
"a.%s=%s"
;
/**
* 更新字段模板主键
*/
public
static
final
String
CODE_UPDATE_PRIMARY
=
"a.%s=a.%s"
;
/**
* 更新字段模板参数
*/
public
static
final
String
CODE_UPDATE_FIELD_PARA
=
"a.%s=?"
;
/**
* 更新字段模板参数
*/
public
static
final
String
CODE_UPDATE_FIELD_REMOVE
=
"a.%s=1"
;
/**
* 等于条件
*/
public
static
final
String
CODE_WHERE_EQUALS
=
"AND %s%s=%s"
;
/**
* 等于条件参数
*/
public
static
final
String
CODE_WHERE_EQUALS_PARA
=
"AND a.%s=?"
;
/**
* 未删除条件
*/
public
static
final
String
CODE_WHERE_EQUALS_NOT_REMOVE
=
"AND a.%s=0"
;
/**
* 版本好字段
*/
public
static
final
String
CODE_UPDATE_VERSION_FIELD
=
",a.%s=1+a.%s"
;
/**
* 不等于条件
*/
public
static
final
String
CODE_WHERE_NOT_EQUALS
=
"AND %s%s<>%s"
;
/**
* 不等于条件
*/
public
static
final
String
CODE_WHERE_NOT_EQUALS_PARA
=
"AND a.%s<>?"
;
/**
* 默认表标记
*/
public
static
final
String
CODE_TAG
=
"a."
;
/**
* 参数标记
*/
public
static
final
String
CODE_PARA
=
"?"
;
/**
* 增加修改语句的分割符号
*/
public
static
final
String
CODE_SPLIT
=
","
;
/**
* 统计语句增加字段模板
*/
public
static
final
String
CODE_GROUP_ADD
=
"{FIELD}={FIELD}+?"
;
/**
* 版本号字段名称
*/
...
...
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
View file @
8ddd11c1
This diff is collapsed.
Click to expand it.
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