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
2ad34e83
Commit
2ad34e83
authored
Mar 09, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改实体位置
parent
30b3ccf2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
BaseDaoImpl.java
...b/src/main/java/com/yanzuoguang/dao/impl/BaseDaoImpl.java
+1
-1
TableStruct.java
...b/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
+7
-6
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/BaseDaoImpl.java
View file @
2ad34e83
...
...
@@ -670,7 +670,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
if
(
this
.
table
.
getTable
().
getKeyType
()
==
String
.
class
)
{
this
.
setKeyString
(
model
,
md5
);
}
return
md5
Field
;
return
md5
;
}
/**
...
...
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
View file @
2ad34e83
...
...
@@ -414,9 +414,6 @@ public class TableStruct {
*/
private
void
initAddGroup
(
TableSqlCache
table
)
{
List
<
TableFieldVo
>
addGroupField
=
getFieldActionList
(
DaoConst
.
FIELD_ADD_GROUP
);
if
(
addGroupField
==
null
||
addGroupField
.
isEmpty
())
{
return
;
}
List
<
TableFieldVo
>
commonField
=
this
.
getGroupLatitudeFields
();
this
.
addGroupSql
(
table
,
commonField
,
addGroupField
);
}
...
...
@@ -756,13 +753,17 @@ public class TableStruct {
* @param updateFields 需要增加的值的字段
*/
private
void
addGroupSql
(
TableSqlCache
sqlTableData
,
List
<
TableFieldVo
>
whereFields
,
List
<
TableFieldVo
>
updateFields
)
{
List
<
TableFieldVo
>
prmaryKey
=
this
.
getFieldActionList
(
DaoConst
.
FIELD_PRIMARY
);
SqlData
sqlLoad
=
this
.
releaseSql
(
DaoConst
.
SQL_TYPE_ADD_GROUP
,
DaoConst
.
GROUP_QUERY
,
DaoConst
.
SQL_LOAD
,
StringHelper
.
EMPTY
,
new
ArrayList
<>(),
whereFields
);
sqlLoad
.
addParaConst
(
DaoConst
.
CODE_FIELD_DEFAULT_NAME
,
DaoConst
.
CODE_FIELD
,
DaoConst
.
CODE_FIELD_DEFAULT
);
SqlData
sqlGroupAdd
=
this
.
releaseSql
(
DaoConst
.
SQL_TYPE_ADD_GROUP
,
DaoConst
.
GROUP_ADD
,
DaoConst
.
SQL_UPDATE
,
DaoConst
.
CODE_GROUP_ADD
,
updateFields
,
prmaryKey
);
if
(
updateFields
.
isEmpty
())
{
sqlGroupAdd
.
addCode
(
DaoConst
.
CODE_FIELD
,
String
.
format
(
"%s=%s"
,
prmaryKey
.
get
(
0
).
inputName
,
prmaryKey
.
get
(
0
).
inputName
));
}
sqlTableData
.
add
(
sqlLoad
);
sqlTableData
.
add
(
this
.
releaseSql
(
DaoConst
.
SQL_TYPE_ADD_GROUP
,
DaoConst
.
GROUP_ADD
,
DaoConst
.
SQL_UPDATE
,
DaoConst
.
CODE_GROUP_ADD
,
updateFields
,
this
.
getFieldActionList
(
DaoConst
.
FIELD_PRIMARY
)));
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