|
@@ -17,25 +17,25 @@ public interface StorageBaseService<T> extends IService<T> {
|
|
|
/**
|
|
|
* 获取分页
|
|
|
*/
|
|
|
- default Page<T> createPage(Map<String, String> condition) {
|
|
|
+ default Page<T> createPage(Map<String, ?> condition) {
|
|
|
return new Page<>(getCurrent(condition), getSize(condition));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取分页
|
|
|
*/
|
|
|
- default Page<Map<String, Object>> createPageMap(Map<String, String> condition) {
|
|
|
+ default Page<Map<String, Object>> createPageMap(Map<String, ?> condition) {
|
|
|
return new Page<>(getCurrent(condition), getSize(condition));
|
|
|
}
|
|
|
|
|
|
- default int getCurrent(Map<String, String> condition) {
|
|
|
- String currentStr = condition.get("pageNum");
|
|
|
- return ObjectUtil.isEmpty(currentStr) ? 1 : Integer.parseInt(currentStr);
|
|
|
+ default int getCurrent(Map<String, ?> condition) {
|
|
|
+ Object currentObj = condition.get("pageNum");
|
|
|
+ return ObjectUtil.isEmpty(currentObj) ? 1 : Integer.parseInt(currentObj.toString());
|
|
|
}
|
|
|
|
|
|
- default int getSize(Map<String, String> condition) {
|
|
|
- String sizeStr = condition.get("pageSize");
|
|
|
- return ObjectUtil.isEmpty(sizeStr) ? 10 : Integer.parseInt(sizeStr);
|
|
|
+ default int getSize(Map<String, ?> condition) {
|
|
|
+ Object sizeObj = condition.get("pageSize");
|
|
|
+ return ObjectUtil.isEmpty(sizeObj) ? 10 : Integer.parseInt(sizeObj.toString());
|
|
|
}
|
|
|
|
|
|
/**
|