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
e6f3a7db
Commit
e6f3a7db
authored
Jul 25, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
常规BUG的修改
parent
53ef8bb3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
BaseDao.java
yzg-util-db/src/main/java/com/yanzuoguang/dao/BaseDao.java
+32
-0
BaseDaoImpl.java
...b/src/main/java/com/yanzuoguang/dao/impl/BaseDaoImpl.java
+3
-0
No files found.
yzg-util-db/src/main/java/com/yanzuoguang/dao/BaseDao.java
View file @
e6f3a7db
...
...
@@ -143,4 +143,36 @@ public interface BaseDao {
* @return 删除的记录数量
*/
int
removeArray
(
Object
...
model
);
/**
* 添加统计数据
*
* @param cls 类型
* @param model 实体
* @param <T> 泛型类型
* @return 增加统计的数据编号
*/
<
T
extends
Object
>
String
addGroup
(
Class
<
T
>
cls
,
T
model
);
/**
* 添加统计数组
*
* @param cls 类型
* @param models 请求实体
* @param <T> 泛型数据
* @return 返回列表
*/
<
T
extends
Object
>
List
<
String
>
addGroupList
(
Class
<
T
>
cls
,
List
<
T
>
models
);
/**
* 添加统计数组
*
* @param cls 类型
* @param models 请求实体
* @param <T> 泛型数据
* @return 返回列表
*/
<
T
extends
Object
>
List
<
String
>
addGroupArray
(
Class
<
T
>
cls
,
T
...
models
);
}
yzg-util-db/src/main/java/com/yanzuoguang/dao/impl/BaseDaoImpl.java
View file @
e6f3a7db
...
...
@@ -459,6 +459,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param <T> 泛型类型
* @return 增加统计的数据编号
*/
@Override
public
<
T
extends
Object
>
String
addGroup
(
Class
<
T
>
cls
,
T
model
)
{
// 判断前台实体
if
(
model
==
null
)
{
...
...
@@ -514,6 +515,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param <T> 泛型数据
* @return 返回列表
*/
@Override
public
<
T
extends
Object
>
List
<
String
>
addGroupList
(
Class
<
T
>
cls
,
List
<
T
>
models
)
{
List
<
String
>
ret
=
new
ArrayList
<>();
for
(
T
model
:
models
)
{
...
...
@@ -530,6 +532,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param <T> 泛型数据
* @return 返回列表
*/
@Override
public
<
T
extends
Object
>
List
<
String
>
addGroupArray
(
Class
<
T
>
cls
,
T
...
models
)
{
return
this
.
addGroupList
(
cls
,
Arrays
.
asList
(
models
));
}
...
...
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