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
d64d9923
Commit
d64d9923
authored
Jun 10, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
常规BUG的修改
parent
e3c61cf8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
DaoConst.java
yzg-util-db/src/main/java/com/yanzuoguang/dao/DaoConst.java
+4
-0
BaseDaoSql.java
...db/src/main/java/com/yanzuoguang/dao/impl/BaseDaoSql.java
+1
-3
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/DaoConst.java
View file @
d64d9923
...
...
@@ -122,4 +122,8 @@ public class DaoConst {
* 集合初始化大小
*/
public
static
final
int
COLLECTION_INIT_SIZE
=
15
;
/**
* 查询条件默认代码片段
*/
public
static
final
String
[]
LAST
=
new
String
[]{
"{WHERE}"
,
"{GROUP}"
,
"{HAVING}"
,
"{ORDER}"
,
"{LIMIT}"
};
}
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/BaseDaoSql.java
View file @
d64d9923
...
...
@@ -412,12 +412,10 @@ public abstract class BaseDaoSql {
* @return SQL条件
*/
protected
String
getQueryPara
(
List
<
Object
>
paras
,
SqlData
sqlData
,
Object
model
)
{
// 定义可替换片段
String
[]
lastCode
=
new
String
[]{
"{WHERE}"
,
"{GROUP}"
,
"{HAVING}"
,
"{ORDER}"
,
"{LIMIT}"
};
// 将SQL语句进行代码片段追加
StringBuilder
sb
=
new
StringBuilder
(
sqlData
.
getSql
());
for
(
String
code
:
lastCode
)
{
for
(
String
code
:
DaoConst
.
LAST
)
{
if
(
sb
.
indexOf
(
code
)
==
-
1
)
{
sb
.
append
(
code
);
}
...
...
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