Commit 7a90bbf6 authored by yanzg's avatar yanzg

表结构修改

parent eeef8185
......@@ -20,7 +20,7 @@ public class ArrayHelper {
* @return 非空字符串数组
*/
@SafeVarargs
public static <T extends Object> List<T> megerNotEmpty(T from, Collection<T>... froms) {
public static <T> List<T> megerNotEmpty(T from, Collection<T>... froms) {
List<T> tos = new ArrayList<>();
if (from != null && !StringHelper.isEmpty(from)) {
tos.add(from);
......@@ -48,7 +48,7 @@ public class ArrayHelper {
* @param <T>
* @return
*/
public static <T extends Object> T getFirst(List<T> froms) {
public static <T> T getFirst(List<T> froms) {
return froms.size() > 0 ? froms.get(0) : null;
}
......@@ -59,7 +59,7 @@ public class ArrayHelper {
* @param <T>
* @return
*/
public static <T extends Object> T getFirst(Collection<T> froms) {
public static <T> T getFirst(Collection<T> froms) {
if (froms == null) {
return null;
}
......@@ -129,7 +129,7 @@ public class ArrayHelper {
* @param from
* @param <T>
*/
public static final <T extends Object> List<T> mergeList(T[]... from) {
public static final <T> List<T> mergeList(T[]... from) {
List<T> list = new ArrayList<>();
addList(list, from);
return list;
......@@ -141,7 +141,7 @@ public class ArrayHelper {
* @param from
* @param <T>
*/
public static final <T extends Object> List<T> mergeList(List<T>... from) {
public static final <T> List<T> mergeList(List<T>... from) {
List<T> list = new ArrayList<>();
addList(list, from);
return list;
......@@ -154,7 +154,7 @@ public class ArrayHelper {
* @param from
* @param <T>
*/
public static final <T extends Object> void addList(List<T> list, T[]... from) {
public static final <T> void addList(List<T> list, T[]... from) {
for (T[] item : from) {
for (T sub : item) {
list.add(sub);
......@@ -170,7 +170,7 @@ public class ArrayHelper {
* @param from
* @param <T>
*/
public static final <T extends Object> void addList(List<T> list, List<T>... from) {
public static final <T> void addList(List<T> list, List<T>... from) {
for (List<T> item : from) {
for (T sub : item) {
list.add(sub);
......
......@@ -31,7 +31,7 @@ public class MapHelper {
* @param <T> 泛型
* @return 泛型处理
*/
public static <T extends Object> Map<String, T> getMap(List<T> list, MapKey<T> proxy) {
public static <T> Map<String, T> getMap(List<T> list, MapKey<T> proxy) {
if (list == null) {
return new HashMap<>(0);
}
......@@ -93,7 +93,7 @@ public class MapHelper {
* @param <T> 泛型
* @return 泛型处理
*/
public static <T extends Object> List<String> getKeys(List<T> list, MapKey<T> proxy) {
public static <T> List<String> getKeys(List<T> list, MapKey<T> proxy) {
List<String> to = new ArrayList<>();
if (list != null) {
for (T item : list) {
......
......@@ -153,7 +153,7 @@ public class YzgLanguage {
* @param <T>
* @return
*/
private <T extends Object> Map<String, T> getSafeValue(Map<String, Map<String, T>> mapFrom, String key) {
private <T> Map<String, T> getSafeValue(Map<String, Map<String, T>> mapFrom, String key) {
Map<String, T> ret = mapFrom.get(key);
if (ret == null) {
synchronized (mapFrom) {
......
......@@ -12,7 +12,7 @@ import java.util.concurrent.TimeUnit;
*
* @author 颜佐光
*/
public abstract class AbstractThreadList<T extends Object> implements ThreadWaitExecute {
public abstract class AbstractThreadList<T> implements ThreadWaitExecute {
private final long threadID;
/**
* 线程等待间隔
......
......@@ -6,7 +6,7 @@ import com.yanzuoguang.util.vo.ResponseResult;
* 执行字符串
* @author 颜佐光
*/
public interface RunnableData<T extends Object> {
public interface RunnableData<T> {
/**
* 执行函数
......
......@@ -10,7 +10,7 @@ import java.util.List;
*
* @author 颜佐光
*/
public class PageSizeData<T extends Object> extends PageSizeReqVo implements IPageSizeData<T> {
public class PageSizeData<T> extends PageSizeReqVo implements IPageSizeData<T> {
private static final long serialVersionUID = -8424119556188973873L;
/**
......
......@@ -30,7 +30,7 @@ public class ResponseResultPageIndex<T> extends ResponseResult<T> {
* @param <T> 数据类型
* @return 一个请求成功的数据集合
*/
public static <T extends Object> ResponseResultPageIndex<T> result(T data, int pageIndex) {
public static <T> ResponseResultPageIndex<T> result(T data, int pageIndex) {
return result(data, pageIndex, false);
}
......@@ -41,7 +41,7 @@ public class ResponseResultPageIndex<T> extends ResponseResult<T> {
* @param <T> 数据类型
* @return 一个请求成功的数据集合
*/
public static <T extends Object> ResponseResultPageIndex<T> resultAllowNull(T data, int pageIndex) {
public static <T> ResponseResultPageIndex<T> resultAllowNull(T data, int pageIndex) {
return result(data, pageIndex, true);
}
......@@ -53,7 +53,7 @@ public class ResponseResultPageIndex<T> extends ResponseResult<T> {
* @param <T> 数据类型
* @return 一个请求成功的数据集合
*/
public static final <T extends Object> ResponseResultPageIndex<T> result(T data, int pageIndex, boolean allowNull) {
public static final <T> ResponseResultPageIndex<T> result(T data, int pageIndex, boolean allowNull) {
ResponseResultPageIndex<T> ret = new ResponseResultPageIndex<T>();
ret.setData(data);
ret.setPageIndex(pageIndex);
......
......@@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
* @author 颜佐光
*/
@ApiModel(description = "评论结果查看结果")
public class ResponseDataMainResult<T extends Object, M extends Object> extends ResponseResult<T> {
public class ResponseDataMainResult<T, M extends Object> extends ResponseResult<T> {
/**
* 主表数据,在状态成功时有效
......
......@@ -7,7 +7,7 @@ import com.yanzuoguang.db.impl.DbRow;
*
* @author 颜佐光
*/
public interface ExcelDao<T extends Object, M extends Object> {
public interface ExcelDao<T, M extends Object> {
/**
* 循环处理每行数据
......
......@@ -7,7 +7,7 @@ import com.yanzuoguang.db.impl.DbRow;
*
* @author 颜佐光
*/
public interface ExcelDaoFinish<T extends Object, M extends Object> extends ExcelDao<T, M> {
public interface ExcelDaoFinish<T, M extends Object> extends ExcelDao<T, M> {
/**
* 循环处理每行数据
......
......@@ -17,7 +17,7 @@ import java.io.IOException;
* @param <T> 行数据的类型
* @author 颜佐光
*/
public class ExcelHttp<T extends Object> extends ExcelConsole<T> {
public class ExcelHttp<T> extends ExcelConsole<T> {
/**
* 导出成Excel
......@@ -80,7 +80,7 @@ public class ExcelHttp<T extends Object> extends ExcelConsole<T> {
* @param req 请求对接
* @param excelDao dao层实现接口
*/
public static <T extends Object, M extends Object> ExcelHttp<M> export(ExportBase<T> req, ExcelDao<T, M> excelDao, ExcelStatus<M> excelStatus) {
public static <T, M extends Object> ExcelHttp<M> export(ExportBase<T> req, ExcelDao<T, M> excelDao, ExcelStatus<M> excelStatus) {
ExportData config = req.getConfig();
if (config == null) {
throw YzgError.getRuntimeException("024");
......@@ -114,7 +114,7 @@ public class ExcelHttp<T extends Object> extends ExcelConsole<T> {
* @param response 输出结果
* @param excelDao dao层实现接口
*/
public static <T extends Object, M extends Object> ExcelHttp<M> export(ExportBase<T> req, HttpServletResponse response, ExcelDao<T, M> excelDao) {
public static <T, M extends Object> ExcelHttp<M> export(ExportBase<T> req, HttpServletResponse response, ExcelDao<T, M> excelDao) {
return export(req, response, excelDao, null);
}
......@@ -126,7 +126,7 @@ public class ExcelHttp<T extends Object> extends ExcelConsole<T> {
* @param excelDao dao层实现接口
* @param excelStatus excel状态实现
*/
public static <T extends Object, M extends Object> ExcelHttp<M> export(ExportBase<T> req, HttpServletResponse response, ExcelDao<T, M> excelDao, ExcelStatus<M> excelStatus) {
public static <T, M extends Object> ExcelHttp<M> export(ExportBase<T> req, HttpServletResponse response, ExcelDao<T, M> excelDao, ExcelStatus<M> excelStatus) {
ExcelHttp<M> excel = export(req, excelDao, excelStatus);
try {
// 等待下载模式,下载文件
......
......@@ -64,7 +64,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> T load(Object model, Class<T> resultClass);
<T> T load(Object model, Class<T> resultClass);
/**
* 加载数据,可以用于父子表删除,如通过订单删除游客信息 visitorDao.load({orderId:1});
......@@ -75,7 +75,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> T load(Object model, Class<T> resultClass, QueryPara queryPara);
<T> T load(Object model, Class<T> resultClass, QueryPara queryPara);
/**
......@@ -86,7 +86,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> List<T> loadList(Object model, Class<T> resultClass);
<T> List<T> loadList(Object model, Class<T> resultClass);
/**
* 加载列表数据,可以用于父子表删除,如通过订单删除游客信息 visitorDao.loadList({orderId:1});
......@@ -97,7 +97,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> List<T> loadList(Object model, Class<T> resultClass, QueryPara queryPara);
<T> List<T> loadList(Object model, Class<T> resultClass, QueryPara queryPara);
/**
* 加载分页数据
......@@ -107,7 +107,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> PageSizeData<T> loadPage(PageSizeReqVo model, Class<T> resultClass);
<T> PageSizeData<T> loadPage(PageSizeReqVo model, Class<T> resultClass);
/**
* 加载分页数据
......@@ -118,7 +118,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> PageSizeData<T> loadPage(PageSizeReqVo model, Class<T> resultClass, QueryPara queryPara);
<T> PageSizeData<T> loadPage(PageSizeReqVo model, Class<T> resultClass, QueryPara queryPara);
/**
* 加载分页数据
......@@ -129,7 +129,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> PageSizeData<T> loadPage(PageSizeReqVo pageReq, Object model, Class<T> resultClass);
<T> PageSizeData<T> loadPage(PageSizeReqVo pageReq, Object model, Class<T> resultClass);
/**
* 加载分页数据
......@@ -141,7 +141,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> PageSizeData<T> loadPage(PageSizeReqVo pageReq, Object model, Class<T> resultClass, QueryPara queryPara);
<T> PageSizeData<T> loadPage(PageSizeReqVo pageReq, Object model, Class<T> resultClass, QueryPara queryPara);
/**
* 加载分页数据
......@@ -151,7 +151,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> List<T> loadPageData(PageSizeReqVo model, Class<T> resultClass);
<T> List<T> loadPageData(PageSizeReqVo model, Class<T> resultClass);
/**
* 加载分页数据
......@@ -162,7 +162,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> List<T> loadPageData(PageSizeReqVo model, Class<T> resultClass, QueryPara queryPara);
<T> List<T> loadPageData(PageSizeReqVo model, Class<T> resultClass, QueryPara queryPara);
/**
* 加载分页数据
......@@ -172,7 +172,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> List<T> loadPageData(PageSizeReqVo pageReq, Object model, Class<T> resultClass);
<T> List<T> loadPageData(PageSizeReqVo pageReq, Object model, Class<T> resultClass);
/**
* 加载分页数据
......@@ -183,7 +183,7 @@ public interface BaseDao {
* @param <T> 返回数据的类型
* @return 需要返回的数据
*/
<T extends Object> List<T> loadPageData(PageSizeReqVo pageReq, Object model, Class<T> resultClass, QueryPara queryPara);
<T> List<T> loadPageData(PageSizeReqVo pageReq, Object model, Class<T> resultClass, QueryPara queryPara);
/**
* 修改数据
......@@ -273,7 +273,7 @@ public interface BaseDao {
* @param requests 前台参数,不能包含主键以及其他不需要修改的字段
* @return 保存成功,返回保存的ID,保存失败,返回空值
*/
<T extends Object> List<String> saveByLoadArray(Class<T> cls, Object... requests);
<T> List<String> saveByLoadArray(Class<T> cls, Object... requests);
/***
* 查询数据是否存在,当存在时修改,否则增加
......@@ -281,7 +281,7 @@ public interface BaseDao {
* @param requests 前台参数,不能包含主键以及其他不需要修改的字段
* @return 保存成功,返回保存的ID,保存失败,返回空值
*/
<T extends Object> List<String> saveByLoadList(Class<T> cls, List requests);
<T> List<String> saveByLoadList(Class<T> cls, List requests);
/***
* 查询数据是否存在,当存在时修改,否则增加
......@@ -289,7 +289,7 @@ public interface BaseDao {
* @param request 前台参数,不能包含主键以及其他不需要修改的字段
* @return 保存成功,返回保存的ID,保存失败,返回空值
*/
<T extends Object> String saveByLoad(Class<T> cls, Object request);
<T> String saveByLoad(Class<T> cls, Object request);
/**
* 设置MD5主键
......@@ -297,7 +297,7 @@ public interface BaseDao {
* @param model
* @param <T>
*/
<T extends Object> String setGroupId(T model);
<T> String setGroupId(T model);
/**
* 添加统计数据
......@@ -307,7 +307,7 @@ public interface BaseDao {
* @param <T> 泛型类型
* @return 增加统计的数据编号
*/
<T extends Object> String addGroup(Class<T> cls, T model);
<T> String addGroup(Class<T> cls, T model);
/**
......@@ -318,7 +318,7 @@ public interface BaseDao {
* @param <T> 泛型数据
* @return 返回列表
*/
<T extends Object> List<String> addGroupList(Class<T> cls, List<T> models);
<T> List<String> addGroupList(Class<T> cls, List<T> models);
/**
* 添加统计数组
......@@ -328,7 +328,7 @@ public interface BaseDao {
* @param <T> 泛型数据
* @return 返回列表
*/
<T extends Object> List<String> addGroupArray(Class<T> cls, T... models);
<T> List<String> addGroupArray(Class<T> cls, T... models);
/**
* 对数据据进行集合操作
......
......@@ -407,7 +407,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
return from;
}
private <T extends Object> void checkLoadResult(T toItem, List<T> tos) {
private <T> void checkLoadResult(T toItem, List<T> tos) {
this.checkTable();
// 判断来源主键是否存在,不存在则获取加载后的主键
if (toItem != null) {
......@@ -433,7 +433,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> T load(Object model, Class<T> resultClass, QueryPara queryPara) {
public <T> T load(Object model, Class<T> resultClass, QueryPara queryPara) {
// 获取来源主键
Object from = this.getLoadFrom(model, queryPara);
// 通过传入数据进行加载
......@@ -458,7 +458,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> T load(Object model, Class<T> resultClass) {
public <T> T load(Object model, Class<T> resultClass) {
return this.load(model, resultClass, null);
}
......@@ -472,7 +472,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> List<T> loadList(Object model, Class<T> resultClass, QueryPara queryPara) {
public <T> List<T> loadList(Object model, Class<T> resultClass, QueryPara queryPara) {
// 获取来源主键
Object from = this.getLoadFrom(model, queryPara);
......@@ -496,7 +496,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> List<T> loadList(Object model, Class<T> resultClass) {
public <T> List<T> loadList(Object model, Class<T> resultClass) {
return this.loadList(model, resultClass, null);
}
......@@ -510,7 +510,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> PageSizeData<T> loadPage(PageSizeReqVo model, Class<T> resultClass) {
public <T> PageSizeData<T> loadPage(PageSizeReqVo model, Class<T> resultClass) {
return this.loadPage(model, model, resultClass, null);
}
......@@ -524,7 +524,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> PageSizeData<T> loadPage(PageSizeReqVo model, Class<T> resultClass, QueryPara queryPara) {
public <T> PageSizeData<T> loadPage(PageSizeReqVo model, Class<T> resultClass, QueryPara queryPara) {
return this.loadPage(model, model, resultClass, queryPara);
}
......@@ -537,7 +537,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> PageSizeData<T> loadPage(PageSizeReqVo pageReq, Object model, Class<T> resultClass) {
public <T> PageSizeData<T> loadPage(PageSizeReqVo pageReq, Object model, Class<T> resultClass) {
return this.loadPage(pageReq, model, resultClass, null);
}
......@@ -551,7 +551,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> PageSizeData<T> loadPage(PageSizeReqVo pageReq, Object model, Class<T> resultClass, QueryPara queryPara) {
public <T> PageSizeData<T> loadPage(PageSizeReqVo pageReq, Object model, Class<T> resultClass, QueryPara queryPara) {
// 获取来源主键
Object from = this.getLoadFrom(model, queryPara);
......@@ -577,7 +577,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> List<T> loadPageData(PageSizeReqVo model, Class<T> resultClass) {
public <T> List<T> loadPageData(PageSizeReqVo model, Class<T> resultClass) {
return this.loadPageData(model, model, resultClass, null);
}
......@@ -591,7 +591,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> List<T> loadPageData(PageSizeReqVo model, Class<T> resultClass, QueryPara queryPara) {
public <T> List<T> loadPageData(PageSizeReqVo model, Class<T> resultClass, QueryPara queryPara) {
return this.loadPageData(model, model, resultClass, queryPara);
}
......@@ -605,7 +605,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> List<T> loadPageData(PageSizeReqVo pageReq, Object model, Class<T> resultClass) {
public <T> List<T> loadPageData(PageSizeReqVo pageReq, Object model, Class<T> resultClass) {
return this.loadPageData(pageReq, model, resultClass, null);
}
......@@ -619,7 +619,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 需要返回的数据
*/
@Override
public <T extends Object> List<T> loadPageData(PageSizeReqVo pageReq, Object model, Class<T> resultClass, QueryPara queryPara) {
public <T> List<T> loadPageData(PageSizeReqVo pageReq, Object model, Class<T> resultClass, QueryPara queryPara) {
// 获取来源主键
Object from = this.getLoadFrom(model, queryPara);
......@@ -642,7 +642,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param <T>
*/
@Override
public <T extends Object> String setGroupId(T model) {
public <T> String setGroupId(T model) {
this.checkTable();
// 判断前台实体
if (model == null) {
......@@ -674,7 +674,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 增加统计的数据编号
*/
@Override
public <T extends Object> String addGroup(Class<T> cls, T model) {
public <T> String addGroup(Class<T> cls, T model) {
this.setGroupId(model);
// 判断前台实体
if (model == null) {
......@@ -725,7 +725,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 返回列表
*/
@Override
public <T extends Object> List<String> addGroupList(Class<T> cls, List<T> models) {
public <T> List<String> addGroupList(Class<T> cls, List<T> models) {
List<String> ret = new ArrayList<>();
for (T model : models) {
ret.add(this.addGroup(cls, model));
......@@ -742,7 +742,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 返回列表
*/
@Override
public <T extends Object> List<String> addGroupArray(Class<T> cls, T... models) {
public <T> List<String> addGroupArray(Class<T> cls, T... models) {
return this.addGroupList(cls, Arrays.asList(models));
}
......@@ -754,7 +754,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param <T> 获取的类型
* @return 获取加密之后的值
*/
protected <T extends Object> String getMd5(String sqlName, T model) {
protected <T> String getMd5(String sqlName, T model) {
SqlData sql = this.getSql(sqlName);
StringBuilder sb = new StringBuilder();
String date = StringHelper.EMPTY;
......@@ -802,7 +802,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 保存成功,返回保存的ID,保存失败,返回空值
*/
@Override
public <T extends Object> List<String> saveByLoadArray(Class<T> cls, Object... requests) {
public <T> List<String> saveByLoadArray(Class<T> cls, Object... requests) {
return this.saveByLoadList(cls, Arrays.asList(requests));
}
......@@ -813,7 +813,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 保存成功,返回保存的ID,保存失败,返回空值
*/
@Override
public <T extends Object> List<String> saveByLoadList(Class<T> cls, List requests) {
public <T> List<String> saveByLoadList(Class<T> cls, List requests) {
List<String> ret = new ArrayList<>();
if (requests != null) {
for (Object model : requests) {
......@@ -830,7 +830,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @return 保存成功,返回保存的ID,保存失败,返回空值
*/
@Override
public <T extends Object> String saveByLoad(Class<T> cls, Object request) {
public <T> String saveByLoad(Class<T> cls, Object request) {
this.checkTable();
String key = this.table.getInputKey(request);
T from = null;
......@@ -850,7 +850,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param <T> 创建的数据类型
* @return 创建成功的编号
*/
protected <T extends Object> String saveFromCreate(Class<T> cls, T from, Object request) {
protected <T> String saveFromCreate(Class<T> cls, T from, Object request) {
this.checkTable();
if (from == null) {
try {
......@@ -882,7 +882,7 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
* @param request 前台参数,不能包含主键以及其他不需要修改的字段
* @return 保存成功,返回保存的ID,保存失败,返回空值
*/
public <T extends Object> String saveWith(Class<T> cls, String sqlName, Object request) {
public <T> String saveWith(Class<T> cls, String sqlName, Object request) {
this.checkTable();
if (request instanceof InitDao) {
((InitDao) request).init();
......
......@@ -246,7 +246,7 @@ public abstract class BaseDaoSql {
* @param <T> 返回数据类型
* @return 查询的结果
*/
protected <T extends Object> List<T> queryData(Class<T> cls, SqlData sqlData, Object model) {
protected <T> List<T> queryData(Class<T> cls, SqlData sqlData, Object model) {
List<Object> paras = new ArrayList<Object>();
String sql = this.getPara(paras, sqlData, model, false);
List<T> list = this.queryWithCache(cls, sqlData.getName(), sql, paras.toArray());
......@@ -261,7 +261,7 @@ public abstract class BaseDaoSql {
* @param model 前台参数
* @param <T> 返回数据类型
*/
protected <T extends Object> void queryData(Class<T> cls, DbRow<T> handle, SqlData sqlData, Object model) {
protected <T> void queryData(Class<T> cls, DbRow<T> handle, SqlData sqlData, Object model) {
List<Object> paras = new ArrayList<>();
String sql = this.getPara(paras, sqlData, model, false);
// 查询数据
......@@ -327,7 +327,7 @@ public abstract class BaseDaoSql {
* @param <T> 返回数据类型
* @return 查询的结果
*/
public <T extends Object> List<T> query(Class<T> cls, String sqlName, Object model) {
public <T> List<T> query(Class<T> cls, String sqlName, Object model) {
return this.query(cls, sqlName, model, null);
}
......@@ -340,7 +340,7 @@ public abstract class BaseDaoSql {
* @param <T> 返回数据类型
* @return 查询的结果
*/
public <T extends Object> List<T> query(Class<T> cls, String sqlName, Object model, QueryPara queryPara) {
public <T> List<T> query(Class<T> cls, String sqlName, Object model, QueryPara queryPara) {
SqlData sqlData = this.getSql(sqlName);
sqlData = getSqlQueryPara(sqlData, queryPara, true);
......@@ -357,7 +357,7 @@ public abstract class BaseDaoSql {
* @param model 前台参数
* @return 查询的结果
*/
public <T extends Object> void query(Class<T> cls, DbRow<T> handle, String sqlName, Object model) {
public <T> void query(Class<T> cls, DbRow<T> handle, String sqlName, Object model) {
this.query(cls, handle, sqlName, model, null);
}
......@@ -370,7 +370,7 @@ public abstract class BaseDaoSql {
* @param model 前台参数
* @return 查询的结果
*/
public <T extends Object> void query(Class<T> cls, DbRow<T> handle, String sqlName, Object model, QueryPara queryPara) {
public <T> void query(Class<T> cls, DbRow<T> handle, String sqlName, Object model, QueryPara queryPara) {
SqlData sqlData = this.getSql(sqlName);
// 获取查询参数处理后的SQL语句
sqlData = getSqlQueryPara(sqlData, queryPara, true);
......@@ -399,7 +399,7 @@ public abstract class BaseDaoSql {
* @param <T> 返回数据类型
* @return 查询的结果
*/
public <T extends Object> T queryFirst(Class<T> cls, String sqlName, Object model) {
public <T> T queryFirst(Class<T> cls, String sqlName, Object model) {
return this.queryFirst(cls, sqlName, model, null);
}
......@@ -412,7 +412,7 @@ public abstract class BaseDaoSql {
* @param <T> 返回数据类型
* @return 查询的结果
*/
public <T extends Object> T queryFirst(Class<T> cls, String sqlName, Object model, QueryPara queryPara) {
public <T> T queryFirst(Class<T> cls, String sqlName, Object model, QueryPara queryPara) {
PageSizeReq pageSize = new PageSizeReqVo();
pageSize.setPageIndex(1);
pageSize.setPageSize(1);
......@@ -443,7 +443,7 @@ public abstract class BaseDaoSql {
* @param <T> 返回数据类型
* @return 查询的结果
*/
public <T extends Object> List<T> queryPageData(Class<T> cls, PageSizeReq pageSize, String sqlName, Object model) {
public <T> List<T> queryPageData(Class<T> cls, PageSizeReq pageSize, String sqlName, Object model) {
return this.queryPageData(cls, pageSize, sqlName, model, null);
}
......@@ -457,7 +457,7 @@ public abstract class BaseDaoSql {
* @param <T> 返回数据类型
* @return 查询的结果
*/
public <T extends Object> List<T> queryPageData(Class<T> cls, PageSizeReq pageSize, String sqlName, Object model, QueryPara queryPara) {
public <T> List<T> queryPageData(Class<T> cls, PageSizeReq pageSize, String sqlName, Object model, QueryPara queryPara) {
SqlData to = getSqlData(pageSize, sqlName, queryPara);
return queryData(cls, to, model);
}
......@@ -473,7 +473,7 @@ public abstract class BaseDaoSql {
* @param <T> 返回数据类型
* @return 查询的结果
*/
public <T extends Object> void queryPageData(Class<T> cls, PageSizeReq pageSize, String sqlName, Object model, DbRow<T> rowHandle, QueryPara queryPara) {
public <T> void queryPageData(Class<T> cls, PageSizeReq pageSize, String sqlName, Object model, DbRow<T> rowHandle, QueryPara queryPara) {
SqlData to = getSqlData(pageSize, sqlName, queryPara);
queryData(cls, rowHandle, to, model);
}
......@@ -512,7 +512,7 @@ public abstract class BaseDaoSql {
* @param <T> 返回数据类型
* @return 查询的结果
*/
public <T extends Object> PageSizeData<T> queryPage(Class<T> cls, PageSizeReqVo pageSize, String sqlName, Object model) {
public <T> PageSizeData<T> queryPage(Class<T> cls, PageSizeReqVo pageSize, String sqlName, Object model) {
return queryPage(cls, pageSize, sqlName, model, null);
}
......@@ -526,7 +526,7 @@ public abstract class BaseDaoSql {
* @param <T> 返回数据类型
* @return 查询的结果
*/
public <T extends Object> PageSizeData<T> queryPage(Class<T> cls, PageSizeReqVo pageSize, String sqlName, Object model, QueryPara queryPara) {
public <T> PageSizeData<T> queryPage(Class<T> cls, PageSizeReqVo pageSize, String sqlName, Object model, QueryPara queryPara) {
PageSizeData<T> data = new PageSizeData<T>();
data.setPageIndex(pageSize.getPageIndex());
......
......@@ -463,7 +463,7 @@ public class TableSqlCache {
* @param collection
* @return
*/
public <T extends Object> List<T> getKeySort(Collection<T> collection) {
public <T> List<T> getKeySort(Collection<T> collection) {
// 集合数据
List<T> list = new ArrayList();
list.addAll(collection);
......
......@@ -36,7 +36,7 @@ public interface DbExecute {
* @param <T> 返回的集合的类型
* @return 集合
*/
<T extends Object> void query(Class<?> targetClass, Class<T> cls, DbRow<T> rowHandle, String sqlName, String sql, Object... paras);
<T> void query(Class<?> targetClass, Class<T> cls, DbRow<T> rowHandle, String sqlName, String sql, Object... paras);
/**
* 查询数据,并返回集合
......
......@@ -32,7 +32,7 @@ import java.util.regex.Pattern;
* @param <T> 导出的数据
* @author 颜佐光
*/
public class ExcelConsole<T extends Object> implements DbRow<T> {
public class ExcelConsole<T> implements DbRow<T> {
private final Pattern chinese = Pattern.compile("[^x00-xff]");
/**
......
......@@ -5,7 +5,7 @@ package com.yanzuoguang.excel;
*
* @author 颜佐光
*/
public interface ExcelStatus<T extends Object> {
public interface ExcelStatus<T> {
/**
* Excel处理
......
......@@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
* @author 颜佐光
*/
@ApiModel(description = "订单导出基本请求信息")
public class ExportBase<T extends Object> extends BaseVo {
public class ExportBase<T> extends BaseVo {
/**
* 导出格式
*/
......
......@@ -91,7 +91,7 @@ public class TokenHelper {
* @param <T> 数据类型
* @return 缓存的数据
*/
public static <T extends Object> T get(Class<T> cls) {
public static <T> T get(Class<T> cls) {
return get(true, cls);
}
......@@ -103,7 +103,7 @@ public class TokenHelper {
* @param <T> 数据类型
* @return 缓存的数据
*/
public static <T extends Object> T get(boolean checkFlag, Class<T> cls) {
public static <T> T get(boolean checkFlag, Class<T> cls) {
return get(checkFlag, cls, true);
}
......@@ -115,7 +115,7 @@ public class TokenHelper {
* @param <T> 数据类型
* @return 缓存的数据
*/
public static <T extends Object> T get(boolean checkFlag, Class<T> cls, boolean readNewToken) {
public static <T> T get(boolean checkFlag, Class<T> cls, boolean readNewToken) {
TokenData tokenData = getTokenData(readNewToken);
if (tokenData == null) {
if (checkFlag) {
......@@ -139,7 +139,7 @@ public class TokenHelper {
* @param <T> 类型
* @return 对象
*/
public static <T extends Object> T getField(Class<T> cls, String field) {
public static <T> T getField(Class<T> cls, String field) {
return getField(true, cls, field);
}
......@@ -152,7 +152,7 @@ public class TokenHelper {
* @param <T> 类型
* @return 对象
*/
public static <T extends Object> T getField(boolean checkFlag, Class<T> cls, String field) {
public static <T> T getField(boolean checkFlag, Class<T> cls, String field) {
MapRow row = get(checkFlag, MapRow.class);
Object value = null;
if (row.containsKey(field)) {
......
......@@ -181,7 +181,7 @@ public class BeanDao {
* @param <T> 实体的类型
* @return 获取到的实体,不存在时返回 null
*/
public <T extends Object> T getBean(Class<T> cls, String name) {
public <T> T getBean(Class<T> cls, String name) {
if (context.containsBean(name)) {
return context.getBean(name, cls);
} else {
......@@ -196,7 +196,7 @@ public class BeanDao {
* @param target 注册的对象
* @param <T> 注册的实体的类型
*/
public <T extends Object> void register(String name, T target) {
public <T> void register(String name, T target) {
//将applicationContext转换为ConfigurableApplicationContext
ConfigurableApplicationContext configurableApplicationContext = (ConfigurableApplicationContext) context;
// 获取bean工厂并转换为DefaultListableBeanFactory
......
......@@ -8,7 +8,7 @@ import java.util.List;
/**
* 转换计划
*/
public class ConvertPlan<T extends Object> {
public class ConvertPlan<T> {
/**
* 来源模板
......
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