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
753c8505
Commit
753c8505
authored
Jun 10, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
常规BUG的修改
parent
f6884d99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
10 deletions
+26
-10
BaseDaoImpl.java
...b/src/main/java/com/yanzuoguang/dao/impl/BaseDaoImpl.java
+15
-9
TableStruct.java
...b/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
+11
-1
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/BaseDaoImpl.java
View file @
753c8505
...
@@ -208,6 +208,12 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
...
@@ -208,6 +208,12 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
}
}
}
}
// 处理来源值
for
(
TableFieldVo
fieldVo
:
this
.
table
.
getTable
().
getRemoveUpdate
())
{
Object
fromValue
=
ObjectHelper
.
get
(
model
,
fieldVo
.
inputName
);
ObjectHelper
.
set
(
from
,
fieldVo
.
inputName
,
fromValue
);
}
// 调用删除语句
// 调用删除语句
SqlData
sqlData
=
this
.
getSql
(
DaoConst
.
REMOVE
);
SqlData
sqlData
=
this
.
getSql
(
DaoConst
.
REMOVE
);
return
updateSql
(
sqlData
,
from
);
return
updateSql
(
sqlData
,
from
);
...
@@ -216,9 +222,9 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
...
@@ -216,9 +222,9 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
/**
/**
* 加载数据
* 加载数据
*
*
* @param model 加载数据的请求参数
* @param model
加载数据的请求参数
* @param resultClass
需要加载的数据的类型
* @param resultClass 需要加载的数据的类型
* @param <T> 返回数据的类型
* @param <T>
返回数据的类型
* @return 需要返回的数据
* @return 需要返回的数据
*/
*/
@Override
@Override
...
@@ -253,9 +259,9 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
...
@@ -253,9 +259,9 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
/**
/**
* 加载数据
* 加载数据
*
*
* @param model 加载数据的请求参数
* @param model
加载数据的请求参数
* @param resultClass
需要加载的数据的类型
* @param resultClass 需要加载的数据的类型
* @param <T> 返回数据的类型
* @param <T>
返回数据的类型
* @return 需要返回的数据
* @return 需要返回的数据
*/
*/
@Override
@Override
...
@@ -293,9 +299,9 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
...
@@ -293,9 +299,9 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
/**
/**
* 加载分页数据
* 加载分页数据
*
*
* @param model 加载数据的请求参数
* @param model
加载数据的请求参数
* @param resultClass
需要加载的数据的类型
* @param resultClass 需要加载的数据的类型
* @param <T> 返回数据的类型
* @param <T>
返回数据的类型
* @return 需要返回的数据
* @return 需要返回的数据
*/
*/
@Override
@Override
...
...
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/TableStruct.java
View file @
753c8505
...
@@ -140,10 +140,20 @@ public class TableStruct {
...
@@ -140,10 +140,20 @@ public class TableStruct {
*
*
* @return
* @return
*/
*/
p
rivate
TableFieldVo
getRemove
()
{
p
ublic
TableFieldVo
getRemove
()
{
return
getFieldAction
(
DaoConst
.
FIELD_REMOVE
);
return
getFieldAction
(
DaoConst
.
FIELD_REMOVE
);
}
}
/**
* 获取删除时更新子弹
*
* @return 删除时更新字段
*/
public
List
<
TableFieldVo
>
getRemoveUpdate
()
{
return
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