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
a8418235
Commit
a8418235
authored
Nov 08, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改实例化关系
parent
77301e4e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
TableStruct.java
...b/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
+4
-4
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
View file @
a8418235
...
@@ -798,16 +798,16 @@ public class TableStruct {
...
@@ -798,16 +798,16 @@ public class TableStruct {
// 生成统计累加SQL语句
// 生成统计累加SQL语句
SqlData
sqlGroupAdd
=
this
.
releaseSql
(
DaoConst
.
SQL_TYPE_ADD_GROUP
,
DaoConst
.
GROUP_ADD
,
DaoConst
.
SQL_UPDATE
,
SqlData
sqlGroupAdd
=
this
.
releaseSql
(
DaoConst
.
SQL_TYPE_ADD_GROUP
,
DaoConst
.
GROUP_ADD
,
DaoConst
.
SQL_UPDATE
,
DaoConst
.
CODE_GROUP_ADD
,
addFields
,
prmaryKey
);
DaoConst
.
CODE_GROUP_ADD
,
addFields
,
prmaryKey
);
// 当没有字段时,直接修改主键
if
(
addFields
.
isEmpty
())
{
sqlGroupAdd
.
addCode
(
DaoConst
.
CODE_FIELD
,
String
.
format
(
"%s=%s"
,
prmaryKey
.
get
(
0
).
inputName
,
prmaryKey
.
get
(
0
).
inputName
));
}
// 生成覆盖值
// 生成覆盖值
if
(
replaceFields
!=
null
)
{
if
(
replaceFields
!=
null
)
{
for
(
TableFieldVo
field
:
replaceFields
)
{
for
(
TableFieldVo
field
:
replaceFields
)
{
sqlGroupAdd
.
addPara
(
field
.
inputName
,
DaoConst
.
CODE_FIELD
,
String
.
format
(
",a.%s=?"
,
field
.
name
));
sqlGroupAdd
.
addPara
(
field
.
inputName
,
DaoConst
.
CODE_FIELD
,
String
.
format
(
",a.%s=?"
,
field
.
name
));
}
}
}
}
// 当没有字段时,直接修改主键
if
(
addFields
.
isEmpty
())
{
sqlGroupAdd
.
addCode
(
DaoConst
.
CODE_FIELD
,
String
.
format
(
"%s=%s"
,
prmaryKey
.
get
(
0
).
inputName
,
prmaryKey
.
get
(
0
).
inputName
));
}
sqlTableData
.
add
(
sqlLoad
);
sqlTableData
.
add
(
sqlLoad
);
sqlTableData
.
add
(
sqlGroupAdd
);
sqlTableData
.
add
(
sqlGroupAdd
);
}
}
...
...
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