feat, docs: 完善框架代码,示例代码,使用文档
diff --git a/common/framework/pom.xml b/common/framework/pom.xml
index 328b83c..18d0ac5 100644
--- a/common/framework/pom.xml
+++ b/common/framework/pom.xml
@@ -44,6 +44,11 @@
<dependency>
<groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<optional>true</optional>
</dependency>
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/BaseException.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/BaseException.java
index ee21f7a..5f10b42 100644
--- a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/BaseException.java
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/BaseException.java
@@ -6,11 +6,8 @@
*
*/
private static final long serialVersionUID = 2278568118369300446L;
-
- /**
- * 异常信息
- */
- protected String msg;
+
+ public static final int DEFAULT_CODE = -1;
/**
* 具体异常码
@@ -20,7 +17,6 @@
public BaseException(int code, String msgFormat, Object... args) {
super(String.format(msgFormat, args));
this.code = code;
- this.msg = String.format(msgFormat, args);
}
public BaseException() {
@@ -39,10 +35,6 @@
super(message);
}
- public String getMsg() {
- return msg;
- }
-
public int getCode() {
return code;
}
@@ -55,11 +47,11 @@
* @return
*/
@Deprecated
- public BaseException newInstance(String msgFormat, Object... args) {
- return new BaseException(this.code, msgFormat, args);
+ public static BaseException newInstance(String msgFormat, Object... args) {
+ return new BaseException(DEFAULT_CODE, msgFormat, args);
}
- public BaseException newInstance(int code, String msgFormat, Object... args) {
+ public static BaseException newInstance(int code, String msgFormat, Object... args) {
return new BaseException(code, msgFormat, args);
}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/EnableCustomExceptionHandler.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/EnableCustomExceptionHandler.java
new file mode 100644
index 0000000..28553c6
--- /dev/null
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/EnableCustomExceptionHandler.java
@@ -0,0 +1,17 @@
+package com.supwisdom.institute.backend.common.framework.exception;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.springframework.context.annotation.Import;
+
+@Documented
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Import({ExceptionConfiguration.class})
+public @interface EnableCustomExceptionHandler {
+
+}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/ErrorResponse.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/ErrorResponse.java
new file mode 100644
index 0000000..e0e4235
--- /dev/null
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/ErrorResponse.java
@@ -0,0 +1,38 @@
+package com.supwisdom.institute.backend.common.framework.exception;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import com.supwisdom.institute.backend.common.framework.vo.response.data.IApiResponseData;
+
+public class ErrorResponse implements IApiResponseData {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5810078993746894780L;
+
+ /**
+ * 异常信息
+ */
+ @Getter
+ @Setter
+ private String message;
+
+ /**
+ * 具体异常码
+ */
+ @Getter
+ @Setter
+ private int code = -1;
+
+ private ErrorResponse(int code, String msgFormat, Object... args) {
+ this.code = code;
+ this.message = String.format(msgFormat, args);
+ }
+
+ public static ErrorResponse of(int code, String msgFormat, Object... args) {
+ return new ErrorResponse(code, msgFormat, args);
+ }
+
+}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/ExceptionConfiguration.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/ExceptionConfiguration.java
new file mode 100644
index 0000000..845e935
--- /dev/null
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/ExceptionConfiguration.java
@@ -0,0 +1,14 @@
+package com.supwisdom.institute.backend.common.framework.exception;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class ExceptionConfiguration {
+
+ @Bean
+ public GlobalExceptionHandler globalExceptionHandler() {
+ return new GlobalExceptionHandler();
+ }
+
+}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/GlobalExceptionHandler.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/GlobalExceptionHandler.java
new file mode 100644
index 0000000..d32199c
--- /dev/null
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/exception/GlobalExceptionHandler.java
@@ -0,0 +1,30 @@
+package com.supwisdom.institute.backend.common.framework.exception;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseStatus;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+
+@RestControllerAdvice
+public class GlobalExceptionHandler {
+
+ @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
+ @ExceptionHandler({Exception.class})
+ public ErrorResponse DefaultExceptionHandler(Exception e) {
+
+ ErrorResponse error = ErrorResponse.of(BaseException.DEFAULT_CODE, e.getMessage());
+
+ return error;
+ }
+
+
+ @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
+ @ExceptionHandler({BaseException.class})
+ public ErrorResponse BaseExceptionHandler(BaseException e) {
+
+ ErrorResponse error = ErrorResponse.of(e.getCode(), e.getMessage());
+
+ return error;
+ }
+
+}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/modal/ABaseModal.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/modal/ABaseModal.java
deleted file mode 100644
index 3b8d6d3..0000000
--- a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/modal/ABaseModal.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.supwisdom.institute.backend.common.framework.modal;
-
-public abstract class ABaseModal implements IModal {
-
- /**
- *
- */
- private static final long serialVersionUID = 8717041105592152819L;
-
-}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/modal/IModal.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/modal/IModal.java
deleted file mode 100644
index cb6f72b..0000000
--- a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/modal/IModal.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.supwisdom.institute.backend.common.framework.modal;
-
-import java.io.Serializable;
-
-public interface IModal extends Serializable {
-
-}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/model/ABaseModel.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/model/ABaseModel.java
new file mode 100644
index 0000000..efa3e25
--- /dev/null
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/model/ABaseModel.java
@@ -0,0 +1,10 @@
+package com.supwisdom.institute.backend.common.framework.model;
+
+public abstract class ABaseModel implements IModel {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8717041105592152819L;
+
+}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/model/IModel.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/model/IModel.java
new file mode 100644
index 0000000..a6258d3
--- /dev/null
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/model/IModel.java
@@ -0,0 +1,7 @@
+package com.supwisdom.institute.backend.common.framework.model;
+
+import java.io.Serializable;
+
+public interface IModel extends Serializable {
+
+}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/ABaseJpaRepositoryImpl.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/ABaseJpaRepository.java
similarity index 67%
rename from common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/ABaseJpaRepositoryImpl.java
rename to common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/ABaseJpaRepository.java
index 32e0e33..d787e59 100644
--- a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/ABaseJpaRepositoryImpl.java
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/ABaseJpaRepository.java
@@ -13,21 +13,22 @@
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
import org.springframework.data.repository.NoRepositoryBean;
+import com.supwisdom.institute.backend.common.core.transmit.user.UserContext;
import com.supwisdom.institute.backend.common.framework.entity.ABaseEntity;
@Transactional
@NoRepositoryBean
-public class ABaseJpaRepositoryImpl<E extends ABaseEntity> extends SimpleJpaRepository<E, String> implements BaseJpaRepository<E> {
+public class ABaseJpaRepository<E extends ABaseEntity> extends SimpleJpaRepository<E, String> implements BaseJpaRepository<E> {
@SuppressWarnings("unused")
private final EntityManager em;
- public ABaseJpaRepositoryImpl(Class<E> domainClass, EntityManager em) {
+ public ABaseJpaRepository(Class<E> domainClass, EntityManager em) {
super(domainClass, em);
this.em = em;
}
- public ABaseJpaRepositoryImpl(JpaEntityInformation<E, String> information, EntityManager em) {
+ public ABaseJpaRepository(JpaEntityInformation<E, String> information, EntityManager em) {
super(information, em);
this.em = em;
}
@@ -67,7 +68,9 @@
if (entity.getDeleted() == null) {
entity.setDeleted(false);
}
- //entity.setAddAccount(AuthUtil.getRemoteUser()); // FIXME: setAddAccount
+ if (entity.getAddAccount() == null) {
+ entity.setAddAccount(UserContext.getUsername());
+ }
if (entity.getAddTime() == null) {
entity.setAddTime(Calendar.getInstance().getTime());
}
@@ -79,7 +82,9 @@
public E update(E entity) {
- //entity.setEditAccount(AuthUtil.getRemoteUser()); // FIXME: setEditAccount
+ if (entity.getEditAccount() == null) {
+ entity.setEditAccount(UserContext.getUsername());
+ }
if (entity.getEditTime() == null) {
entity.setEditTime(Calendar.getInstance().getTime());
}
@@ -88,5 +93,22 @@
return e;
}
+
+ public E remove(E entity) {
+
+ if (entity.getDeleted() == null) {
+ entity.setDeleted(true);
+ }
+ if (entity.getDeleteAccount() == null) {
+ entity.setDeleteAccount(UserContext.getUsername());
+ }
+ if (entity.getDeleteTime() == null) {
+ entity.setDeleteTime(Calendar.getInstance().getTime());
+ }
+
+ E e = this.save(entity);
+
+ return e;
+ }
}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/BaseJpaRepository.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/BaseJpaRepository.java
index 3451705..ef0a932 100644
--- a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/BaseJpaRepository.java
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/BaseJpaRepository.java
@@ -10,6 +10,7 @@
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.NoRepositoryBean;
+import com.supwisdom.institute.backend.common.core.transmit.user.UserContext;
import com.supwisdom.institute.backend.common.framework.entity.ABaseEntity;
import com.supwisdom.institute.backend.common.util.UUIDUtils;
@@ -71,7 +72,7 @@
entity.setDeleted(false);
}
if (entity.getAddAccount() == null) {
- //entity.setAddAccount(AuthUtil.getRemoteUser()); // FIXME: setAddAccount
+ entity.setAddAccount(UserContext.getUsername());
}
if (entity.getAddTime() == null) {
entity.setAddTime(Calendar.getInstance().getTime());
@@ -85,7 +86,7 @@
public default E update(E entity) {
if (entity.getEditAccount() == null) {
- //entity.setEditAccount(AuthUtil.getRemoteUser()); // FIXME: setEditAccount
+ entity.setEditAccount(UserContext.getUsername());
}
if (entity.getEditTime() == null) {
entity.setEditTime(Calendar.getInstance().getTime());
@@ -96,14 +97,13 @@
return e;
}
-
public default E remove(E entity) {
if (entity.getDeleted() == null) {
entity.setDeleted(true);
}
if (entity.getDeleteAccount() == null) {
- //entity.setDeleteAccount(AuthUtil.getRemoteUser()); // FIXME: setDeleteAccount
+ entity.setDeleteAccount(UserContext.getUsername());
}
if (entity.getDeleteTime() == null) {
entity.setDeleteTime(Calendar.getInstance().getTime());
@@ -114,7 +114,6 @@
return e;
}
-
public default void delete(String id) {
this.deleteById(id);
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/resultTransformer/IgnoreCaseResultTransformer.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/resultTransformer/IgnoreCaseResultTransformer.java
index ee622bc..0736f3e 100644
--- a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/resultTransformer/IgnoreCaseResultTransformer.java
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/repo/resultTransformer/IgnoreCaseResultTransformer.java
@@ -10,63 +10,66 @@
import java.util.List;
/**
- *
* 修正hibernate返回自定义pojo类型时找不到属性的BUG
* 主要发生在使用oracle或高版本的mysql时,查询返回的字段默认是大写的(除非SQL中指定了别名),这导致返回自定义pojo类型时会报找不到属性的错误,该类用于修正此BUG。
- * 使用该类时SQL返回的字段名大小写或者带"_"都会被忽略,如数据库字段为 USER_NAME,自定义pojo的属性名为username就可以使用
- *
- * @author feng*/
+ * 使用该类时SQL返回的字段名大小写或者带"_"都会被忽略,如数据库字段为 USER_NAME,自定义pojo的属性名为username就可以使用
+ *
+ * @author feng
+ */
public class IgnoreCaseResultTransformer implements ResultTransformer {
- private static final long serialVersionUID = -3779317531110592988L;
- private final Class<?> resultClass;
- private Field[] fields;
- private List<Class> types = Lists.newArrayList();
- public IgnoreCaseResultTransformer(final Class<?> resultClass) {
- this.resultClass = resultClass;
- List<Field> list = Lists.newArrayList();
- for (Class<?> superClass = resultClass; superClass != Object.class; superClass = superClass.getSuperclass()) {
- Field[] fs = superClass.getDeclaredFields();
- List<Field> newFs = Lists.newArrayList();
- for(int i=0;i<fs.length;i++){
- if(fs[i].getName().equals("serialVersionUID")){
- continue;
- }
- types.add(fs[i].getType());
- ReflectUtils.makeAccessible(fs[i]);
- newFs.add(fs[i]);
- }
- list.addAll(newFs);
- }
- this.fields = list.toArray(new Field[list.size()]);
+ private static final long serialVersionUID = -3779317531110592988L;
+ private final Class<?> resultClass;
+ private Field[] fields;
+ private List<Class<?>> types = Lists.newArrayList();
+
+ public IgnoreCaseResultTransformer(final Class<?> resultClass) {
+ this.resultClass = resultClass;
+ List<Field> list = Lists.newArrayList();
+ for (Class<?> superClass = resultClass; superClass != Object.class; superClass = superClass.getSuperclass()) {
+ Field[] fs = superClass.getDeclaredFields();
+ List<Field> newFs = Lists.newArrayList();
+ for (int i = 0; i < fs.length; i++) {
+ if (fs[i].getName().equals("serialVersionUID")) {
+ continue;
}
- /**
- * aliases为每条记录的数据库字段名,ORACLE字段名默认为大写
- * tupe为与aliases对应的字段的值
- */
- @Override
- public Object transformTuple(final Object[] tuple, final String[] aliases) {
- Object result;
- try {
- result = this.resultClass.newInstance();
- for (int i = 0; i < aliases.length; i++) {
- for (int j=0;j<this.fields.length;j++) {
- String fieldName = this.fields[j].getName();
- //数据库字段带下划线的时候也能保证使用,如数据库字段为 USER_NAME,自定义pojo的属性名为username就可以使用
- if (fieldName.equalsIgnoreCase(aliases[i].replaceAll("_", ""))) {
- ReflectUtils.invokeSetter(result,fieldName,tuple[i],this.types.get(j));
-// beanUtilsBean.setProperty(result, fieldName, tuple[i]);
- break;
- }
- }
- }
- } catch (Exception e) {
- throw new HibernateException("Could not instantiate resultclass: " + this.resultClass.getName(), e);
- }
- return result;
+ types.add(fs[i].getType());
+ ReflectUtils.makeAccessible(fs[i]);
+ newFs.add(fs[i]);
}
- @Override
- @SuppressWarnings("rawtypes")
- public List transformList(final List collection) {
- return collection;
+ list.addAll(newFs);
+ }
+ this.fields = list.toArray(new Field[list.size()]);
+ }
+
+ /**
+ * aliases为每条记录的数据库字段名,ORACLE字段名默认为大写
+ * tupe为与aliases对应的字段的值
+ */
+ @Override
+ public Object transformTuple(final Object[] tuple, final String[] aliases) {
+ Object result;
+ try {
+ result = this.resultClass.newInstance();
+ for (int i = 0; i < aliases.length; i++) {
+ for (int j = 0; j < this.fields.length; j++) {
+ String fieldName = this.fields[j].getName();
+ // 数据库字段带下划线的时候也能保证使用,如数据库字段为 USER_NAME,自定义pojo的属性名为username就可以使用
+ if (fieldName.equalsIgnoreCase(aliases[i].replaceAll("_", ""))) {
+ ReflectUtils.invokeSetter(result, fieldName, tuple[i], this.types.get(j));
+ // beanUtilsBean.setProperty(result, fieldName, tuple[i]);
+ break;
+ }
+ }
}
-}
\ No newline at end of file
+ } catch (Exception e) {
+ throw new HibernateException("Could not instantiate resultclass: " + this.resultClass.getName(), e);
+ }
+ return result;
+ }
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ public List transformList(final List collection) {
+ return collection;
+ }
+}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/AbstractApiResponse.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/AbstractApiResponse.java
index 8e979e3..20de33c 100644
--- a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/AbstractApiResponse.java
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/AbstractApiResponse.java
@@ -1,6 +1,5 @@
package com.supwisdom.institute.backend.common.framework.vo.response;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.supwisdom.institute.backend.common.framework.vo.response.data.IApiResponseData;
public abstract class AbstractApiResponse<T extends IApiResponseData> implements IApiResponse<T> {
@@ -10,17 +9,6 @@
*/
private static final long serialVersionUID = 846108786006850165L;
- @JsonIgnore
- @Deprecated
- protected boolean acknowleged = true;
-
- @Override
- @JsonIgnore
- @Deprecated
- public boolean isAcknowleged() {
- return acknowleged;
- }
-
protected int code = 0;
protected String message = null;
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/DefaultApiResponse.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/DefaultApiResponse.java
index 72ac7e2..5ea45c5 100644
--- a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/DefaultApiResponse.java
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/DefaultApiResponse.java
@@ -16,37 +16,14 @@
return data;
}
-// public void setData(T data) {
-// this.data = data;
-// }
-//
-// public DefaultApiResponse() {
-//
-// }
-
public DefaultApiResponse(T data) {
this(0, null, data);
}
- @Deprecated
- public DefaultApiResponse(boolean acknowleged, T data) {
- super.acknowleged = acknowleged;
- if (super.acknowleged == false) {
- super.code = -1;
- super.message = "未知错误";
- }
-
- this.data = data;
- }
-
public DefaultApiResponse(int code, String message, T data) {
super.code = code;
super.message = message;
- if (code != 0) {
- super.acknowleged = false;
- }
-
this.data = data;
}
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/IApiResponse.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/IApiResponse.java
index 487183a..f8f2573 100644
--- a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/IApiResponse.java
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/IApiResponse.java
@@ -2,15 +2,10 @@
import java.io.Serializable;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.supwisdom.institute.backend.common.framework.vo.response.data.IApiResponseData;
public interface IApiResponse<T extends IApiResponseData> extends Serializable {
- @JsonIgnore
- @Deprecated
- boolean isAcknowleged();
-
int getCode();
String getMessage();
diff --git a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/data/IApiQueryResponseData.java b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/data/IApiQueryResponseData.java
index 4e78c10..5789a96 100644
--- a/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/data/IApiQueryResponseData.java
+++ b/common/framework/src/main/java/com/supwisdom/institute/backend/common/framework/vo/response/data/IApiQueryResponseData.java
@@ -1,11 +1,10 @@
package com.supwisdom.institute.backend.common.framework.vo.response.data;
+import java.io.Serializable;
import java.util.List;
import java.util.Map;
-import com.supwisdom.institute.backend.common.framework.entity.ABaseEntity;
-
-public interface IApiQueryResponseData<E extends ABaseEntity> extends IApiResponseData {
+public interface IApiQueryResponseData<E extends Serializable> extends IApiResponseData {
/**
* 当前页码