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
95d1ceaa
Commit
95d1ceaa
authored
Sep 02, 2020
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改MQ请求尸体,防止出错
parent
8d689676
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
SqlCondBase.java
...b/src/main/java/com/yanzuoguang/dao/cond/SqlCondBase.java
+6
-0
SqlCondDefault.java
...rc/main/java/com/yanzuoguang/dao/cond/SqlCondDefault.java
+9
-0
SqlCondEquals.java
...src/main/java/com/yanzuoguang/dao/cond/SqlCondEquals.java
+17
-0
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/cond/SqlCondBase.java
View file @
95d1ceaa
...
...
@@ -20,6 +20,8 @@ public abstract class SqlCondBase<T extends SqlCondBase> implements SqlCond<T> {
protected
List
<
String
>
fields
=
new
ArrayList
<>();
protected
Runnable
debugRunnable
=
null
;
/**
* 构造函数
*
...
...
@@ -82,6 +84,10 @@ public abstract class SqlCondBase<T extends SqlCondBase> implements SqlCond<T> {
if
(
sqlDataField
.
getCond
()
!=
this
)
{
throw
new
RuntimeException
(
"不能处理非本条件的字段"
);
}
if
(
debugRunnable
!=
null
)
{
// 用于断点调试的支持
debugRunnable
.
run
();
}
int
condType
=
getCondType
(
model
,
sqlDataField
);
switch
(
condType
)
{
case
COND_TYPE_CONST_ONLY_PARA:
{
...
...
yzg-util-db/src/main/java/com/yanzuoguang/dao/cond/SqlCondDefault.java
View file @
95d1ceaa
...
...
@@ -19,7 +19,16 @@ public class SqlCondDefault extends SqlCondBase<SqlCondDefault> {
}
public
SqlCondDefault
(
List
<
String
>
fields
)
{
this
(
null
,
fields
);
}
public
SqlCondDefault
(
Runnable
debugRunnable
,
String
...
field
)
{
this
(
debugRunnable
,
Arrays
.
asList
(
field
));
}
public
SqlCondDefault
(
Runnable
debugRunnable
,
List
<
String
>
fields
)
{
super
(
fields
);
super
.
debugRunnable
=
debugRunnable
;
}
...
...
yzg-util-db/src/main/java/com/yanzuoguang/dao/cond/SqlCondEquals.java
View file @
95d1ceaa
...
...
@@ -37,7 +37,24 @@ public class SqlCondEquals extends SqlCondBase<SqlCondEquals> {
}
public
SqlCondEquals
(
List
<
String
>
fields
,
Object
...
vals
)
{
this
(
null
,
fields
,
vals
);
}
public
SqlCondEquals
(
Runnable
debugRunnable
,
String
field
,
Object
...
vals
)
{
this
(
debugRunnable
,
Arrays
.
asList
(
field
),
vals
);
}
public
SqlCondEquals
(
Runnable
debugRunnable
,
String
[]
fields
,
Object
...
vals
)
{
this
(
debugRunnable
,
Arrays
.
asList
(
fields
),
vals
);
}
public
SqlCondEquals
(
Runnable
debugRunnable
,
TableFieldString
field
,
Object
...
vals
)
{
this
(
debugRunnable
,
field
.
getFields
(),
vals
);
}
public
SqlCondEquals
(
Runnable
debugRunnable
,
List
<
String
>
fields
,
Object
...
vals
)
{
super
(
fields
);
super
.
debugRunnable
=
debugRunnable
;
this
.
vals
=
vals
;
// 判断值是否为整形
if
(
vals
!=
null
)
{
...
...
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