From e453a5e13c8c0f5843bd6049e4bb5d8e9fbd98bf Mon Sep 17 00:00:00 2001 From: Yang Haoyu <2241399212@qq.com> Date: Fri, 1 Dec 2023 10:07:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 38 +++++++++ fate-launch-common/.gitignore | 38 +++++++++ fate-launch-common/pom.xml | 77 +++++++++++++++++++ .../shiyi/launch/domain/Vehiclelaunch.java | 41 ++++++++++ fate-launch-server/.gitignore | 38 +++++++++ fate-launch-server/pom.xml | 29 +++++++ .../controller/VehiclelaunchController.java | 38 +++++++++ .../launch/service/VehiclelaunchService.java | 12 +++ .../impl/VehiclelaunchServiceimpl.java | 19 +++++ .../src/main/resources/bootstrap.yml | 26 +++++++ pom.xml | 32 ++++++++ 11 files changed, 388 insertions(+) create mode 100644 .gitignore create mode 100644 fate-launch-common/.gitignore create mode 100644 fate-launch-common/pom.xml create mode 100644 fate-launch-common/src/main/java/com/shiyi/launch/domain/Vehiclelaunch.java create mode 100644 fate-launch-server/.gitignore create mode 100644 fate-launch-server/pom.xml create mode 100644 fate-launch-server/src/main/java/com/shiyi/launch/controller/VehiclelaunchController.java create mode 100644 fate-launch-server/src/main/java/com/shiyi/launch/service/VehiclelaunchService.java create mode 100644 fate-launch-server/src/main/java/com/shiyi/launch/service/impl/VehiclelaunchServiceimpl.java create mode 100644 fate-launch-server/src/main/resources/bootstrap.yml create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/fate-launch-common/.gitignore b/fate-launch-common/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/fate-launch-common/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/fate-launch-common/pom.xml b/fate-launch-common/pom.xml new file mode 100644 index 0000000..68f2432 --- /dev/null +++ b/fate-launch-common/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + + com.fate + fate-launch + 3.6.3 + + + + com.fate + fate-launch-common + + + 车辆上线——实体类 + + + 17 + 17 + UTF-8 + + + + + com.fate + fate-common-core + + + com.fate + fate-common-redis + + + org.projectlombok + lombok + + + com.fasterxml.jackson.core + jackson-annotations + + + org.springframework.boot + spring-boot-actuator-autoconfigure + + + com.baomidou + mybatis-plus-boot-starter + 3.5.0 + + + + com.fate + fate-common-datasource + + + + + com.fate + fate-common-datascope + + + + + com.fate + fate-common-log + + + + + com.fate + fate-common-swagger + + + + + diff --git a/fate-launch-common/src/main/java/com/shiyi/launch/domain/Vehiclelaunch.java b/fate-launch-common/src/main/java/com/shiyi/launch/domain/Vehiclelaunch.java new file mode 100644 index 0000000..47f8cf9 --- /dev/null +++ b/fate-launch-common/src/main/java/com/shiyi/launch/domain/Vehiclelaunch.java @@ -0,0 +1,41 @@ +package com.shiyi.launch.domain; + +import com.alibaba.fastjson2.annotation.JSONField; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +/** + * @Description : 车辆Vin状态 + * @Author : YangHaoYu + * @Date: 2023-11-30 19:31 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@SuperBuilder +public class Vehiclelaunch { + + /** + * 车辆Vin + */ + @JSONField(name = "vehicleVin") + private String vin; + + /** + * 时间戳 + */ + private String timestamp; + + /** + * 用户名 + */ + @JSONField(name = "username") + private String userName; + + /** + * 随机字符串 + */ + private String nonce; +} diff --git a/fate-launch-server/.gitignore b/fate-launch-server/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/fate-launch-server/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/fate-launch-server/pom.xml b/fate-launch-server/pom.xml new file mode 100644 index 0000000..0959b4d --- /dev/null +++ b/fate-launch-server/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + com.fate + fate-launch + 3.6.3 + + + com.fate + fate-launch-server + + + 17 + 17 + UTF-8 + + + + + com.fate + fate-launch-common + 3.6.3 + + + + diff --git a/fate-launch-server/src/main/java/com/shiyi/launch/controller/VehiclelaunchController.java b/fate-launch-server/src/main/java/com/shiyi/launch/controller/VehiclelaunchController.java new file mode 100644 index 0000000..34180a5 --- /dev/null +++ b/fate-launch-server/src/main/java/com/shiyi/launch/controller/VehiclelaunchController.java @@ -0,0 +1,38 @@ +package com.shiyi.launch.controller; + +import com.fate.common.core.domain.Result; +import com.shiyi.launch.domain.Vehiclelaunch; +import com.shiyi.launch.service.VehiclelaunchService; +import lombok.extern.log4j.Log4j2; +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.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Description : 车辆上线控制层 + * @Author : YangHaoYu + * @Date: 2023-11-30 19:59 + */ +@Log4j2 +@RestController +@RequestMapping("launch") +public class VehiclelaunchController { + + + @Autowired + private VehiclelaunchService vehiclelaunchService; + + /** + * 车辆上线 + */ + @PostMapping("vehiclelaunch") + public String vehiclelaunchs(@RequestBody Vehiclelaunch vehiclelaunch){ + + String topic = vehiclelaunchService.vehiclelaunch(vehiclelaunch); + + return topic; + } + +} diff --git a/fate-launch-server/src/main/java/com/shiyi/launch/service/VehiclelaunchService.java b/fate-launch-server/src/main/java/com/shiyi/launch/service/VehiclelaunchService.java new file mode 100644 index 0000000..7da8911 --- /dev/null +++ b/fate-launch-server/src/main/java/com/shiyi/launch/service/VehiclelaunchService.java @@ -0,0 +1,12 @@ +package com.shiyi.launch.service; + +import com.shiyi.launch.domain.Vehiclelaunch; + +/** + * @Description : + * @Author : YangHaoYu + * @Date: 2023-11-30 20:01 + */ +public interface VehiclelaunchService { + String vehiclelaunch(Vehiclelaunch vehiclelaunch); +} diff --git a/fate-launch-server/src/main/java/com/shiyi/launch/service/impl/VehiclelaunchServiceimpl.java b/fate-launch-server/src/main/java/com/shiyi/launch/service/impl/VehiclelaunchServiceimpl.java new file mode 100644 index 0000000..25aa1ad --- /dev/null +++ b/fate-launch-server/src/main/java/com/shiyi/launch/service/impl/VehiclelaunchServiceimpl.java @@ -0,0 +1,19 @@ +package com.shiyi.launch.service.impl; + +import com.shiyi.launch.domain.Vehiclelaunch; +import com.shiyi.launch.service.VehiclelaunchService; +import org.springframework.stereotype.Service; + +/** + * @Description : 车辆上线业务层 + * @Author : YangHaoYu + * @Date: 2023-11-30 20:02 + */ +@Service +public class VehiclelaunchServiceimpl implements VehiclelaunchService { + @Override + public String vehiclelaunch(Vehiclelaunch vehiclelaunch) { + + return null; + } +} diff --git a/fate-launch-server/src/main/resources/bootstrap.yml b/fate-launch-server/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..20783b0 --- /dev/null +++ b/fate-launch-server/src/main/resources/bootstrap.yml @@ -0,0 +1,26 @@ +# Tomcat +server: + port: 10000 + +# Spring +spring: + application: + # 应用名称 + name: fate-launch + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 182.254.222.21:8848 + config: + # 配置中心地址 + server-addr: 182.254.222.21:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..b317ed4 --- /dev/null +++ b/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + + com.fate + fate-modules + 3.6.3 + + + com.fate + 3.6.3 + fate-launch + + + pom + + 车辆上线 + + fate-launch-common + fate-launch-server + + + + 17 + 17 + UTF-8 + + +