Commit 8309c227 authored by yanzg's avatar yanzg

消除成功接收处理

parent e6f94283
......@@ -180,7 +180,9 @@ public class FileHelper {
}
}
}
if (!flag) return false;
if (!flag) {
return false;
}
//删除当前目录
if (dirFile.delete()) {
return true;
......
......@@ -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;
......
......@@ -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();
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment