diff --git a/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/mall-ebtp-cloud-common/pom.xml b/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/mall-ebtp-cloud-common/pom.xml
new file mode 100644
index 0000000..9091e46
--- /dev/null
+++ b/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/mall-ebtp-cloud-common/pom.xml
@@ -0,0 +1,66 @@
+
Title: pojoToJson
+ *Description:
+ * + * @param data + * @return + */ + public static String objectToJson(Object data) { + try { + MAPPER.registerModule(new ParameterNamesModule()) + .registerModule(new Jdk8Module()) + .registerModule(new JavaTimeModule()); + return MAPPER.writeValueAsString(data); + } catch (JsonProcessingException e) { + log.info(ExceptionUtil.stacktraceToString(e)); + } + return null; + } + + /** + * 将json结果集转化为对象 + * + * @param jsonData json数据 + * @param beanType 对象中的object类型 + * @return + */ + public staticTitle: jsonToList
+ *Description:
+ * + * @param jsonData + * @param beanType + * @return + */ + public staticTitle: jsonToList
+ *Description:
+ * + * @param jsonData + * @param beanType + * @return + */ + public static断言对象obj
非空。如果对象obj
为空,则抛出异常
+ *
+ * @param obj 待判断对象
+ */
+ default void assertNotNull(Object obj) {
+ if (obj == null) {
+ throw newException(obj);
+ }
+ }
+
+ /**
+ *
断言对象args
非空。如果对象args
为null或空字符串,则抛出异常
+ *
+ * @param args 待判断字符串
+ */
+ default void assertStrNotNull(String... args) {
+ this.assertNotNull(args);
+ for (String arg : args) {
+ if (arg == null || arg.isEmpty()) {
+ throw newException(arg);
+ }
+ }
+ }
+
+ /**
+ * 根据传参抛出异常,则抛出异常
+ *
+ * @param t 验证结果
+ */
+ default void customValid(boolean t) {
+ if (t) {
+ throw newException();
+ }
+ }
+
+ /**
+ * 抛出异常
+ */
+ default void throwException() {
+ throw newException();
+ }
+
+}
\ No newline at end of file
diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessException.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessException.java
new file mode 100644
index 0000000..cb1910b
--- /dev/null
+++ b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessException.java
@@ -0,0 +1,36 @@
+package com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 平台自定义异常类
+ *
+ * @file: com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception.BusinessException
+ * @description: 平台自定义异常类
+ * @author: ajaxfan
+ * @date: 2020-10-22
+ * @version: V1.0
+ * @update
+ */
+@Getter
+@Setter
+public class BusinessException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+
+ private Integer code;
+ private String message;
+
+ public BusinessException(IResponseEnum iResponseEnum, String message) {
+ super(message);
+ this.code = iResponseEnum.getCode();
+ this.message = message;
+ }
+
+ public BusinessException(IResponseEnum iResponseEnum, String message, Throwable cause) {
+ super(message, cause);
+ this.code = iResponseEnum.getCode();
+ this.message = message;
+ }
+
+}
diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessExceptionAssert.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessExceptionAssert.java
new file mode 100644
index 0000000..25dcf38
--- /dev/null
+++ b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessExceptionAssert.java
@@ -0,0 +1,33 @@
+package com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception;
+
+import java.text.MessageFormat;
+
+/**
+ * 初始化异常及断言接口,所有自定义异常Enum均需实现此接口
+ *
+ * 自定义异常枚举中年必须有:code、message
+ *
+ * @file: com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception.BusinessExceptionAssert
+ * @description:
+ * @author 付庆吉
+ * @date 2020-09-14
+ * @version: V1.0
+ * @update
+ */
+public interface BusinessExceptionAssert extends IResponseEnum, Assert {
+
+ @Override
+ default BusinessException newException(Object... args) {
+ String msg = MessageFormat.format(this.getMessage(), args);
+
+ return new BusinessException(this, msg);
+ }
+
+ @Override
+ default BusinessException newException(Throwable t, Object... args) {
+ String msg = MessageFormat.format(this.getMessage(), args);
+
+ return new BusinessException(this, msg, t);
+ }
+
+}
\ No newline at end of file
diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/IResponseEnum.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/IResponseEnum.java
new file mode 100644
index 0000000..9d5af26
--- /dev/null
+++ b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/IResponseEnum.java
@@ -0,0 +1,19 @@
+package com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception;
+
+/**
+ * 异常编码和消息
+ *
+ * @file: com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception.IResponseEnum
+ * @description:
+ * @author 付庆吉
+ * @date 2020-09-14
+ * @version: V1.0
+ * @update
+ */
+public interface IResponseEnum {
+
+ int getCode();
+
+ String getMessage();
+
+}
diff --git a/mall-ebtp-cloud-parent/pom.xml b/mall-ebtp-cloud-parent/pom.xml
index 9173c79..3fd3266 100644
--- a/mall-ebtp-cloud-parent/pom.xml
+++ b/mall-ebtp-cloud-parent/pom.xml
@@ -337,7 +337,10 @@
-
+