feat():模拟车辆基础模板
parent
743e81025f
commit
bd3d964663
8
pom.xml
8
pom.xml
|
@ -92,6 +92,14 @@
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun</groupId>
|
||||||
|
<artifactId>ecs20140526</artifactId>
|
||||||
|
<version>5.1.8</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -5,7 +5,7 @@ import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 车辆模拟启动类
|
* @description 车辆模拟启动类
|
||||||
* @date 2023/11/9
|
* @date 2023/11/9
|
||||||
|
|
|
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: DongZeLiang
|
* @Author: Saisai.Liu
|
||||||
* @date: 2023/12/2
|
* @date: 2023/12/2
|
||||||
* @Description: 分页集合
|
* @Description: 分页集合
|
||||||
* @Version: 1.0
|
* @Version: 1.0
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 系统常量
|
* @description 系统常量
|
||||||
* @date 2023/11/15
|
* @date 2023/11/15
|
||||||
|
|
|
@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 异常类
|
* @description 异常类
|
||||||
* @date 2023/11/15
|
* @date 2023/11/15
|
||||||
|
|
|
@ -5,7 +5,7 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description index页跳转
|
* @description index页跳转
|
||||||
* @date 2023/12/1
|
* @date 2023/12/1
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
// This file is auto-generated, don't edit it. Thanks.
|
||||||
|
package com.muyu.controller;
|
||||||
|
|
||||||
|
import com.aliyun.tea.*;
|
||||||
|
|
||||||
|
public class Sample {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用AK&SK初始化账号Client
|
||||||
|
* @return Client
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static com.aliyun.ecs20140526.Client createClient() throws Exception {
|
||||||
|
// 工程代码泄露可能会导致 AccessKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考。
|
||||||
|
// 建议使用更安全的 STS 方式,更多鉴权访问方式请参见:https://help.aliyun.com/document_detail/378657.html。
|
||||||
|
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
|
||||||
|
// 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_ID。
|
||||||
|
.setAccessKeyId("LTAI5tKaz3hHJ8pkgF7iem8b")
|
||||||
|
// 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_SECRET。
|
||||||
|
.setAccessKeySecret("CApa5sl414bKC8GwD8uBtINuT26Ocj");
|
||||||
|
// Endpoint 请参考 https://api.aliyun.com/product/Ecs
|
||||||
|
config.endpoint = "ecs.cn-zhangjiakou.aliyuncs.com";
|
||||||
|
return new com.aliyun.ecs20140526.Client(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args_) throws Exception {
|
||||||
|
java.util.List<String> args = java.util.Arrays.asList(args_);
|
||||||
|
com.aliyun.ecs20140526.Client client = Sample.createClient();
|
||||||
|
com.aliyun.ecs20140526.models.RunInstancesRequest runInstancesRequest = new com.aliyun.ecs20140526.models.RunInstancesRequest()
|
||||||
|
.setRegionId("cn-zhangjiakou")
|
||||||
|
.setLaunchTemplateName("basic_model")
|
||||||
|
.setLaunchTemplateId("lt-8vb71bkyjwcqmcd98ah4");
|
||||||
|
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
|
||||||
|
try {
|
||||||
|
// 复制代码运行请自行打印 API 的返回值
|
||||||
|
client.runInstancesWithOptions(runInstancesRequest, runtime);
|
||||||
|
} catch (TeaException error) {
|
||||||
|
// 此处仅做打印展示,请谨慎对待异常处理,在工程项目中切勿直接忽略异常。
|
||||||
|
// 错误 message
|
||||||
|
System.out.println(error.getMessage());
|
||||||
|
// 诊断地址
|
||||||
|
System.out.println(error.getData().get("Recommend"));
|
||||||
|
com.aliyun.teautil.Common.assertAsString(error.message);
|
||||||
|
} catch (Exception _error) {
|
||||||
|
TeaException error = new TeaException(_error.getMessage(), _error);
|
||||||
|
// 此处仅做打印展示,请谨慎对待异常处理,在工程项目中切勿直接忽略异常。
|
||||||
|
// 错误 message
|
||||||
|
System.out.println(error.getMessage());
|
||||||
|
// 诊断地址
|
||||||
|
// System.out.println(error.getData().get("Recommend"));
|
||||||
|
com.aliyun.teautil.Common.assertAsString(error.message);
|
||||||
|
}
|
||||||
|
System.out.println("实例创建成功");
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 用户控制层
|
* @description 用户控制层
|
||||||
* @date 2023/11/9
|
* @date 2023/11/9
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 车辆一键操作控制层
|
* @description 车辆一键操作控制层
|
||||||
* @date 2023/12/6
|
* @date 2023/12/6
|
||||||
|
|
|
@ -15,7 +15,7 @@ import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 车辆信息
|
* @description 车辆信息
|
||||||
* @date 2023/11/9
|
* @date 2023/11/9
|
||||||
|
|
|
@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 任务执行模型
|
* @description 任务执行模型
|
||||||
* @date 2023/12/4
|
* @date 2023/12/4
|
||||||
|
|
|
@ -6,7 +6,7 @@ import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 一键执行任务结果集
|
* @description 一键执行任务结果集
|
||||||
* @date 2023/12/5
|
* @date 2023/12/5
|
||||||
|
|
|
@ -8,7 +8,7 @@ import com.muyu.domain.Vehicle;
|
||||||
* 车辆 Mapper 接口
|
* 车辆 Mapper 接口
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @since 2022-07-05
|
* @since 2022-07-05
|
||||||
*/
|
*/
|
||||||
public interface VehicleMapper extends BaseMapper<Vehicle> {
|
public interface VehicleMapper extends BaseMapper<Vehicle> {
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.muyu.mq.rabbitmq;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName Custom
|
||||||
|
* @Description 描述
|
||||||
|
* @Author SaiSai.Liu
|
||||||
|
* @Date 2024/5/26 15:25
|
||||||
|
*/
|
||||||
|
public class Custom {
|
||||||
|
// @Autowired
|
||||||
|
// private RabbitTemplate rabbitTemplate;
|
||||||
|
|
||||||
|
}
|
|
@ -10,7 +10,7 @@ import com.muyu.domain.resp.UnifiedTaskResp;
|
||||||
import com.muyu.domain.resp.VehicleInstanceResp;
|
import com.muyu.domain.resp.VehicleInstanceResp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 车辆实例业务层
|
* @description 车辆实例业务层
|
||||||
* @date 2023/11/22
|
* @date 2023/11/22
|
||||||
|
|
|
@ -8,7 +8,7 @@ import com.muyu.domain.Vehicle;
|
||||||
* 车辆 服务类
|
* 车辆 服务类
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @since 2022-07-05
|
* @since 2022-07-05
|
||||||
*/
|
*/
|
||||||
public interface VehicleService extends IService<Vehicle> {
|
public interface VehicleService extends IService<Vehicle> {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.muyu.service;
|
||||||
import com.muyu.domain.resp.UnifiedTaskResp;
|
import com.muyu.domain.resp.UnifiedTaskResp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 一键设置业务层
|
* @description 一键设置业务层
|
||||||
* @date 2023/12/6
|
* @date 2023/12/6
|
||||||
|
|
|
@ -25,7 +25,7 @@ import java.util.stream.Stream;
|
||||||
* 车辆 服务实现类
|
* 车辆 服务实现类
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @since 2022-07-05
|
* @since 2022-07-05
|
||||||
*/
|
*/
|
||||||
@Log4j2
|
@Log4j2
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 车辆实例业务实现层
|
* @description 车辆实例业务实现层
|
||||||
* @date 2023/11/22
|
* @date 2023/11/22
|
||||||
|
|
|
@ -24,7 +24,7 @@ import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 一键设置业务实现层
|
* @description 一键设置业务实现层
|
||||||
* @date 2023/12/6
|
* @date 2023/12/6
|
||||||
|
|
|
@ -32,7 +32,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||||
import static com.muyu.common.SystemConstant.*;
|
import static com.muyu.common.SystemConstant.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 车辆实例
|
* @description 车辆实例
|
||||||
* @date 2023/11/16
|
* @date 2023/11/16
|
||||||
|
|
|
@ -17,7 +17,7 @@ import javax.annotation.PreDestroy;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description 配置
|
* @description 配置
|
||||||
* @date 2023/11/9
|
* @date 2023/11/9
|
||||||
|
|
|
@ -8,7 +8,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZeLiang
|
* @author Saisai.Liu
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description Mqtt配置类
|
* @description Mqtt配置类
|
||||||
* @date 2023/11/8
|
* @date 2023/11/8
|
||||||
|
|
Loading…
Reference in New Issue