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
584c7470
Commit
584c7470
authored
Jun 05, 2020
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
压缩视频
parent
ed48f327
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
TableStruct.java
...b/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
+10
-2
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
View file @
584c7470
...
...
@@ -441,6 +441,7 @@ public class TableStruct {
* @return 生成的语句
*/
private
SqlData
releaseSqlUpdate
()
{
TableFieldVo
remove
=
this
.
getRemove
();
// 生成添加的SQL语句
String
text
=
DaoConst
.
SQL_UPDATE
.
replace
(
DaoConst
.
CODE_TABLE
,
this
.
name
);
SqlData
sql
=
new
SqlData
(
DaoConst
.
UPDATE
,
text
);
...
...
@@ -458,6 +459,12 @@ public class TableStruct {
DaoConst
.
CODE_FIELD
,
String
.
format
(
DaoConst
.
CODE_UPDATE_FIELD_PARA
,
field
.
name
)
);
}
// 设置删除标记可以通过前台传入
if
(
remove
!=
null
)
{
sql
.
addCode
(
remove
.
inputName
,
DaoConst
.
CODE_FIELD
,
String
.
format
(
DaoConst
.
CODE_UPDATE_FIELD_PARA
,
remove
.
name
));
}
// 添加删除字段
// addWhereRemove(sql);
addUpdateVersion
(
sql
);
...
...
@@ -474,14 +481,15 @@ public class TableStruct {
* @return 生成的语句
*/
private
SqlData
releaseSqlRemove
()
{
if
(
this
.
getRemove
()
!=
null
)
{
TableFieldVo
remove
=
this
.
getRemove
();
if
(
remove
!=
null
)
{
// 生成添加的SQL语句
String
text
=
DaoConst
.
SQL_UPDATE
.
replace
(
DaoConst
.
CODE_TABLE
,
this
.
name
);
SqlData
sql
=
new
SqlData
(
DaoConst
.
REMOVE
,
text
);
sql
.
setSqlType
(
DaoConst
.
SQL_TYPE_REMOVE
);
// 设置删除字段标记
sql
.
addCode
(
DaoConst
.
CODE_FIELD
,
String
.
format
(
DaoConst
.
CODE_UPDATE_FIELD_REMOVE
,
this
.
getRemove
()
.
name
));
sql
.
addCode
(
DaoConst
.
CODE_FIELD
,
String
.
format
(
DaoConst
.
CODE_UPDATE_FIELD_REMOVE
,
remove
.
name
));
// 设置删除时需要修改的字段的值
for
(
TableFieldVo
field
:
this
.
getFieldActionList
(
DaoConst
.
FIELD_REMOVE_UPDATE
))
{
...
...
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