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
5790b880
Commit
5790b880
authored
Jun 18, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
常规BUG的修改
parent
7d537779
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
DaoConst.java
yzg-util-db/src/main/java/com/yanzuoguang/dao/DaoConst.java
+1
-1
TableStruct.java
...b/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
+3
-5
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/DaoConst.java
View file @
5790b880
...
...
@@ -113,7 +113,7 @@ public class DaoConst {
/**
* 更新字段模板参数
*/
public
static
final
String
CODE_UPDATE_FIELD_PARA
=
"a.%s=?"
;
public
static
final
String
CODE_UPDATE_FIELD_PARA
=
"
,
a.%s=?"
;
/**
* 更新字段模板参数
*/
...
...
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
View file @
5790b880
...
...
@@ -378,9 +378,7 @@ public class TableStruct {
// 主键字段操作
sql
.
addCode
(
DaoConst
.
FIELD_CODE
,
String
.
format
(
DaoConst
.
CODE_UPDATE_PRIMARY
,
this
.
getKey
().
name
,
this
.
getKey
().
name
));
sql
.
addParaConst
(
this
.
getKey
().
inputName
,
DaoConst
.
FIELD_CODE
,
String
.
format
(
DaoConst
.
CODE_UPDATE_FIELD_PARA
,
this
.
getKey
().
name
)
);
sql
.
addConst
(
this
.
getKey
().
inputName
,
String
.
format
(
DaoConst
.
CODE_WHERE_EQUALS_PARA
,
this
.
getKey
().
name
));
// 增加普通代码片段字段
for
(
TableFieldVo
field
:
getFieldActionList
(
DaoConst
.
FIELD_COMMON
,
...
...
@@ -594,13 +592,13 @@ public class TableStruct {
String
text
=
DaoConst
.
LOAD_MODEL
.
replace
(
DaoConst
.
TABLE_CODE
,
this
.
name
);
SqlData
sql
=
new
SqlData
(
sqlName
,
text
);
sql
.
setSqlType
(
DaoConst
.
SQL_TYPE_EXINTS
);
sql
.
add
Para
(
this
.
getKey
().
inputName
,
sql
.
add
Const
(
this
.
getKey
().
inputName
,
String
.
format
(
DaoConst
.
CODE_WHERE_NOT_EQUALS_PARA
,
this
.
getKey
().
name
)
);
for
(
String
fieldName
:
fields
)
{
TableFieldVo
field
=
this
.
getField
(
fieldName
);
sql
.
add
Para
Const
(
field
.
inputName
,
sql
.
addConst
(
field
.
inputName
,
String
.
format
(
DaoConst
.
CODE_WHERE_EQUALS_PARA
,
field
.
name
)
);
}
...
...
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