diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a32cc6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +target/ +*.class +*.jar +*.war +*.iml +.idea/ +.vscode/ +.DS_Store diff --git a/backend/mci-shared/pom.xml b/backend/mci-shared/pom.xml new file mode 100644 index 0000000..fee4e35 --- /dev/null +++ b/backend/mci-shared/pom.xml @@ -0,0 +1,25 @@ + + + 4.0.0 + + com.sino + sino-mci-parent + 0.0.1-SNAPSHOT + + mci-shared + mci-shared + + + + com.baomidou + mybatis-plus-boot-starter + + + org.projectlombok + lombok + true + + + diff --git a/backend/mci-shared/src/main/java/com/sino/mci/shared/entity/BaseEntity.java b/backend/mci-shared/src/main/java/com/sino/mci/shared/entity/BaseEntity.java new file mode 100644 index 0000000..f4b89ec --- /dev/null +++ b/backend/mci-shared/src/main/java/com/sino/mci/shared/entity/BaseEntity.java @@ -0,0 +1,18 @@ +package com.sino.mci.shared.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +public abstract class BaseEntity { + + @TableId(type = IdType.AUTO) + private Long id; + + private LocalDateTime createTime; + + private LocalDateTime updateTime; +} diff --git a/backend/mci-shared/src/main/java/com/sino/mci/shared/web/ApiResponse.java b/backend/mci-shared/src/main/java/com/sino/mci/shared/web/ApiResponse.java new file mode 100644 index 0000000..84fa400 --- /dev/null +++ b/backend/mci-shared/src/main/java/com/sino/mci/shared/web/ApiResponse.java @@ -0,0 +1,27 @@ +package com.sino.mci.shared.web; + +import lombok.Data; + +@Data +public class ApiResponse { + + private int code; + private String message; + private T data; + private String requestId; + + public static ApiResponse ok(T data) { + ApiResponse response = new ApiResponse<>(); + response.setCode(0); + response.setMessage("ok"); + response.setData(data); + return response; + } + + public static ApiResponse fail(int code, String message) { + ApiResponse response = new ApiResponse<>(); + response.setCode(code); + response.setMessage(message); + return response; + } +} diff --git a/backend/pom.xml b/backend/pom.xml index 267aa4b..587a442 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -19,21 +19,15 @@ Message & Customer Interaction Platform - 21 - 21 - 21 + 17 + 17 + 17 UTF-8 3.5.7 mci-shared - mci-server - mci-channel-common - mci-channel-wecom - mci-channel-dingtalk - mci-channel-feishu - mci-channel-ivr