From 0c494944a40dda008924d5018f17099302e3f254 Mon Sep 17 00:00:00 2001 From: qyx-git Date: Thu, 6 Aug 2020 11:03:03 +0800 Subject: [PATCH] init project --- .gitignore | 33 +++++++ README.md | 7 ++ db/db.sql | 3 + pom.xml | 63 +++++++++++++ .../openapi/openapi/OpenapiApplication.java | 13 +++ .../yuyou/openapi/openapi/api/ABClient.java | 51 ++++++++++ .../openapi/common/CommonResponse.java | 92 +++++++++++++++++++ .../openapi/openapi/common/ResponseCode.java | 36 ++++++++ .../openapi/model/dto/ABMessageDTO.java | 18 ++++ .../openapi/model/vo/ABClientBaseVO.java | 33 +++++++ .../model/vo/ABClientInterMessageVO.java | 43 +++++++++ .../openapi/model/vo/ABClientZMMessageVO.java | 79 ++++++++++++++++ .../openapi/service/ABClientService.java | 22 +++++ .../service/impl/ABClientServiceImpl.java | 24 +++++ src/main/resources/application.yml | 10 ++ .../openapi/OpenapiApplicationTests.java | 13 +++ 16 files changed, 540 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 db/db.sql create mode 100644 pom.xml create mode 100644 src/main/java/com/yuyou/openapi/openapi/OpenapiApplication.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/api/ABClient.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/common/CommonResponse.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/common/ResponseCode.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/model/dto/ABMessageDTO.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/model/vo/ABClientBaseVO.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/model/vo/ABClientInterMessageVO.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/model/vo/ABClientZMMessageVO.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/service/ABClientService.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/service/impl/ABClientServiceImpl.java create mode 100644 src/main/resources/application.yml create mode 100644 src/test/java/com/yuyou/openapi/openapi/OpenapiApplicationTests.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..d9d4236 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# 项目框架 + 数据层 - JPA + 容器 - SpringBoot + 表现层 - SpringMVC + +# 项目代码 + AB单处理逻辑代码 \ No newline at end of file diff --git a/db/db.sql b/db/db.sql new file mode 100644 index 0000000..b48574b --- /dev/null +++ b/db/db.sql @@ -0,0 +1,3 @@ +USE ; + +DROP TABLE IF EXISTS ``; \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..ef15f9c --- /dev/null +++ b/pom.xml @@ -0,0 +1,63 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.3.2.RELEASE + + + com.yuyou.openapi + openapi + 0.0.1-SNAPSHOT + openapi + Open API Center for Spring Boot + + + 1.8 + + + + + + + + + org.springframework.boot + spring-boot-starter-web + + + + mysql + mysql-connector-java + runtime + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/src/main/java/com/yuyou/openapi/openapi/OpenapiApplication.java b/src/main/java/com/yuyou/openapi/openapi/OpenapiApplication.java new file mode 100644 index 0000000..a7a23be --- /dev/null +++ b/src/main/java/com/yuyou/openapi/openapi/OpenapiApplication.java @@ -0,0 +1,13 @@ +package com.yuyou.openapi.openapi; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class OpenapiApplication { + + public static void main(String[] args) { + SpringApplication.run(OpenapiApplication.class, args); + } + +} diff --git a/src/main/java/com/yuyou/openapi/openapi/api/ABClient.java b/src/main/java/com/yuyou/openapi/openapi/api/ABClient.java new file mode 100644 index 0000000..fccf034 --- /dev/null +++ b/src/main/java/com/yuyou/openapi/openapi/api/ABClient.java @@ -0,0 +1,51 @@ +package com.yuyou.openapi.openapi.api; + +import com.yuyou.openapi.openapi.common.CommonResponse; +import com.yuyou.openapi.openapi.model.dto.ABMessageDTO; +import com.yuyou.openapi.openapi.model.vo.ABClientInterMessageVO; +import com.yuyou.openapi.openapi.service.ABClientService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +/** + * Copyright (C), 2012 - 2018, qyx + * FileName: DBABClient + * Author: x + * Date: 2020/8/4 5:26 PM + * Description: 用于接收上游公司推送AB单的接口 + * History: + *