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
8309c227
Commit
8309c227
authored
May 07, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消除成功接收处理
parent
e6f94283
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
2 deletions
+20
-2
FileHelper.java
...src/main/java/com/yanzuoguang/util/helper/FileHelper.java
+3
-1
PageSizeReqVo.java
.../src/main/java/com/yanzuoguang/util/vo/PageSizeReqVo.java
+8
-1
DbExecuteImpl.java
.../src/main/java/com/yanzuoguang/db/Impl/DbExecuteImpl.java
+5
-0
BaseServiceImpl.java
...in/java/com/yanzuoguang/service/Impl/BaseServiceImpl.java
+4
-0
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/FileHelper.java
View file @
8309c227
...
...
@@ -180,7 +180,9 @@ public class FileHelper {
}
}
}
if
(!
flag
)
return
false
;
if
(!
flag
)
{
return
false
;
}
//删除当前目录
if
(
dirFile
.
delete
())
{
return
true
;
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/vo/PageSizeReqVo.java
View file @
8309c227
...
...
@@ -2,7 +2,8 @@ package com.yanzuoguang.util.vo;
/**
* 分页实现对象
* Created by yanzu on 2017/5/30.
*
* @author 颜佐光
*/
public
class
PageSizeReqVo
extends
BaseVo
implements
PageSizeReq
{
...
...
@@ -40,6 +41,7 @@ public class PageSizeReqVo extends BaseVo implements PageSizeReq {
*
* @return 返回记录开始的编号
*/
@Override
public
int
getPageStart
()
{
int
pageIndex
=
this
.
pageIndex
>
0
?
this
.
pageIndex
:
1
;
return
(
pageIndex
-
1
)
*
this
.
pageSize
;
...
...
@@ -50,24 +52,29 @@ public class PageSizeReqVo extends BaseVo implements PageSizeReq {
*
* @return 返回记录结束的编号
*/
@Override
public
int
getPageEnd
()
{
int
pageIndex
=
this
.
pageIndex
>
0
?
this
.
pageIndex
:
1
;
return
pageIndex
*
this
.
pageSize
;
}
@Override
public
int
getPageIndex
()
{
return
pageIndex
;
}
@Override
public
PageSizeReqVo
setPageIndex
(
int
pageIndex
)
{
this
.
pageIndex
=
pageIndex
;
return
this
;
}
@Override
public
int
getPageSize
()
{
return
pageSize
;
}
@Override
public
PageSizeReqVo
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
return
this
;
...
...
yzg-util-db/src/main/java/com/yanzuoguang/db/Impl/DbExecuteImpl.java
View file @
8309c227
...
...
@@ -42,6 +42,7 @@ public class DbExecuteImpl implements DbExecute {
* @param paras 参数信息
* @return
*/
@Override
public
int
update
(
Class
targetClass
,
String
sqlName
,
String
sql
,
Object
...
paras
)
{
int
row
=
0
;
long
start
=
System
.
currentTimeMillis
();
...
...
@@ -66,6 +67,7 @@ public class DbExecuteImpl implements DbExecute {
* @param <T> 返回的集合的类型
* @return 集合
*/
@Override
public
<
T
extends
Object
>
void
query
(
Class
targetClass
,
Class
<
T
>
cls
,
DbRow
<
T
>
rowHandle
,
String
sqlName
,
String
sql
,
Object
...
paras
)
{
Ref
<
Integer
>
row
=
new
Ref
<
Integer
>(
0
);
long
start
=
System
.
currentTimeMillis
();
...
...
@@ -97,6 +99,7 @@ public class DbExecuteImpl implements DbExecute {
* @param <T> 返回的集合的类型
* @return 集合
*/
@Override
public
<
T
extends
Object
>
List
<
T
>
query
(
Class
targetClass
,
Class
<
T
>
cls
,
String
sqlName
,
String
sql
,
Object
...
paras
)
{
int
row
=
0
;
long
start
=
System
.
currentTimeMillis
();
...
...
@@ -122,6 +125,7 @@ public class DbExecuteImpl implements DbExecute {
* @param paras 查询语句的参数
* @return 集合
*/
@Override
public
List
<
MapRow
>
query
(
Class
targetClass
,
String
sqlName
,
String
sql
,
Object
...
paras
)
{
return
query
(
targetClass
,
MapRow
.
class
,
sql
,
sqlName
,
paras
);
}
...
...
@@ -135,6 +139,7 @@ public class DbExecuteImpl implements DbExecute {
* @param paras 参数信息
* @return 第一个单元格的数据
*/
@Override
public
Object
queryCell
(
Class
targetClass
,
String
sqlName
,
String
sql
,
Object
...
paras
)
{
int
row
=
0
;
long
start
=
System
.
currentTimeMillis
();
...
...
yzg-util-db/src/main/java/com/yanzuoguang/service/Impl/BaseServiceImpl.java
View file @
8309c227
...
...
@@ -46,6 +46,7 @@ public abstract class BaseServiceImpl<T> implements BaseService<T> {
*
* @param models 需要创建的数据
*/
@Override
public
List
<
String
>
create
(
T
...
models
)
{
List
<
String
>
ids
=
new
ArrayList
<
String
>();
for
(
T
t
:
models
)
{
...
...
@@ -99,6 +100,7 @@ public abstract class BaseServiceImpl<T> implements BaseService<T> {
*
* @param models 需要保存的数据
*/
@Override
public
List
<
String
>
save
(
T
...
models
)
{
List
<
String
>
ids
=
new
ArrayList
<
String
>();
for
(
T
item
:
models
)
{
...
...
@@ -125,6 +127,7 @@ public abstract class BaseServiceImpl<T> implements BaseService<T> {
*
* @param models 需要删除的数据
*/
@Override
public
int
remove
(
T
...
models
)
{
int
ret
=
0
;
for
(
T
item
:
models
)
{
...
...
@@ -151,6 +154,7 @@ public abstract class BaseServiceImpl<T> implements BaseService<T> {
*
* @param models 需要删除的数据
*/
@Override
public
List
<
T
>
load
(
T
...
models
)
{
List
<
T
>
tos
=
new
ArrayList
<
T
>();
for
(
T
item
:
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