Compare commits
80 Commits
Author | SHA1 | Date |
---|---|---|
|
6c2daa0d7e | |
|
5a64054615 | |
|
903fecc2cc | |
|
e46b6325c4 | |
|
217ffd81ab | |
|
b2c16300f4 | |
|
b07b7a1d2d | |
|
614ddceebc | |
|
a17d1b4557 | |
|
057ad3ded5 | |
|
1542f34db3 | |
|
87b3eccff5 | |
|
735e7f56e0 | |
|
af798f18e5 | |
|
0d82041676 | |
|
7a88f1da14 | |
|
b4f832925c | |
|
5ab005839c | |
|
6f52789cc0 | |
|
4aebd67ebc | |
|
207125c795 | |
|
3bf6f0d929 | |
|
f07d95abeb | |
|
f27b14dc33 | |
|
aedee04643 | |
|
1627aa3dab | |
|
fa3b9b2244 | |
|
8d7ad9cdb9 | |
|
13bb25f4da | |
|
25bc628f8f | |
|
5688271d2c | |
|
83312b8e37 | |
|
fa36d029af | |
|
07a60444aa | |
|
60b63b758e | |
|
b299c8d3a1 | |
|
ac21236123 | |
|
016887afc2 | |
|
52dbb5a08b | |
|
c415b7676f | |
|
5b1c1a27a9 | |
|
22b3d12010 | |
|
f6c1de2c6b | |
|
29c84f90ef | |
|
122049419c | |
|
1d8aea440b | |
|
49fe2961f0 | |
|
25ad7f9da0 | |
|
01aaf7f926 | |
|
1185868ce5 | |
|
0c7287f19d | |
|
803ea0fe80 | |
|
59b64e816c | |
|
4a094775d4 | |
|
66adba7bdc | |
|
6727b1896a | |
|
67988ff16f | |
|
178d4966b5 | |
|
c174e8adab | |
|
c66b84bc6c | |
|
ab2f94acbd | |
|
10981bc80d | |
|
97b20e395a | |
|
15b99b27c4 | |
|
3d8b02a00e | |
|
347018d602 | |
|
833e554722 | |
|
5edc2a8c05 | |
|
e8377904b5 | |
|
b227854496 | |
|
41918d6303 | |
|
86eb16420b | |
|
10b63954a4 | |
|
19ca5b409f | |
|
6f17adbcf3 | |
|
97d5dac0a2 | |
|
b3ce3825ad | |
|
6a413e0ce0 | |
|
f07a9bd208 | |
|
3c7ba5744d |
|
@ -12,6 +12,8 @@ out
|
|||
######################################################################
|
||||
# IDE
|
||||
|
||||
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
|
@ -26,6 +28,7 @@ logs
|
|||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
*.yml
|
||||
|
||||
### JRebel ###
|
||||
rebel.xml
|
||||
|
|
|
@ -30,6 +30,10 @@ public class RegisterBody extends LoginBody {
|
|||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phoneNumber;
|
||||
private String phonenumber;
|
||||
/**
|
||||
* 公司注册人名称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
}
|
||||
|
|
|
@ -127,10 +127,18 @@ public class SysLoginService {
|
|||
|
||||
// 注册用户信息
|
||||
SysUser sysUser = new SysUser();
|
||||
//公司账号
|
||||
sysUser.setUserName(registerBody.getUsername());
|
||||
//公司邮箱
|
||||
sysUser.setEmail(registerBody.getEmail());
|
||||
sysUser.setPhonenumber(registerBody.getPhoneNumber());
|
||||
//公司号码
|
||||
sysUser.setPhonenumber(registerBody.getPhonenumber());
|
||||
//密码
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(registerBody.getPassword()));
|
||||
//公司注册人名称
|
||||
sysUser.setNickName(registerBody.getNickName());
|
||||
//企业名称
|
||||
sysUser.setFirmName(registerBody.getFirmName());
|
||||
Result<?> registerResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
||||
|
||||
if (Result.FAIL == registerResult.getCode()) {
|
||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
|||
addr: 159.75.188.178:8848
|
||||
user-name: nacos
|
||||
password: nacos
|
||||
namespace: eight
|
||||
namespace: xxy
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
|
|
|
@ -501,4 +501,5 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>cloud-common-kafka</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.kafka</groupId>
|
||||
<artifactId>kafka-clients</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 项目公共核心 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,54 @@
|
|||
package com.muyu.common.kafka.config;
|
||||
|
||||
import com.muyu.common.kafka.constants.KafkaConstants;
|
||||
import org.apache.kafka.clients.consumer.KafkaConsumer;
|
||||
import org.apache.kafka.common.serialization.Deserializer;
|
||||
import org.apache.kafka.common.serialization.StringDeserializer;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* kafka 消息的消费者 配置类
|
||||
*/
|
||||
@Configuration
|
||||
public class KafkaConsumerConfig {
|
||||
|
||||
@Bean
|
||||
public KafkaConsumer kafkaConsumer() {
|
||||
Map<String, Object> configs = new HashMap<>();
|
||||
//kafka服务端的IP和端口,格式:(ip:port)
|
||||
configs.put("bootstrap.servers", "60.204.221.52:9092");
|
||||
//开启consumer的偏移量(offset)自动提交到Kafka
|
||||
configs.put("enable.auto.commit", true);
|
||||
//consumer的偏移量(offset) 自动提交的时间间隔,单位毫秒
|
||||
configs.put("auto.commit.interval", 5000);
|
||||
//在Kafka中没有初始化偏移量或者当前偏移量不存在情况
|
||||
//earliest, 在偏移量无效的情况下, 自动重置为最早的偏移量
|
||||
//latest, 在偏移量无效的情况下, 自动重置为最新的偏移量
|
||||
//none, 在偏移量无效的情况下, 抛出异常.
|
||||
configs.put("auto.offset.reset", "latest");
|
||||
//请求阻塞的最大时间(毫秒)
|
||||
configs.put("fetch.max.wait", 500);
|
||||
//请求应答的最小字节数
|
||||
configs.put("fetch.min.size", 1);
|
||||
//心跳间隔时间(毫秒)
|
||||
configs.put("heartbeat-interval", 3000);
|
||||
//一次调用poll返回的最大记录条数
|
||||
configs.put("max.poll.records", 500);
|
||||
//指定消费组
|
||||
configs.put("group.id", KafkaConstants.KafkaGrop);
|
||||
//指定key使用的反序列化类
|
||||
Deserializer keyDeserializer = new StringDeserializer();
|
||||
//指定value使用的反序列化类
|
||||
Deserializer valueDeserializer = new StringDeserializer();
|
||||
//创建Kafka消费者
|
||||
KafkaConsumer kafkaConsumer = new KafkaConsumer(configs, keyDeserializer, valueDeserializer);
|
||||
return kafkaConsumer;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.muyu.common.kafka.config;
|
||||
|
||||
import org.apache.kafka.clients.producer.KafkaProducer;
|
||||
import org.apache.kafka.common.serialization.Serializer;
|
||||
import org.apache.kafka.common.serialization.StringSerializer;
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* kafka 消息的生产者 配置类
|
||||
*/
|
||||
@Configuration
|
||||
public class KafkaProviderConfig {
|
||||
|
||||
@Bean
|
||||
public KafkaProducer kafkaProducer() {
|
||||
Map<String, Object> configs = new HashMap<>();
|
||||
//#kafka服务端的IP和端口,格式:(ip:port)
|
||||
configs.put("bootstrap.servers", "47.116.173.119:9092");
|
||||
//客户端发送服务端失败的重试次数
|
||||
configs.put("retries", 2);
|
||||
//多个记录被发送到同一个分区时,生产者将尝试将记录一起批处理成更少的请求.
|
||||
//此设置有助于提高客户端和服务器的性能,配置控制默认批量大小(以字节为单位)
|
||||
configs.put("batch.size", 16384);
|
||||
//生产者可用于缓冲等待发送到服务器的记录的总内存字节数(以字节为单位)
|
||||
configs.put("buffer-memory", 33554432);
|
||||
//生产者producer要求leader节点在考虑完成请求之前收到的确认数,用于控制发送记录在服务端的持久化
|
||||
//acks=0,设置为0,则生产者producer将不会等待来自服务器的任何确认.该记录将立即添加到套接字(socket)缓冲区并视为已发送.在这种情况下,无法保证服务器已收到记录,并且重试配置(retries)将不会生效(因为客户端通常不会知道任何故障),每条记录返回的偏移量始终设置为-1.
|
||||
//acks=1,设置为1,leader节点会把记录写入本地日志,不需要等待所有follower节点完全确认就会立即应答producer.在这种情况下,在follower节点复制前,leader节点确认记录后立即失败的话,记录将会丢失.
|
||||
//acks=all,acks=-1,leader节点将等待所有同步复制副本完成再确认记录,这保证了只要至少有一个同步复制副本存活,记录就不会丢失.
|
||||
configs.put("acks", "-1");
|
||||
//指定key使用的序列化类
|
||||
Serializer keySerializer = new StringSerializer();
|
||||
//指定value使用的序列化类
|
||||
Serializer valueSerializer = new StringSerializer();
|
||||
//创建Kafka生产者
|
||||
KafkaProducer kafkaProducer = new KafkaProducer(configs, keySerializer, valueSerializer);
|
||||
return kafkaProducer;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.muyu.common.kafka.constants;
|
||||
|
||||
|
||||
public class KafkaConstants {
|
||||
|
||||
public final static String KafkaTopic = "carJsons";
|
||||
|
||||
// public final static String KafkaGrop = "kafka_grop";
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.muyu.kafkaconfig;
|
||||
|
||||
import org.apache.kafka.clients.consumer.KafkaConsumer;
|
||||
import org.apache.kafka.clients.producer.KafkaProducer;
|
||||
import org.apache.kafka.common.serialization.StringDeserializer;
|
||||
import org.apache.kafka.common.serialization.StringSerializer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.config.kafkaconfig
|
||||
* @Project:cloud-server-8
|
||||
* @name:KafkaConfig
|
||||
* @Date:2024/9/28 12:19
|
||||
*/
|
||||
@Configuration
|
||||
public class KafkaConfig {
|
||||
|
||||
@Bean
|
||||
public KafkaProducer kafkaProducer(){
|
||||
HashMap<String, Object> configs = new HashMap<>();
|
||||
configs.put("bootstrap.servers","60.204.221.52:9092");
|
||||
configs.put("retries",2);
|
||||
configs.put("batch.size",16384);
|
||||
//生产者可用于缓冲等待发送到服务器的记录的总内存字节数
|
||||
configs.put("buffer-memory",3554432);
|
||||
/**
|
||||
* ,用于控制发送记录在服务端的持久化
|
||||
*acks=0,设置为0,则生产者producer将不会等待来自服务器的任何确认.该记录将立即添加到套接字(socket)缓冲区并视为已发送
|
||||
* .在这种情况下,无法保证服务器已收到记录,并且重试配置(retries)将不会生效(因为客户端通常不会知道任何故障),每条记录返回的偏移量始终设置为-1.
|
||||
*acks=1,设置为1,leader节点会把记录写入本地日志,不需要等待所有follower节点完全确认就会立即应答producer.在这种情况下,
|
||||
* 在follower节点复制前,leader节点确认记录后立即失败的话,记录将会丢失.
|
||||
*/
|
||||
configs.put("acks","-1");
|
||||
//指定key使用的序列化类
|
||||
StringSerializer keySerializer = new StringSerializer();
|
||||
//指定value使用的序列化类
|
||||
StringSerializer valueSerializer = new StringSerializer();
|
||||
//创建kafka生产者
|
||||
return new KafkaProducer(configs, keySerializer, valueSerializer);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public KafkaConsumer kafkaConsumer(){
|
||||
HashMap<String, Object> configs = new HashMap<>();
|
||||
configs.put("bootstrap.servers","60.204.221.52:9092");
|
||||
//开启consumer的偏移量(offset)自动提交到kafka
|
||||
configs.put("enable.auto.commit",true);
|
||||
//偏移量自动提交的时间间隔,单位毫秒
|
||||
configs.put("auto.commit.interval",5000);
|
||||
//在Kafka中没有初始化偏移量或者当前偏移量不存在情况
|
||||
//earliest, 在偏移量无效的情况下, 自动重置为最早的偏移量
|
||||
//latest, 在偏移量无效的情况下, 自动重置为最新的偏移量
|
||||
//none, 在偏移量无效的情况下, 抛出异常.
|
||||
configs.put("auto.offset.reset","latest");
|
||||
//请求阻塞的最大时间(毫秒)
|
||||
configs.put("fetch.max.wait",500);
|
||||
//请求应答的最小字节数
|
||||
configs.put("fetch.min.size",1);
|
||||
//心跳间隔时间(毫秒)
|
||||
configs.put("heartbeat-interval",3000);
|
||||
//一次调用poll返回的最大记录条数
|
||||
configs.put("max.poll.records",500);
|
||||
//指定消费组
|
||||
configs.put("group.id","firstGroup");
|
||||
//指定key使用的反序列化类
|
||||
StringDeserializer keyDeserializer = new StringDeserializer();
|
||||
//指定value使用的反序列化类
|
||||
StringDeserializer valueDeserializer = new StringDeserializer();
|
||||
//创建kafka消费者
|
||||
return new KafkaConsumer(configs,keyDeserializer,valueDeserializer);
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
com.muyu.kafkaconfig.KafkaConfig
|
|
@ -87,7 +87,6 @@ public class SysUser extends BaseEntity {
|
|||
* 企业ID
|
||||
*/
|
||||
private Integer firmId;
|
||||
|
||||
/**
|
||||
* 所属数据库
|
||||
*/
|
||||
|
@ -145,6 +144,12 @@ public class SysUser extends BaseEntity {
|
|||
*/
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
* @param userId
|
||||
*/
|
||||
private String firmName;
|
||||
|
||||
public SysUser (Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>cloud-common-wechat</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>cloud-common-wechat</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- MuYu Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>2.1.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 帮助将java对象转换为xml字符串-->
|
||||
<!-- 依赖冲突会导致InaccessibleObjectException异常更新到适用版本-->
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.4.20</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Alibaba Fastjson -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.83</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,23 @@
|
|||
package com.muyu.common.wechat.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 24415
|
||||
*/
|
||||
@Data
|
||||
public class AccessToken {
|
||||
|
||||
private String access_token;
|
||||
|
||||
private Long expires_in;
|
||||
|
||||
public void setExpiresTime(Long expiresIn) {
|
||||
this.expires_in = System.currentTimeMillis()+expiresIn*1000;
|
||||
}
|
||||
|
||||
public boolean isExpired(Long expiresIn){
|
||||
long now = System.currentTimeMillis();
|
||||
return now>expiresIn;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.muyu.common.wechat.domain;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:Articles
|
||||
* @Date:2024/9/18 下午10:14
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("item")
|
||||
public class Articles {
|
||||
// <Articles>
|
||||
// <item>
|
||||
// <Title><![CDATA[title1]]></Title>
|
||||
// <Description><![CDATA[description1]]></Description>
|
||||
// <PicUrl><![CDATA[picurl]]></PicUrl>
|
||||
// <Url><![CDATA[url]]></Url>
|
||||
// </item>
|
||||
// </Articles>
|
||||
|
||||
@XStreamAlias("Title")
|
||||
private String title ;
|
||||
@XStreamAlias("Description")
|
||||
private String description ;
|
||||
@XStreamAlias("PicUrl")
|
||||
private String picUrl ;
|
||||
@XStreamAlias("Url")
|
||||
private String url ;
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package com.muyu.common.wechat.domain;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:ImageText
|
||||
* @Date:2024/9/18 下午9:27
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("xml")
|
||||
public class NewsMessage {
|
||||
// <ToUserName><![CDATA[toUser]]></ToUserName>
|
||||
// <FromUserName><![CDATA[fromUser]]></FromUserName>
|
||||
// <CreateTime>12345678</CreateTime>
|
||||
// <MsgType><![CDATA[news]]></MsgType>
|
||||
// <ArticleCount>1</ArticleCount>
|
||||
// <Articles>
|
||||
// <item>
|
||||
// <Title><![CDATA[title1]]></Title>
|
||||
// <Description><![CDATA[description1]]></Description>
|
||||
// <PicUrl><![CDATA[picurl]]></PicUrl>
|
||||
// <Url><![CDATA[url]]></Url>
|
||||
// </item>
|
||||
// </Articles>
|
||||
|
||||
@XStreamAlias("ToUserName")
|
||||
private String toUserName ;
|
||||
@XStreamAlias("FromUserName")
|
||||
private String fromUserName ;
|
||||
@XStreamAlias("CreateTime")
|
||||
private long createTime ;
|
||||
@XStreamAlias("MsgType")
|
||||
private String msgType ;
|
||||
@XStreamAlias("ArticleCount")
|
||||
private Integer articleCount ;
|
||||
@XStreamAlias("Articles")
|
||||
private List<Articles> articles ;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.common.wechat.domain;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:TextMessage
|
||||
* @Date:2024/9/18 上午11:33
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("xml")
|
||||
public class TextMessage {
|
||||
|
||||
//起一个别名 因为我们微信返回信息与java代码格式规范发生冲突
|
||||
//微信格式 ToUserName
|
||||
//JAVA格式 toUserName
|
||||
@XStreamAlias("ToUserName")
|
||||
private String toUserName;
|
||||
@XStreamAlias("FromUserName")
|
||||
private String fromUserName;
|
||||
@XStreamAlias("CreateTime")
|
||||
private long createTime;
|
||||
@XStreamAlias("MsgType")
|
||||
private String msgType;
|
||||
@XStreamAlias("Content")
|
||||
private String content;
|
||||
|
||||
}
|
||||
// <ToUserName><![CDATA[toUser]]></ToUserName>
|
||||
// <FromUserName><![CDATA[fromUser]]></FromUserName>
|
||||
// <CreateTime>12345678</CreateTime>
|
||||
// <MsgType><![CDATA[text]]></MsgType>
|
||||
// <Content><![CDATA[你好]]></Content>
|
|
@ -0,0 +1,38 @@
|
|||
package com.muyu;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
|
@ -21,6 +21,8 @@
|
|||
<module>cloud-common-xxl</module>
|
||||
<module>cloud-common-rabbit</module>
|
||||
<module>cloud-common-saas</module>
|
||||
<module>cloud-common-wechat</module>
|
||||
<module>cloud-common-kafka</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>cloud-common</artifactId>
|
||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
|||
addr: 159.75.188.178:8848
|
||||
user-name: nacos
|
||||
password: nacos
|
||||
namespace: eight
|
||||
namespace: xxy
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
|
|
|
@ -9,14 +9,17 @@
|
|||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>cloud-test</artifactId>
|
||||
<artifactId>cloud-modules-carData</artifactId>
|
||||
|
||||
<description>
|
||||
数据处理模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
|
@ -72,5 +75,29 @@
|
|||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-api-doc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
<version>2.9.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-kafka</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.iotdb</groupId>
|
||||
<artifactId>iotdb-session</artifactId>
|
||||
<version>0.13.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-rabbit</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,24 @@
|
|||
package com.muyu.carData;
|
||||
|
||||
import com.muyu.carData.listener.MyListener;
|
||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarDataApplication
|
||||
* @Date:2024/9/26 15:33
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableMyFeignClients
|
||||
public class CarDataApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication application = new SpringApplication(CarDataApplication.class);
|
||||
application.addListeners(new MyListener());
|
||||
application.run(args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.muyu.carData.config.cacheconfig;
|
||||
import com.github.benmanes.caffeine.cache.Expiry;
|
||||
import org.checkerframework.checker.index.qual.NonNegative;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.cacheconfig
|
||||
* @Project:cloud-server-8
|
||||
* @name:CacheExpiry
|
||||
* @Date:2024/9/26 23:46
|
||||
*/
|
||||
public class CacheExpiry implements Expiry<String,ExpiryTime>{
|
||||
@Override
|
||||
public long expireAfterCreate(String key, ExpiryTime value, long currentTime) {
|
||||
return TimeUnit.SECONDS.toNanos(value.getExpiryTime());
|
||||
}
|
||||
|
||||
@Override
|
||||
public long expireAfterUpdate(String key, ExpiryTime value, long currentTime, @NonNegative long currentDuration) {
|
||||
return TimeUnit.SECONDS.toNanos(value.getRefreshTime());
|
||||
}
|
||||
|
||||
@Override
|
||||
public long expireAfterRead(String key, ExpiryTime value, long currentTime, @NonNegative long currentDuration) {
|
||||
return TimeUnit.SECONDS.toNanos(value.getRefreshTime());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.muyu.carData.config.cacheconfig;
|
||||
|
||||
import com.github.benmanes.caffeine.cache.Cache;
|
||||
import com.github.benmanes.caffeine.cache.Caffeine;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.cacheconfig
|
||||
* @Project:cloud-server-8
|
||||
* @name:CaffeineConfig
|
||||
* @Date:2024/9/26 23:51
|
||||
*/
|
||||
@Configuration
|
||||
public class CaffeineConfig {
|
||||
|
||||
@Bean
|
||||
public Cache<String, ? extends ExpiryTime> caffeineCache(){
|
||||
CacheExpiry cacheExpiry = new CacheExpiry();
|
||||
return Caffeine.newBuilder()
|
||||
.expireAfter(cacheExpiry)
|
||||
.initialCapacity(128)
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.muyu.carData.config.cacheconfig;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.cacheconfig
|
||||
* @Project:cloud-server-8
|
||||
* @name:ExpiryTime
|
||||
* @Date:2024/9/26 23:44
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ExpiryTime {
|
||||
|
||||
/**
|
||||
* 过期时间单位(秒)默认30分钟
|
||||
*/
|
||||
@Builder.Default
|
||||
private long expiryTime = 30 * 60;
|
||||
|
||||
/**
|
||||
* 刷新时间单位(秒) 默认15分钟
|
||||
*/
|
||||
@Builder.Default
|
||||
private long refreshTime = 15 * 60;
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package com.muyu.carData.config.lotdbconfig;
|
||||
|
||||
import org.apache.iotdb.rpc.IoTDBConnectionException;
|
||||
import org.apache.iotdb.session.Session;
|
||||
import org.apache.iotdb.session.pool.SessionPool;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.lotdbconfig
|
||||
* @Project:cloud-server-8
|
||||
* @name:IotDBSessionConfig
|
||||
* @Date:2024/9/27 12:25
|
||||
* IotDB线程池
|
||||
*/
|
||||
@Component
|
||||
@Configuration
|
||||
public class IotDBSessionConfig {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(IotDBSessionConfig.class);
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@Value("${spring.iotdb.username}")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@Value("${spring.iotdb.password}")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* ip地址
|
||||
*/
|
||||
@Value("${spring.iotdb.ip}")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 端口号
|
||||
*/
|
||||
@Value("${spring.iotdb.port}")
|
||||
private Integer port;
|
||||
|
||||
/**
|
||||
* 最大连接数
|
||||
*/
|
||||
@Value("${spring.iotdb.maxSize}")
|
||||
private Integer maxSize;
|
||||
|
||||
|
||||
/**
|
||||
* 默认每次查询的条数
|
||||
*/
|
||||
@Value("${spring.iotdb.fetchSize}")
|
||||
private int fetchSize;
|
||||
|
||||
|
||||
@Bean
|
||||
public Session iotSession(){
|
||||
Session session = new Session(ip, port, username, password);
|
||||
try {
|
||||
session.open();
|
||||
} catch (IoTDBConnectionException e) {
|
||||
logger.error(String.valueOf(e.getCause()));
|
||||
}
|
||||
return session;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package com.muyu.carData.consumer;
|
||||
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.nacos.shaded.com.google.common.collect.Lists;
|
||||
import com.muyu.carData.pojo.Student;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
||||
import org.apache.kafka.clients.consumer.ConsumerRecords;
|
||||
import org.apache.kafka.clients.consumer.KafkaConsumer;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
|
||||
/**卡夫卡消费者
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.consumer
|
||||
* @Project:cloud-server-8
|
||||
* @name:MyKafkaConsumer
|
||||
* @Date:2024/9/26 15:42
|
||||
*/
|
||||
@Component
|
||||
@Log4j2
|
||||
public class MyKafkaConsumer implements InitializingBean {
|
||||
|
||||
@Autowired
|
||||
private KafkaConsumer kafkaConsumer;
|
||||
|
||||
private final String topicName = "carJsons";
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
log.info("启动线程开始监听topic:{}",topicName);
|
||||
Thread thread = new Thread(() -> {
|
||||
ThreadUtil.sleep(1000);
|
||||
Collection<String> topics = Lists.newArrayList(topicName);
|
||||
kafkaConsumer.subscribe(topics);
|
||||
while (true){
|
||||
ConsumerRecords<String,String> consumerRecords = kafkaConsumer.poll(Duration.ofMillis(1000));
|
||||
for (ConsumerRecord<String, String> consumerRecord : consumerRecords) {
|
||||
//从consumerRecord中获取消费数据
|
||||
String value = consumerRecord.value();
|
||||
log.info("从Kafka中消费的原始数据===============>>:{}",value);
|
||||
}
|
||||
}
|
||||
});
|
||||
thread.start();
|
||||
|
||||
log.info("启动线程结束监听topic:{}",topicName);
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.muyu.carData.controller;
|
||||
|
||||
import com.github.benmanes.caffeine.cache.Cache;
|
||||
import com.muyu.carData.config.cacheconfig.CaffeineConfig;
|
||||
import com.muyu.carData.pojo.Student;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.controller
|
||||
* @Project:cloud-server-8
|
||||
* @name:TestController
|
||||
* @Date:2024/9/26 23:56
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/testCache")
|
||||
@Log4j2
|
||||
public class CacheController {
|
||||
|
||||
@Autowired
|
||||
private CaffeineConfig caffeineConfig;
|
||||
|
||||
@RequestMapping("/caffeine")
|
||||
public String caffeine() throws InterruptedException {
|
||||
Cache<String, Student> stringCache = (Cache<String, Student>) caffeineConfig.caffeineCache();
|
||||
Student build = Student.builder().id(1)
|
||||
.name("小马")
|
||||
.sex("男")
|
||||
.expiryTime(20 * 60)
|
||||
.refreshTime(15 * 30)
|
||||
.build();
|
||||
stringCache.put("1", build);
|
||||
Thread.sleep(1000);
|
||||
//返回缓存的个数
|
||||
log.info(stringCache.estimatedSize());
|
||||
//返回缓存的数据
|
||||
log.info(stringCache.getIfPresent("1"));
|
||||
return "111";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
package com.muyu.carData.controller;
|
||||
|
||||
import com.muyu.carData.config.lotdbconfig.IotDBSessionConfig;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.iotdb.rpc.IoTDBConnectionException;
|
||||
import org.apache.iotdb.rpc.StatementExecutionException;
|
||||
import org.apache.iotdb.session.Session;
|
||||
import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
|
||||
import org.apache.iotdb.tsfile.write.record.Tablet;
|
||||
import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.testcontroller
|
||||
* @Project:cloud-server-8
|
||||
* @name:IotDBController
|
||||
* @Date:2024/9/28 23:58
|
||||
*/
|
||||
@RequestMapping("/iotdb")
|
||||
@RestController
|
||||
@Log4j2
|
||||
public class IotDBController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private IotDBSessionConfig iotDBSessionConfig;
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
* @param insertSize 每次插入的条数
|
||||
* @param count 插入的总条数
|
||||
* @return
|
||||
* @throws IoTDBConnectionException
|
||||
* @throws StatementExecutionException
|
||||
*/
|
||||
@GetMapping("/insertData/{insertSize}/{count}")
|
||||
public String insert(@PathVariable(name = "insertSize") int insertSize,@PathVariable(name = "count") int count) throws IoTDBConnectionException, StatementExecutionException {
|
||||
Session session = iotDBSessionConfig.iotSession();
|
||||
//schemaList 属性及类型
|
||||
List<MeasurementSchema> schemaList = new ArrayList<>();
|
||||
schemaList.add(new MeasurementSchema("id", TSDataType.INT32));
|
||||
schemaList.add(new MeasurementSchema("name", TSDataType.TEXT));
|
||||
schemaList.add(new MeasurementSchema("sex", TSDataType.TEXT));
|
||||
|
||||
//tablet 封装数据
|
||||
Tablet tablet = new Tablet("root.yang.baling", schemaList);
|
||||
|
||||
//以当前时间戳作为插入的起始时间戳
|
||||
long timestamp = System.currentTimeMillis();
|
||||
long beginTime = System.currentTimeMillis();
|
||||
for (long row = 0;row < count; row++){
|
||||
int rowIndex = tablet.rowSize++;
|
||||
tablet.addTimestamp(rowIndex,timestamp); //批量插入的时间戳是数组形式,所以需要使用rowIndex来指定插入的位置
|
||||
tablet.addValue("id", rowIndex, ((row & 1) == 0 ? 1 : 0));
|
||||
tablet.addValue("name", rowIndex, "name<=>" + row);
|
||||
tablet.addValue("sex", rowIndex, "男");
|
||||
if (tablet.rowSize == insertSize){
|
||||
long bg = System.currentTimeMillis();
|
||||
session.insertTablet(tablet);
|
||||
tablet.reset();
|
||||
log.info("已经插入了"+(row + 1)+",插入耗时:" + (System.currentTimeMillis() - bg));
|
||||
}
|
||||
timestamp++;
|
||||
}
|
||||
|
||||
if (tablet.rowSize != 0){
|
||||
session.insertTablet(tablet);
|
||||
log.info("插入完成,耗时:" + (System.currentTimeMillis() - beginTime));
|
||||
tablet.reset();
|
||||
}
|
||||
long endTime = System.currentTimeMillis();
|
||||
log.info("插入了"+insertSize+"条数据,每次插入"+count+"条数据,总耗时:"+(endTime - beginTime));
|
||||
return "时序性数据库测试success";
|
||||
}
|
||||
|
||||
|
||||
/* @GetMapping("/batchInsertRecords/{num}")
|
||||
public String batchInsertRecords(@PathVariable Integer num){
|
||||
String deviceId = "root.yang";
|
||||
|
||||
//属性(字段)
|
||||
List<String> schemaList = new ArrayList<>();
|
||||
schemaList.add("id");
|
||||
schemaList.add("name");
|
||||
schemaList.add("age");
|
||||
|
||||
ArrayList<TSDataType> tsDataTypes = new ArrayList<>();
|
||||
tsDataTypes.add(TSDataType.INT32);
|
||||
tsDataTypes.add(TSDataType.TEXT);
|
||||
tsDataTypes.add(TSDataType.INT32);
|
||||
|
||||
List<Object> value = new ArrayList<>();
|
||||
value.add(1);
|
||||
value.add("张腾");
|
||||
value.add(18);
|
||||
|
||||
ArrayList<String> deviceIds = new ArrayList<>();
|
||||
ArrayList<Long> times = new ArrayList<>();
|
||||
ArrayList<List<TSDataType>> typeList = new ArrayList<>();
|
||||
ArrayList<List<Object>> valueList = new ArrayList<>();
|
||||
for (int i = 0; i < num; i++) {
|
||||
deviceIds.add()
|
||||
}
|
||||
}*/
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.muyu.carData.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.kafka.clients.producer.KafkaProducer;
|
||||
import org.apache.kafka.clients.producer.ProducerRecord;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.testcontroller
|
||||
* @Project:cloud-server-8
|
||||
* @name:KafkaProducerController
|
||||
* @Date:2024/9/28 15:10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/produce")
|
||||
@Log4j2
|
||||
public class KafkaProducerController {
|
||||
|
||||
@Autowired
|
||||
private KafkaProducer kafkaProducer;
|
||||
|
||||
private final String topicName = "carJsons";
|
||||
|
||||
@GetMapping("/producer")
|
||||
public String produceTest(JSONObject data) {
|
||||
try {
|
||||
log.info("Topic:{}", topicName);
|
||||
log.info("转换为JSON:{}",data);
|
||||
//使用KafkaProducer发送消息
|
||||
ProducerRecord<String, String> stringProducerRecord = new ProducerRecord(topicName, data);
|
||||
kafkaProducer.send(stringProducerRecord);
|
||||
}catch (Exception e){
|
||||
log.error("Producer写入Topic异常,异常信息是:{}",e.getMessage());
|
||||
}
|
||||
return "消息发送成功";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.muyu.carData.event;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
/**自定义事件
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.event
|
||||
* @Project:cloud-server-8
|
||||
* @name:EsSaveEvent
|
||||
* @Date:2024/9/29 21:15
|
||||
*/
|
||||
public class EsSaveEvent extends ApplicationEvent {
|
||||
|
||||
private JSONObject data;
|
||||
|
||||
|
||||
public EsSaveEvent(JSONObject source) {
|
||||
super(source);
|
||||
this.data = source;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.muyu.carData.listener;
|
||||
|
||||
import com.muyu.carData.event.EsSaveEvent;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.listener
|
||||
* @Project:cloud-server-8
|
||||
* @name:CustomEventListener
|
||||
* @Date:2024/9/29 23:49
|
||||
*/
|
||||
@Component
|
||||
public class CustomEventListener {
|
||||
|
||||
@EventListener
|
||||
public void handMyEvent(EsSaveEvent event){
|
||||
//处理事件详情
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.muyu.carData.listener;
|
||||
|
||||
import com.muyu.carData.event.EsSaveEvent;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
|
||||
/**自定义监听器
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.listener
|
||||
* @Project:cloud-server-8
|
||||
* @name:MyListener
|
||||
* @Date:2024/9/29 21:18
|
||||
*/
|
||||
@Log4j2
|
||||
public class MyListener implements ApplicationListener<EsSaveEvent> {
|
||||
@Override
|
||||
public void onApplicationEvent(EsSaveEvent event) {
|
||||
log.info("监听到自定义事件........");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.muyu.carData.pojo;
|
||||
|
||||
import com.muyu.carData.config.cacheconfig.ExpiryTime;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.pojo
|
||||
* @Project:cloud-server-8
|
||||
* @name:Student
|
||||
* @Date:2024/9/27 0:40
|
||||
*/
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class Student extends ExpiryTime{
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 插入时间
|
||||
*/
|
||||
private long time = System.currentTimeMillis();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.muyu.carData.pulisher;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.muyu.carData.event.EsSaveEvent;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**事件发布测试
|
||||
* @Author:张腾
|
||||
* @Package:com.muyu.carData.pulisher
|
||||
* @Project:cloud-server-8
|
||||
* @name:CustomEventPublisher
|
||||
* @Date:2024/9/29 23:51
|
||||
*/
|
||||
@Log4j2
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class CustomEventPublisher {
|
||||
|
||||
private ApplicationEventPublisher applicationEventPublisher;
|
||||
|
||||
public void publish(JSONObject data){
|
||||
EsSaveEvent esSaveEvent = new EsSaveEvent(data);
|
||||
applicationEventPublisher.publishEvent(esSaveEvent);
|
||||
log.info("事件发布成功 - 消息是:{}",data);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
|
@ -0,0 +1,63 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9702
|
||||
|
||||
# nacos线上地址
|
||||
nacos:
|
||||
addr: 159.75.188.178:8848
|
||||
user-name: nacos
|
||||
password: nacos
|
||||
namespace: eight
|
||||
# SPRING_AMQP_DESERIALIZATION_TRUST_ALL=true spring.amqp.deserialization.trust.all
|
||||
# Spring
|
||||
spring:
|
||||
iotdb:
|
||||
username: root
|
||||
password: root
|
||||
ip: 60.204.221.52
|
||||
port: 6667
|
||||
maxSize: 100
|
||||
fetchSize: 10000
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
application:
|
||||
# 应用名称
|
||||
name: cloud-carData
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: ${nacos.addr}
|
||||
# nacos用户名
|
||||
username: ${nacos.user-name}
|
||||
# nacos密码
|
||||
password: ${nacos.password}
|
||||
# 命名空间
|
||||
namespace: ${nacos.namespace}
|
||||
config:
|
||||
# 服务注册地址
|
||||
server-addr: ${nacos.addr}
|
||||
# nacos用户名
|
||||
username: ${nacos.user-name}
|
||||
# nacos密码
|
||||
password: ${nacos.password}
|
||||
# 命名空间
|
||||
namespace: ${nacos.namespace}
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
# 系统共享配置
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# 系统环境Config共享配置
|
||||
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# xxl-job 配置文件
|
||||
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# rabbit 配置文件
|
||||
- application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
logging:
|
||||
level:
|
||||
com.muyu.system.mapper: DEBUG
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/cloud-carData"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.muyu" level="info"/>
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn"/>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console"/>
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info"/>
|
||||
<appender-ref ref="file_error"/>
|
||||
</root>
|
||||
</configuration>
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/cloud-carData"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.sky.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 使用gRpc将日志发送到skywalking服务端 -->
|
||||
<appender name="GRPC_LOG" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
||||
<Pattern>${log.sky.pattern}</Pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.muyu" level="info"/>
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn"/>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="GRPC_LOG"/>
|
||||
<appender-ref ref="console"/>
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info"/>
|
||||
<appender-ref ref="file_error"/>
|
||||
</root>
|
||||
</configuration>
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/cloud-carData"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.sky.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 使用gRpc将日志发送到skywalking服务端 -->
|
||||
<appender name="GRPC_LOG" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
||||
<Pattern>${log.sky.pattern}</Pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.muyu" level="info"/>
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn"/>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="GRPC_LOG"/>
|
||||
<appender-ref ref="console"/>
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info"/>
|
||||
<appender-ref ref="file_error"/>
|
||||
</root>
|
||||
</configuration>
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-modules-enterprise</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>cloud-modules-enterprise-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<description>
|
||||
cloud-modules-enterprise-common 企业业务common
|
||||
</description>
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- MuYu Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations-jakarta</artifactId>
|
||||
<version>2.2.8</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>2.1.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.4.20</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.83</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-system</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,25 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 连接微信服务器(微信公众号)
|
||||
*/
|
||||
@Data
|
||||
@Tag(name = "连接微信服务器")
|
||||
public class AccessToken {
|
||||
|
||||
private String access_token;
|
||||
|
||||
private Long expires_in;
|
||||
|
||||
public void setExpiresTime(Long expiresIn) {
|
||||
this.expires_in = System.currentTimeMillis()+expiresIn*1000;
|
||||
}
|
||||
|
||||
public boolean isExpired(Long expiresIn){
|
||||
long now = System.currentTimeMillis();
|
||||
return now>expiresIn;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 发送图文回复消息内容(微信公众号)
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:Articles
|
||||
* @Date:2024/9/18 下午10:14
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("item")
|
||||
@Tag(name = "发送图文回复消息内容")
|
||||
public class Articles {
|
||||
// <Articles>
|
||||
// <item>
|
||||
// <Title><![CDATA[title1]]></Title>
|
||||
// <Description><![CDATA[description1]]></Description>
|
||||
// <PicUrl><![CDATA[picurl]]></PicUrl>
|
||||
// <Url><![CDATA[url]]></Url>
|
||||
// </item>
|
||||
// </Articles>
|
||||
|
||||
@XStreamAlias("Title")
|
||||
private String title ;
|
||||
@XStreamAlias("Description")
|
||||
private String description ;
|
||||
@XStreamAlias("PicUrl")
|
||||
private String picUrl ;
|
||||
@XStreamAlias("Url")
|
||||
private String url ;
|
||||
|
||||
}
|
|
@ -0,0 +1,213 @@
|
|||
package com.muyu.domain;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
/**
|
||||
*
|
||||
* 故障规则测试类(故障)
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.faultrule
|
||||
* @Project:cloud-server-8
|
||||
* @name:PureElectricCar
|
||||
* @Date:2024/9/20 20:22
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name = "故障规则测试类")
|
||||
public class CarFaultRule {
|
||||
|
||||
/**
|
||||
* VIN码VIN码VIN码
|
||||
*/
|
||||
private String vin;
|
||||
/**
|
||||
* 时间戳时间戳时间戳
|
||||
*/
|
||||
private long timestamp;
|
||||
/**
|
||||
* 经度经度经度
|
||||
*/
|
||||
private double longitude;
|
||||
/**
|
||||
* 纬度纬度纬度
|
||||
*/
|
||||
private double latitude;
|
||||
/**
|
||||
* 车速车速车速
|
||||
*/
|
||||
private double speed;
|
||||
/**
|
||||
* 总里程总里程总里程
|
||||
*/
|
||||
private Long tm;
|
||||
/**
|
||||
* 总电压总电压总电压
|
||||
*/
|
||||
private double tv;
|
||||
/**
|
||||
* 总电流总电流总电流
|
||||
*/
|
||||
private double cc;
|
||||
/**
|
||||
* 绝缘电阻绝缘电阻绝缘电阻
|
||||
*/
|
||||
private double ir;
|
||||
/**
|
||||
* 档位档位档位
|
||||
*/
|
||||
private String gp;
|
||||
/**
|
||||
* 加速踏板行程值加速踏板行程值加速踏板行程值
|
||||
*/
|
||||
private double aptv;
|
||||
/**
|
||||
* 制动踏板行程值制动踏板行程值制动踏板行程值
|
||||
*/
|
||||
private double bptv;
|
||||
/**
|
||||
* 燃料消耗率燃料消耗率燃料消耗率
|
||||
*/
|
||||
private double sfc;
|
||||
/**
|
||||
* 电机控制器温度电机控制器温度电机控制器温度
|
||||
*/
|
||||
private double mct;
|
||||
/**
|
||||
* 电机转速电机转速电机转速
|
||||
*/
|
||||
private int ms;
|
||||
/**
|
||||
* 电机转矩电机转矩电机转矩
|
||||
*/
|
||||
private double mto;
|
||||
/**
|
||||
* 电机温度电机温度电机温度
|
||||
*/
|
||||
private double mte;
|
||||
/**
|
||||
* 电机电压电机电压电机电压
|
||||
*/
|
||||
private double mv;
|
||||
/**
|
||||
* 电机电流电机电流电机电流
|
||||
*/
|
||||
private double mc;
|
||||
/**
|
||||
* 动力电池剩余电量SOC动力电池剩余电量SOC动力电池剩余电量SOC
|
||||
*/
|
||||
private double pbrsoc;
|
||||
/**
|
||||
* 当前状态允许的最大反馈功率当前状态允许的最大反馈功率当前状态允许的最大反馈功率
|
||||
*/
|
||||
private double macsfp;
|
||||
/**
|
||||
* 当前状态允许最大放电功率当前状态允许最大放电功率当前状态允许最大放电功率
|
||||
*/
|
||||
private double csatmdp;
|
||||
/**
|
||||
* BMS自检计数器BMS自检计数器BMS自检计数器
|
||||
*/
|
||||
private int bms;
|
||||
/**
|
||||
* 动力电池充放电电流动力电池充放电电流动力电池充放电电流
|
||||
*/
|
||||
private double cadc;
|
||||
/**
|
||||
* 动力电池负载端总电压V3动力电池负载端总电压V3动力电池负载端总电压V3
|
||||
*/
|
||||
private double pbletvv3;
|
||||
/**
|
||||
* 单次最大电压单次最大电压单次最大电压
|
||||
*/
|
||||
private double smv;
|
||||
/**
|
||||
* 单体电池最低电压单体电池最低电压单体电池最低电压
|
||||
*/
|
||||
private double mvoab;
|
||||
/**
|
||||
* 单体电池最高温度单体电池最高温度单体电池最高温度
|
||||
*/
|
||||
private double maxbt;
|
||||
/**
|
||||
* 单体电池最低温度单体电池最低温度单体电池最低温度
|
||||
*/
|
||||
private double minbt;
|
||||
/**
|
||||
* 动力电池可用容量动力电池可用容量动力电池可用容量
|
||||
*/
|
||||
private double pbac;
|
||||
/**
|
||||
* 车辆状态车辆状态车辆状态
|
||||
*/
|
||||
private String vs;
|
||||
/**
|
||||
* 充电状态充电状态充电状态
|
||||
*/
|
||||
private String cs;
|
||||
/**
|
||||
* 运行状态运行状态运行状态
|
||||
*/
|
||||
private String rs;
|
||||
/**
|
||||
* SOCSOCSOC
|
||||
*/
|
||||
private double soc;
|
||||
/**
|
||||
* 可充电储能装置工作状态可充电储能装置工作状态可充电储能装置工作状态
|
||||
*/
|
||||
private String resdwc;
|
||||
/**
|
||||
* EASEASEAS
|
||||
*/
|
||||
private String eas;
|
||||
/**
|
||||
* PTCPTCPTC
|
||||
*/
|
||||
private String ptc;
|
||||
/**
|
||||
* EPSEPSEPS
|
||||
*/
|
||||
private String eps;
|
||||
/**
|
||||
* ABSABSABS
|
||||
*/
|
||||
private String abs;
|
||||
/**
|
||||
* MCUMCUMCU
|
||||
*/
|
||||
private String mcu;
|
||||
/**
|
||||
* 动力电池加热状态动力电池加热状态动力电池加热状态
|
||||
*/
|
||||
private String pbhs;
|
||||
/**
|
||||
* 动力电池当前状态动力电池当前状态动力电池当前状态
|
||||
*/
|
||||
private String pbcs;
|
||||
/**
|
||||
* 动力电池保温状态动力电池保温状态动力电池保温状态
|
||||
*/
|
||||
private String pbis;
|
||||
/**
|
||||
* DCDCDCDCDCDC
|
||||
*/
|
||||
private String dcdc;
|
||||
/**
|
||||
* CHGCHGCHG
|
||||
*/
|
||||
private String chg;
|
||||
/**
|
||||
* 校验位校验位校验位
|
||||
*/
|
||||
private byte chb;
|
||||
/**
|
||||
* 截止位截止位截止位
|
||||
*/
|
||||
private byte cub;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电子围栏类
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFence
|
||||
* @Date:2024/9/17 16:08
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "电子围栏类")
|
||||
@TableName(value = "car_fence",autoResultMap = true)
|
||||
public class CarFence {
|
||||
|
||||
/**
|
||||
* 围栏主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 业务类型ID
|
||||
*/
|
||||
private Integer clazzId;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String clazzName;
|
||||
/**
|
||||
* 围栏类型ID
|
||||
*/
|
||||
private Integer typeId;
|
||||
/**
|
||||
* 围栏类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
/**
|
||||
* 围栏经纬度
|
||||
*/
|
||||
private String fenceText;
|
||||
/**
|
||||
* 围栏开始时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceStart;
|
||||
/**
|
||||
* 围栏结束时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceEnd;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy/MM/dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy/MM/dd hh:mm:ss")
|
||||
private Date fenceCreate;
|
||||
/**
|
||||
* 中间表ID
|
||||
*/
|
||||
private Integer middleId;
|
||||
/**
|
||||
* 围栏组
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<CarFenceGroup> carFenceGroups;
|
||||
|
||||
public static CarFence carFenceBuild(CarFence carFence) {
|
||||
return CarFence.builder()
|
||||
.id(carFence.getId())
|
||||
.name(carFence.getName())
|
||||
.clazzId(carFence.getClazzId())
|
||||
.typeId(carFence.getTypeId())
|
||||
.fenceText(carFence.getFenceText())
|
||||
.fenceStart(carFence.getFenceStart())
|
||||
.fenceCreate(carFence.getFenceCreate())
|
||||
.middleId(carFence.getMiddleId())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 电子围栏业务类型
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFenceClazz
|
||||
* @Date:2024/9/17 16:41
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "电子业务类型")
|
||||
@TableName(value = "car_fence_clazz",autoResultMap = true)
|
||||
public class CarFenceClazz {
|
||||
/**
|
||||
* 业务类型ID
|
||||
*/
|
||||
private Integer clazzId;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
private String clazzName;
|
||||
|
||||
public static CarFenceClazz carFenceClazzBuild(CarFenceClazz carFenceClazz) {
|
||||
return CarFenceClazz.builder()
|
||||
.clazzId(carFenceClazz.getClazzId())
|
||||
.clazzName(carFenceClazz.getClazzName())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 电子围栏组类
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:carFenceGroup
|
||||
* @Date:2024/9/22 10:20
|
||||
*/
|
||||
//weilabzu
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "电子围栏组类")
|
||||
@TableName(value = "car_fence_group",autoResultMap = true)
|
||||
public class CarFenceGroup {
|
||||
|
||||
/**
|
||||
* 围栏组ID
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
private Integer priority;
|
||||
/**
|
||||
* 启动状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 围栏组类型
|
||||
*/
|
||||
private String groupType;
|
||||
|
||||
public static CarFenceGroup carFenceBuild(CarFenceGroup carFenceGroup) {
|
||||
return CarFenceGroup.builder()
|
||||
.id(carFenceGroup.getId())
|
||||
.priority(carFenceGroup.getPriority())
|
||||
.status(carFenceGroup.getStatus())
|
||||
.groupType(carFenceGroup.getGroupType())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 电子围栏类型
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-electronic
|
||||
* @name:Type
|
||||
* @Date:2024/9/17 16:40
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "电子围栏类型")
|
||||
@TableName(value = "car_fence_type",autoResultMap = true)
|
||||
public class CarFenceType {
|
||||
/**
|
||||
* 围栏类型ID
|
||||
*/
|
||||
private Integer typeId;
|
||||
/**
|
||||
* 围栏类型名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
public static CarFenceType carFenceTypeBuild(CarFenceType carFenceType) {
|
||||
return CarFenceType.builder()
|
||||
.typeId(carFenceType.getTypeId())
|
||||
.typeName(carFenceType.getTypeName())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.domain.req.CarInformationAddReq;
|
||||
import com.muyu.domain.req.CarInformationUpdReq;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* 企业车辆管理实体类
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarInformation
|
||||
* @Date:2024/9/22 22:18
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name = "企业车辆管理实体类")
|
||||
@TableName(value = "car_information",autoResultMap = true)
|
||||
public class CarInformation {
|
||||
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
@TableId(value = "car_information_id",type = IdType.AUTO)
|
||||
private Long carInformationId;
|
||||
/**
|
||||
* 车辆唯一VIN
|
||||
*/
|
||||
// @TableName(value = "car_information_VIN")
|
||||
@TableField(value = "car_information_VIN")
|
||||
private String carInformationVIN;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carInformationLicensePlate;
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
private String carInformationColor;
|
||||
/**
|
||||
* 车辆驾驶员
|
||||
*/
|
||||
private String carInformationDriver;
|
||||
/**
|
||||
* 车辆电子围栏外键ID
|
||||
*/
|
||||
@Schema(title = "车辆电子围栏外键ID", type = "Integer")
|
||||
private Integer carInformationFence;
|
||||
/**
|
||||
* 车检到期日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
|
||||
private Date carInformationExamineEnddata;
|
||||
/**
|
||||
* 车辆类型外键ID
|
||||
*/
|
||||
@Schema(title = "车辆类型外键ID", type = "Integer")
|
||||
private Integer carInformationType;
|
||||
/**
|
||||
* 车辆品牌
|
||||
*/
|
||||
private String carInformationBrand;
|
||||
/**
|
||||
* 是否重点车辆 (0否默认 1是 )
|
||||
*/
|
||||
private Integer carInformationFocus;
|
||||
|
||||
/**
|
||||
* 车辆电机厂商
|
||||
*/
|
||||
private String carInformationMotorManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电机型号
|
||||
*/
|
||||
private String carInformationMotorModel;
|
||||
|
||||
/**
|
||||
* 车辆电池厂商
|
||||
*/
|
||||
private String carInformationBatteryManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电池型号
|
||||
*/
|
||||
private String carInformationBatteryModel;
|
||||
|
||||
/**
|
||||
* 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)
|
||||
*/
|
||||
private Integer carInformationState;
|
||||
|
||||
public static CarInformation carInformationBuilder(CarInformation carInformation) {
|
||||
return CarInformation.builder()
|
||||
.carInformationId(carInformation.getCarInformationId())
|
||||
.carInformationLicensePlate(carInformation.getCarInformationLicensePlate())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static CarInformation carInformationUpdBuilder(CarInformationUpdReq carInformation, Supplier<Long> idSupplier) {
|
||||
return CarInformation.builder()
|
||||
.carInformationId(idSupplier.get())
|
||||
.carInformationBrand(carInformation.getCarInformationBrand())
|
||||
.carInformationColor(carInformation.getCarInformationColor())
|
||||
.carInformationDriver(carInformation.getCarInformationDriver())
|
||||
.carInformationMotorManufacturer(carInformation.getCarInformationMotorManufacturer())
|
||||
.carInformationMotorModel(carInformation.getCarInformationMotorModel())
|
||||
.carInformationBatteryManufacturer(carInformation.getCarInformationBatteryManufacturer())
|
||||
.carInformationBatteryModel(carInformation.getCarInformationBatteryModel())
|
||||
.carInformationFence(carInformation.getCarInformationFence())
|
||||
.carInformationType(carInformation.getCarInformationType())
|
||||
.carInformationFocus(carInformation.getCarInformationFocus())
|
||||
.carInformationMotorModel(carInformation.getCarInformationMotorModel())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static CarInformation carInformationAddBuilder(CarInformationAddReq carInformation) {
|
||||
return CarInformation.builder()
|
||||
.carInformationVIN(carInformation.getCarInformationVIN())
|
||||
.carInformationLicensePlate(carInformation.getCarInformationLicensePlate())
|
||||
.carInformationBrand(carInformation.getCarInformationBrand())
|
||||
.carInformationColor(carInformation.getCarInformationColor())
|
||||
.carInformationDriver(carInformation.getCarInformationDriver())
|
||||
.carInformationMotorManufacturer(carInformation.getCarInformationMotorManufacturer())
|
||||
.carInformationMotorModel(carInformation.getCarInformationMotorModel())
|
||||
.carInformationBatteryManufacturer(carInformation.getCarInformationBatteryManufacturer())
|
||||
.carInformationBatteryModel(carInformation.getCarInformationBatteryModel())
|
||||
.carInformationFence(carInformation.getCarInformationFence())
|
||||
.carInformationType(carInformation.getCarInformationType())
|
||||
.carInformationMotorModel(carInformation.getCarInformationMotorModel())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* 车辆报文模板实体类
|
||||
*
|
||||
* @author 17353
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "车辆报文模板实体类")
|
||||
@TableName(value = "car_message", autoResultMap = true)
|
||||
public class CarMessage {
|
||||
//报文类型模块表
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Long messageTypeId;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
/**
|
||||
* 报文名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs;
|
||||
|
||||
//报文拆分位置主表
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Long carMessageId;
|
||||
/**
|
||||
* 车辆类型外键
|
||||
*/
|
||||
private Integer carMessageCartype;
|
||||
/**
|
||||
* 车辆报文类型外键
|
||||
*/
|
||||
private Integer carMessageType;
|
||||
/**
|
||||
* 开始位下标
|
||||
*/
|
||||
private Integer carMessageStartIndex;
|
||||
/**
|
||||
* 结束位下标
|
||||
*/
|
||||
private Integer carMessageEndIndex;
|
||||
/**
|
||||
* 报文数据类型 (固定值 区间随机值)
|
||||
*/
|
||||
private String messageTypeClass;
|
||||
/**
|
||||
* 报文是否开启故障检测(0默认未开启 1开启)
|
||||
*/
|
||||
private Integer carMessageState;
|
||||
|
||||
private String carMessageName;
|
||||
|
||||
/**
|
||||
* 修改方法
|
||||
*
|
||||
* @param carMessage
|
||||
* @param supplier
|
||||
* @return
|
||||
*/
|
||||
public static CarMessage carMessageUpdBuilder(CarMessage carMessage, Supplier<Long> supplier) {
|
||||
return CarMessage.builder()
|
||||
.messageTypeId(supplier.get())
|
||||
.messageTypeCode(carMessage.messageTypeCode)
|
||||
.messageTypeName(carMessage.messageTypeName)
|
||||
.messageTypeBelongs(carMessage.messageTypeBelongs)
|
||||
.carMessageId(carMessage.carMessageId)
|
||||
.carMessageCartype(carMessage.carMessageCartype)
|
||||
.carMessageType(carMessage.carMessageType)
|
||||
.carMessageStartIndex(carMessage.carMessageStartIndex)
|
||||
.carMessageEndIndex(carMessage.carMessageEndIndex)
|
||||
.messageTypeClass(carMessage.messageTypeClass)
|
||||
.carMessageState(carMessage.carMessageState)
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加方法
|
||||
*
|
||||
* @param carMessage
|
||||
* @return
|
||||
*/
|
||||
public static CarMessage carMessageAddBuilder(CarMessage carMessage) {
|
||||
return CarMessage.builder()
|
||||
.messageTypeCode(carMessage.messageTypeCode)
|
||||
.messageTypeName(carMessage.messageTypeName)
|
||||
.messageTypeBelongs(carMessage.messageTypeBelongs)
|
||||
.carMessageId(carMessage.carMessageId)
|
||||
.carMessageCartype(carMessage.carMessageCartype)
|
||||
.carMessageType(carMessage.carMessageType)
|
||||
.carMessageStartIndex(carMessage.carMessageStartIndex)
|
||||
.carMessageEndIndex(carMessage.carMessageEndIndex)
|
||||
.messageTypeClass(carMessage.messageTypeClass)
|
||||
.carMessageState(carMessage.carMessageState)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
private Long messageTypeId ;
|
||||
private String messageTypeCode ;
|
||||
private String messageTypeName ;
|
||||
private String messageTypeBelongs ;
|
||||
private String messageTypeClass ;
|
||||
private Long carMessageId ;
|
||||
private Integer carMessageCartype ;
|
||||
private Integer carMessageType ;
|
||||
private Integer carMessageStartIndex ;
|
||||
private Integer carMessageEndIndex ;
|
||||
private Integer carMessageState ;
|
||||
*/
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆报文所属类型
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain.car
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarMessage
|
||||
* @Date:2024/9/22 下午3:07
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆报文所属类型")
|
||||
@TableName(value = "car_message_type",autoResultMap = true)
|
||||
public class CarMessageType {
|
||||
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Integer messageTypeId ;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode ;
|
||||
/**
|
||||
* 报文名称
|
||||
*/
|
||||
private String messageTypeName ;
|
||||
/**
|
||||
* 报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs ;
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆电子组中间表
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-electronic
|
||||
* @name:carMiddle
|
||||
* @Date:2024/9/20 16:30
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "车辆电子组中间表")
|
||||
@TableName(value = "car_middle",autoResultMap = true)
|
||||
public class CarMiddle {
|
||||
|
||||
/**
|
||||
* 中间表ID
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 电子围栏ID
|
||||
*/
|
||||
private Integer fenceGroupId;
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
private Long carInformationId;
|
||||
|
||||
public CarMiddle(Integer fenceGroupId, Long carInformationId) {
|
||||
this.fenceGroupId = fenceGroupId;
|
||||
this.carInformationId = carInformationId;
|
||||
}
|
||||
|
||||
public static CarMiddle carMiddleBuilder(CarMiddle carMiddle) {
|
||||
return CarMiddle.builder()
|
||||
.id(carMiddle.getId())
|
||||
.fenceGroupId(carMiddle.getFenceGroupId())
|
||||
.carInformationId(carMiddle.getCarInformationId())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 围栏组中间表围栏
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:carMiddleGroup
|
||||
* @Date:2024/9/22 10:35
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "围栏组中间表围栏")
|
||||
@TableName(value = "car_middle_group",autoResultMap = true)
|
||||
public class CarMiddleGroup {
|
||||
|
||||
/**
|
||||
* 中间ID
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 围栏ID
|
||||
*/
|
||||
private Integer carFenceId;
|
||||
/**
|
||||
* 围栏组
|
||||
*/
|
||||
private Integer fenceGroupId;
|
||||
|
||||
public CarMiddleGroup(Integer carFenceId, Integer fenceGroupId) {
|
||||
this.carFenceId = carFenceId;
|
||||
this.fenceGroupId = fenceGroupId;
|
||||
}
|
||||
|
||||
public static CarMiddleGroup carMiddleGroupBuilder(CarMiddleGroup carMiddleGroup) {
|
||||
return CarMiddleGroup.builder()
|
||||
.id(carMiddleGroup.getId())
|
||||
.carFenceId(carMiddleGroup.getCarFenceId())
|
||||
.fenceGroupId(carMiddleGroup.getFenceGroupId())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 车辆类型
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarType
|
||||
* @Date:2024/9/21 19:01
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_type",autoResultMap = true)
|
||||
@Tag(name ="车辆类型表")
|
||||
public class CarType {
|
||||
|
||||
/**
|
||||
* 车辆类型ID
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
* 车辆类型名
|
||||
*/
|
||||
private String carTypeName;
|
||||
/**
|
||||
* 车辆规则外键ID
|
||||
*/
|
||||
private long carTypeRules;
|
||||
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.domain.req.FaultCodeAddReq;
|
||||
import com.muyu.domain.req.FaultCodeUpdReq;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultCode
|
||||
* @Date:2024/9/17 14:55
|
||||
*/
|
||||
/**
|
||||
* 故障码
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_faultcode",autoResultMap = true)
|
||||
@Tag(name = "故障码")
|
||||
public class FaultCode {
|
||||
|
||||
/**
|
||||
*故障码Id
|
||||
*/
|
||||
@TableId(value = "faultcode_id",type = IdType.AUTO)
|
||||
private long faultcodeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
*故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
*故障组
|
||||
*/
|
||||
private String faultGroup;
|
||||
/**
|
||||
*故障位
|
||||
*/
|
||||
private String faultBit;
|
||||
/**
|
||||
*故障值
|
||||
*/
|
||||
private String faultValue;
|
||||
/**
|
||||
*是否警告
|
||||
*/
|
||||
private Integer isWarning;
|
||||
/**
|
||||
*故障类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String faulttypeName;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String messageTypeCode;
|
||||
/**
|
||||
*报文所属类别
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String messageTypeBelongs;
|
||||
|
||||
|
||||
public static FaultCode addfaultcode(FaultCodeAddReq faultCodeAddReq){
|
||||
return FaultCode.builder()
|
||||
.faultcodeId(0)
|
||||
.messageTypeId(faultCodeAddReq.getMessageTypeId())
|
||||
.faultcodeNumber(faultCodeAddReq.getFaultcodeNumber())
|
||||
.faultGroup(faultCodeAddReq.getFaultGroup())
|
||||
.faultBit(faultCodeAddReq.getFaultBit())
|
||||
.faultValue(faultCodeAddReq.getFaultValue())
|
||||
.isWarning(faultCodeAddReq.getIsWarning())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static FaultCode updfaultcode(FaultCodeUpdReq faultCodeUpdReq){
|
||||
return FaultCode.builder()
|
||||
.faultcodeId(0)
|
||||
.messageTypeId(faultCodeUpdReq.getMessageTypeId())
|
||||
.faultcodeNumber(faultCodeUpdReq.getFaultcodeNumber())
|
||||
.faultGroup(faultCodeUpdReq.getFaultGroup())
|
||||
.faultBit(faultCodeUpdReq.getFaultBit())
|
||||
.faultValue(faultCodeUpdReq.getFaultValue())
|
||||
.isWarning(faultCodeUpdReq.getIsWarning())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
public static FaultCode faultCodeBuilder(FaultCode faultCode) {
|
||||
return FaultCode.builder()
|
||||
.faultcodeId(faultCode.getFaultcodeId())
|
||||
.messageTypeId(faultCode.getMessageTypeId())
|
||||
.faultcodeNumber(faultCode.getFaultcodeNumber())
|
||||
.faultGroup(faultCode.faultGroup)
|
||||
.faultBit(faultCode.faultBit)
|
||||
.faultValue(faultCode.faultValue)
|
||||
.isWarning(faultCode.isWarning)
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.domain.req.FaultConditionAddReq;
|
||||
import com.muyu.domain.req.FaultConditionUpdReq;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* 故障规则
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultCondition
|
||||
* @Date:2024/9/21 19:51
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_fault_condition",autoResultMap = true)
|
||||
@Tag(name = "故障规则")
|
||||
public class FaultCondition {
|
||||
/**
|
||||
* 故障规则表Id
|
||||
*/
|
||||
@TableId(value = "carcondition_id",type = IdType.AUTO)
|
||||
private long carconditionId;
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障条件
|
||||
*/
|
||||
private String faultconditionIdentification;
|
||||
/**
|
||||
* 故障规则参数
|
||||
*/
|
||||
private BigDecimal faultconditionParameter;
|
||||
/**
|
||||
* 车辆类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String carTypeName;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String messageTypeCode;
|
||||
|
||||
|
||||
public static FaultCondition faultConditionadd(FaultConditionAddReq faultConditionAddReq){
|
||||
return FaultCondition.builder()
|
||||
.carTypeId(faultConditionAddReq.getCarTypeId())
|
||||
.messageTypeId(faultConditionAddReq.getMessageTypeId())
|
||||
.faultconditionIdentification(faultConditionAddReq.getFaultconditionIdentification())
|
||||
.faultconditionParameter(faultConditionAddReq.getFaultconditionParameter())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static FaultCondition faultConditionupd(FaultConditionUpdReq faultConditionUpdReq, Supplier<Long> idSupplier){
|
||||
return FaultCondition.builder()
|
||||
.carconditionId(faultConditionUpdReq.getCarconditionId())
|
||||
.carTypeId(faultConditionUpdReq.getCarTypeId())
|
||||
.messageTypeId(faultConditionUpdReq.getMessageTypeId())
|
||||
.faultconditionIdentification(faultConditionUpdReq.getFaultconditionIdentification())
|
||||
.faultconditionParameter(faultConditionUpdReq.getFaultconditionParameter())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.domain.req.FaultCodeAddReq;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 故障标签
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultLabel
|
||||
* @Date:2024/9/17 15:06
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_fault_label",autoResultMap = true)
|
||||
@Tag(name = "故障标签")
|
||||
public class FaultLabel {
|
||||
/**
|
||||
*自增主键
|
||||
*/
|
||||
@TableId(value = "message_type_id",type = IdType.AUTO)
|
||||
private long messageTypeId;
|
||||
/**
|
||||
*报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
/**
|
||||
*报文名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
*报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs;
|
||||
|
||||
|
||||
public static FaultLabel addfaultLabel(FaultCodeAddReq faultCodeAddReq){
|
||||
return FaultLabel.builder()
|
||||
.messageTypeId(0)
|
||||
.messageTypeId(faultCodeAddReq.getMessageTypeId())
|
||||
.messageTypeCode(faultCodeAddReq.getMessageTypeCode())
|
||||
.messageTypeName(faultCodeAddReq.getMessageTypeName())
|
||||
.messageTypeBelongs(faultCodeAddReq.getMessageTypeBelongs())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 故障日志
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultLog
|
||||
* @Date:2024/9/19 0:42
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_fault_log",autoResultMap = true)
|
||||
@Tag(name = "故障日志")
|
||||
public class FaultLog {
|
||||
|
||||
/**
|
||||
* 故障日志Id
|
||||
*/
|
||||
@TableId(value = "log_id",type = IdType.AUTO)
|
||||
private long logId;
|
||||
/**
|
||||
* 故障码Id
|
||||
*/
|
||||
private long faultcodeId;
|
||||
/**
|
||||
* 车辆Id
|
||||
*/
|
||||
private long carInformationId;
|
||||
/**
|
||||
* 车辆VIN
|
||||
*/
|
||||
private String carVin;
|
||||
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
* 车辆VIN
|
||||
*/
|
||||
private String carInformationVIN;
|
||||
/**
|
||||
* 开始报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "开始报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date startwarningTime;
|
||||
/**
|
||||
* 结束报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "结束报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date endwarningTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 故障类型
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultType
|
||||
* @Date:2024/9/17 15:03
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_fault_type",autoResultMap = true)
|
||||
public class FaultType {
|
||||
/**
|
||||
*故障类型Id
|
||||
*/
|
||||
@TableId(value = "faulttype_id",type = IdType.AUTO)
|
||||
private long faulttypeId;
|
||||
/**
|
||||
*故障类型名称
|
||||
*/
|
||||
private String faulttypeName;
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 企业名称
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.firmmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:Firm
|
||||
* @Date:2024/9/27 12:29
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class Firm {
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
@TableId(value = "firm_id")
|
||||
private Long firmId;
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String firmName;
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String databaseName;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class KafKaData {
|
||||
private String key;
|
||||
private String type;
|
||||
private String label;
|
||||
private String value;
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.domain ;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 图文信息(微信公众号)
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:ImageText
|
||||
* @Date:2024/9/18 下午9:27
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("xml")
|
||||
@Tag(name = "图文信息")
|
||||
public class NewsMessage {
|
||||
// <ToUserName><![CDATA[toUser]]></ToUserName>
|
||||
// <FromUserName><![CDATA[fromUser]]></FromUserName>
|
||||
// <CreateTime>12345678</CreateTime>
|
||||
// <MsgType><![CDATA[news]]></MsgType>
|
||||
// <ArticleCount>1</ArticleCount>
|
||||
// <Articles>
|
||||
// <item>
|
||||
// <Title><![CDATA[title1]]></Title>
|
||||
// <Description><![CDATA[description1]]></Description>
|
||||
// <PicUrl><![CDATA[picurl]]></PicUrl>
|
||||
// <Url><![CDATA[url]]></Url>
|
||||
// </item>
|
||||
// </Articles>
|
||||
|
||||
@XStreamAlias("ToUserName")
|
||||
private String toUserName ;
|
||||
@XStreamAlias("FromUserName")
|
||||
private String fromUserName ;
|
||||
@XStreamAlias("CreateTime")
|
||||
private long createTime ;
|
||||
@XStreamAlias("MsgType")
|
||||
private String msgType ;
|
||||
@XStreamAlias("ArticleCount")
|
||||
private Integer articleCount ;
|
||||
@XStreamAlias("Articles")
|
||||
private List<Articles> articles ;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.firmmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:SysUser
|
||||
* @Date:2024/9/28 22:37
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name = "用户信息")
|
||||
@TableName("sys_user")
|
||||
public class SysUser extends BaseEntity {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableId(value = "user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 用户类型(00系统用户)
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 用户邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phonenumber;
|
||||
|
||||
/**
|
||||
* 用户性别(0男 1女 2未知)
|
||||
*/
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 头像地址
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 最后登录IP
|
||||
*/
|
||||
private String loginIp;
|
||||
|
||||
/**
|
||||
* 最后登录时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date loginDate;
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String databaseName;
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
private Long firmId;
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String firmName;
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.common.wechat.domain;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 文本信息(微信公众号)
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.wxapplication.massage
|
||||
* @Project:WXApplication
|
||||
* @name:TextMessage
|
||||
* @Date:2024/9/18 上午11:33
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XStreamAlias("xml")
|
||||
@Tag(name = "文本信息")
|
||||
public class TextMessage {
|
||||
|
||||
//起一个别名 因为我们微信返回信息与java代码格式规范发生冲突
|
||||
//微信格式 ToUserName
|
||||
//JAVA格式 toUserName
|
||||
@XStreamAlias("ToUserName")
|
||||
private String toUserName;
|
||||
@XStreamAlias("FromUserName")
|
||||
private String fromUserName;
|
||||
@XStreamAlias("CreateTime")
|
||||
private long createTime;
|
||||
@XStreamAlias("MsgType")
|
||||
private String msgType;
|
||||
@XStreamAlias("Content")
|
||||
private String content;
|
||||
|
||||
}
|
||||
// <ToUserName><![CDATA[toUser]]></ToUserName>
|
||||
// <FromUserName><![CDATA[fromUser]]></FromUserName>
|
||||
// <CreateTime>12345678</CreateTime>
|
||||
// <MsgType><![CDATA[text]]></MsgType>
|
||||
// <Content><![CDATA[你好]]></Content>
|
|
@ -0,0 +1,32 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 故障查询信息结果返回对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:Vehicle
|
||||
* @Date:2024/9/20 20:44
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name = "故障查询信息结果返回对象")
|
||||
public class Vehicle {
|
||||
/**
|
||||
* 车辆VIN 唯一标识
|
||||
*/
|
||||
private String VIN;
|
||||
/**
|
||||
* 故障信息
|
||||
*/
|
||||
private String faultmessage;
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 预警日志
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:WarnLogs
|
||||
* @Date:2024/9/20 下午7:11
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("warn_logs")
|
||||
@Tag(name = "预警日志")
|
||||
public class WarnLogs {
|
||||
|
||||
/**
|
||||
* 预警日志id
|
||||
*/
|
||||
@Excel(name = "预警日志id", cellType = Excel.ColumnType.NUMERIC)
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 车辆vin码
|
||||
*/
|
||||
@Excel(name = "车辆vin码")
|
||||
private String vin;
|
||||
/**
|
||||
* 规则id
|
||||
*/
|
||||
@Excel(name = "规则id")
|
||||
private Long warnRuleId;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@Excel(name = "开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime ;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@Excel(name = "结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime ;
|
||||
/**
|
||||
* 最大值
|
||||
*/
|
||||
@Excel(name = "最大值")
|
||||
private Long maxValue ;
|
||||
/**
|
||||
* 最小值
|
||||
*/
|
||||
@Excel(name = "最小值")
|
||||
private Long minValue ;
|
||||
/**
|
||||
* 平均值
|
||||
*/
|
||||
@Excel(name = "平均值")
|
||||
private Long avgValue ;
|
||||
/**
|
||||
* 中位数
|
||||
*/
|
||||
@Excel(name = "中位数")
|
||||
private Long medianValue ;
|
||||
/**
|
||||
* 是否发送预警
|
||||
*/
|
||||
@Excel(name = "是否发送预警")
|
||||
private Long status ;
|
||||
// /**
|
||||
// * 创建人
|
||||
// */
|
||||
// @Excel(name = "创建人")
|
||||
// private String createBy ;
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// @Excel(name = "创建时间")
|
||||
// private String createTime ;
|
||||
// /**
|
||||
// * 更新人
|
||||
// */
|
||||
// @Excel(name = "更新人")
|
||||
// private String updateBy ;
|
||||
// /**
|
||||
// * 更新时间
|
||||
// */
|
||||
// @Excel(name = "更新时间")
|
||||
// private String updateTime ;
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 预警规则
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:WarnRule
|
||||
* @Date:2024/9/20 下午7:20
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("warn_rule")
|
||||
@Tag(name = "预警规则")
|
||||
public class WarnRule {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String ruleName;
|
||||
private Long strategyId;
|
||||
private Long msgTypeId;
|
||||
private Long slideTime;
|
||||
private Long slideFrequency;
|
||||
private Long maxValue;
|
||||
private Long minValue;
|
||||
// /**
|
||||
// * 创建人
|
||||
// */
|
||||
// private String createBy ;
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// private String createTime ;
|
||||
// /**
|
||||
// * 更新人
|
||||
// */
|
||||
// private String updateBy ;
|
||||
// /**
|
||||
// * 更新时间
|
||||
// */
|
||||
// private String updateTime ;
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 预警策略
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain
|
||||
* @Project:cloud-server-8
|
||||
* @name:WarnStrategy
|
||||
* @Date:2024/9/20 下午7:27
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("warn_strategy")
|
||||
@Tag(name = "预警策略")
|
||||
public class WarnStrategy {
|
||||
|
||||
/**
|
||||
* 策略Id
|
||||
*/
|
||||
@TableId( type = IdType.AUTO)
|
||||
private Long id;
|
||||
private Long carTypeId ;
|
||||
private String strategyName ;
|
||||
private Long msgId ;
|
||||
|
||||
// /**
|
||||
// * 创建人
|
||||
// */
|
||||
// private String createBy ;
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// private String createTime ;
|
||||
// /**
|
||||
// * 更新人
|
||||
// */
|
||||
// private String updateBy ;
|
||||
// /**
|
||||
// * 更新时间
|
||||
// */
|
||||
// private String updateTime ;
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.muyu.domain.message;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 站内信
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.message
|
||||
* @Project:cloud-server-8
|
||||
* @name:Message
|
||||
* @Date:2024/9/22 10:40
|
||||
*/
|
||||
|
||||
@Tag(name = "站内信")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "car_fault_message",autoResultMap = true)
|
||||
public class Message {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private long id;
|
||||
|
||||
/**
|
||||
* 发送者
|
||||
*/
|
||||
private String sender;
|
||||
|
||||
/**
|
||||
* 接收者
|
||||
*/
|
||||
private String receiver;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 消息状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "消息创建时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 登录人Id
|
||||
*/
|
||||
private long userId;
|
||||
|
||||
|
||||
public static Message messageBuilder(Message message) {
|
||||
return Message.builder()
|
||||
.id(message.getId())
|
||||
.sender(message.getSender())
|
||||
.receiver(message.getReceiver())
|
||||
.content(message.getContent())
|
||||
.status(message.getStatus())
|
||||
.createTime(message.getCreateTime())
|
||||
.userId(message.getUserId())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.muyu.domain.message;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 消息状态
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.message
|
||||
* @Project:cloud-server-8
|
||||
* @name:MessageReq
|
||||
* @Date:2024/9/22 11:00
|
||||
*/
|
||||
|
||||
@Tag(name = "消息状态")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class MessageReq {
|
||||
/**
|
||||
* 消息状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 登录人Id
|
||||
*/
|
||||
private long userId;
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.muyu.domain.message;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 消息发送参数
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.message
|
||||
* @Project:cloud-server-8
|
||||
* @name:MessageReq
|
||||
* @Date:2024/9/22 11:00
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "消息发送参数")
|
||||
public class MessageSendReq {
|
||||
/**
|
||||
* 发送者
|
||||
*/
|
||||
private String sender;
|
||||
/**
|
||||
* 接收者
|
||||
*/
|
||||
private String receiver;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 登录人Id
|
||||
*/
|
||||
private long userId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "消息创建时间",defaultValue = "2024-8-9 10:47:57",type = "String")
|
||||
private Date createTime;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏组请求对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarFenceGroupReq
|
||||
* @Date:2024/9/24 14:36
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆电子围栏组请求对象")
|
||||
public class CarFenceGroupReq {
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
private Integer carId;
|
||||
/**
|
||||
* 围栏组ID
|
||||
*/
|
||||
private Integer id;
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 电子围栏请求对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.req
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFenceReq
|
||||
* @Date:2024/9/17 16:26
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "电子围栏请求对象")
|
||||
public class CarFenceReq {
|
||||
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 业务类型ID
|
||||
*/
|
||||
private String clazzId;
|
||||
/**
|
||||
* 围栏类型ID
|
||||
*/
|
||||
private String typeName;
|
||||
/**
|
||||
* 当前页
|
||||
*/
|
||||
@Schema(title = "当前页数", type = "Integer", defaultValue = "1", description = "当前页数")
|
||||
private Integer pageNum=1;
|
||||
/**
|
||||
* 条数
|
||||
*/
|
||||
@Schema(title = "分页条数", type = "Integer", defaultValue = "10", description = "每页有多少条")
|
||||
private Integer pageSize=10;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 围栏组电子围栏请求对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarFenceGroupDel
|
||||
* @Date:2024/9/24 11:49
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "围栏组电子围栏请求对象")
|
||||
public class CarGroupIdReq {
|
||||
/**
|
||||
* 围栏组Id
|
||||
*/
|
||||
private Integer ids;
|
||||
/**
|
||||
* 围栏ID
|
||||
*/
|
||||
private Integer id;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.muyu.domain.CarFenceGroup;
|
||||
import com.muyu.domain.CarInformation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏请求对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarGroupReq
|
||||
* @Date:2024/9/23 12:01
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆电子围栏请求对象")
|
||||
public class CarGroupReq {
|
||||
/**
|
||||
* 车辆
|
||||
*/
|
||||
|
||||
private List<CarInformation> carInformations;
|
||||
/**
|
||||
* 围栏组
|
||||
*/
|
||||
private List<CarFenceGroup> carFenceGroups;
|
||||
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 车辆管理信息添加请求对象
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "车辆管理信息添加请求对象")
|
||||
public class CarInformationAddReq {
|
||||
|
||||
/**
|
||||
* 车辆唯一VIN
|
||||
*/
|
||||
private String carInformationVIN;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carInformationLicensePlate;
|
||||
|
||||
/**
|
||||
* 车辆品牌
|
||||
*/
|
||||
private String carInformationBrand;
|
||||
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
private String carInformationColor;
|
||||
|
||||
/**
|
||||
* 车辆驾驶员
|
||||
*/
|
||||
private String carInformationDriver;
|
||||
|
||||
/**
|
||||
* 车检到期日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
|
||||
private String carInformationExamineEnddata;
|
||||
|
||||
/**
|
||||
* 车辆电机厂商
|
||||
*/
|
||||
private String carInformationMotorManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电机型号
|
||||
*/
|
||||
private String carInformationMotorModel;
|
||||
|
||||
/**
|
||||
* 车辆电池厂商
|
||||
*/
|
||||
private String carInformationBatteryManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电池型号
|
||||
*/
|
||||
private String carInformationBatteryModel;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏外键ID
|
||||
*/
|
||||
private Integer carInformationFence;
|
||||
|
||||
/**
|
||||
* 车辆类型外键ID
|
||||
*/
|
||||
private Integer carInformationType;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 车辆管理列表请求对象
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name="车辆管理列表请求对象")
|
||||
public class CarInformationListReq {
|
||||
|
||||
/**
|
||||
* 车辆唯一VIN
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆唯一VIN",
|
||||
type = "String"
|
||||
)
|
||||
private String carInformationVIN;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 车辆类型ID
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆类型ID",
|
||||
type = "Interger"
|
||||
)
|
||||
private Integer carTypeId;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏外键ID
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆电子围栏外键ID",
|
||||
type = "Interger"
|
||||
)
|
||||
private Integer carInformationFence;
|
||||
|
||||
/**
|
||||
* 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)
|
||||
*/
|
||||
@Schema(
|
||||
description = "启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)",
|
||||
type = "Interger"
|
||||
)
|
||||
private Integer carInformationState;
|
||||
|
||||
/**
|
||||
* 车辆电机厂商
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆电机厂商",
|
||||
type = "String"
|
||||
)
|
||||
private String carInformationMotorManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电机型号
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆电机型号",
|
||||
type = "String"
|
||||
)
|
||||
private String carInformationMotorModel;
|
||||
|
||||
/**
|
||||
* 车辆电池厂商
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆电池厂商",
|
||||
type = "String"
|
||||
)
|
||||
private String carInformationBatteryManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电池型号
|
||||
*/
|
||||
@Schema(
|
||||
description = "车辆电池型号",
|
||||
type = "String"
|
||||
)
|
||||
private String carInformationBatteryModel;
|
||||
|
||||
//分页页数
|
||||
private Integer pageNum = 1;
|
||||
//分页条数
|
||||
private Integer pageSize = 5;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 车辆管理修改操作请求对象
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@Tag(name = "车辆管理修改操作请求对象")
|
||||
public class CarInformationUpdReq {
|
||||
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
@Schema(title = "车辆管理主键", type = "Long")
|
||||
private Long carInformationId;
|
||||
|
||||
/**
|
||||
* 车辆品牌
|
||||
*/
|
||||
@Schema(title = "车辆品牌", type = "String")
|
||||
private String carInformationBrand;
|
||||
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
@Schema(title = "车辆颜色", type = "String")
|
||||
private String carInformationColor;
|
||||
|
||||
/**
|
||||
* 车辆驾驶员
|
||||
*/
|
||||
@Schema(title = "车辆驾驶员", type = "String")
|
||||
private String carInformationDriver;
|
||||
/**
|
||||
* 车辆电机厂商
|
||||
*/
|
||||
@Schema(title = "车辆电机厂商", type = "String")
|
||||
private String carInformationMotorManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电机型号
|
||||
*/
|
||||
@Schema(title = "车辆电机型号", type = "String")
|
||||
private String carInformationMotorModel;
|
||||
|
||||
/**
|
||||
* 车辆电池厂商
|
||||
*/
|
||||
@Schema(title = "车辆电池厂商", type = "String")
|
||||
private String carInformationBatteryManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电池型号
|
||||
*/
|
||||
@Schema(title = "车辆电池型号", type = "String")
|
||||
private String carInformationBatteryModel;
|
||||
|
||||
/**
|
||||
* 车辆电子围栏外键ID
|
||||
*/
|
||||
@Schema(title = "车辆电子围栏外键ID", type = "Integer")
|
||||
private Integer carInformationFence;
|
||||
|
||||
/**
|
||||
* 车辆类型外键ID
|
||||
*/
|
||||
@Schema(title = "车辆类型外键ID", type = "Integer")
|
||||
private Integer carInformationType;
|
||||
|
||||
/**
|
||||
* 是否重点车辆 (0否默认 1是 )
|
||||
*/
|
||||
@Schema(title = "是否重点车辆 (0否默认 1是 )", type = "Integer")
|
||||
private Integer carInformationFocus;
|
||||
|
||||
/**
|
||||
* 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)
|
||||
*/
|
||||
@Schema(title = "启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)", type = "Integer")
|
||||
private Integer carInformationState;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 故障码添加请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultCodeAddReq
|
||||
* @Date:2024/9/18 10:12
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultCodeAddReq {
|
||||
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
* 故障分类Id
|
||||
*/
|
||||
private long faulttypeId;
|
||||
/**
|
||||
* 是否产生报警
|
||||
*/
|
||||
private Integer isWarning;
|
||||
/**
|
||||
* 故障描述
|
||||
*/
|
||||
private String faultContent;
|
||||
/**
|
||||
*故障组
|
||||
*/
|
||||
private String faultGroup;
|
||||
/**
|
||||
*故障位
|
||||
*/
|
||||
private String faultBit;
|
||||
/**
|
||||
*故障值
|
||||
*/
|
||||
private String faultValue;
|
||||
/**
|
||||
*报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 故障码列表条件查询请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultCodeListReq
|
||||
* @Date:2024/9/17 15:55
|
||||
*/
|
||||
|
||||
@Tag(name = "故障码列表请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultCodeListReq {
|
||||
|
||||
/**
|
||||
*故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
*故障位
|
||||
*/
|
||||
private String faultBit;
|
||||
/**
|
||||
* 页码,从1开始
|
||||
*/
|
||||
private Integer pageNum=1;
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
private Integer pageSize=10;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* 故障码修改请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultCodeAddReq
|
||||
* @Date:2024/9/18 10:12
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultCodeUpdReq {
|
||||
|
||||
/**
|
||||
*故障码Id
|
||||
*/
|
||||
private long faultcodeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
* 故障分类Id
|
||||
*/
|
||||
private long faulttypeId;
|
||||
/**
|
||||
* 是否产生报警
|
||||
*/
|
||||
private Integer isWarning;
|
||||
/**
|
||||
* 故障描述
|
||||
*/
|
||||
private String faultContent;
|
||||
/**
|
||||
*故障状态
|
||||
*/
|
||||
private Integer faultStatus;
|
||||
/**
|
||||
*故障组
|
||||
*/
|
||||
private String faultGroup;
|
||||
/**
|
||||
*故障位
|
||||
*/
|
||||
private String faultBit;
|
||||
/**
|
||||
*故障值
|
||||
*/
|
||||
private String faultValue;
|
||||
/**
|
||||
*报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 故障规则制定请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultConditionAddReq
|
||||
* @Date:2024/9/21 21:02
|
||||
*/
|
||||
@Tag(name = "故障规则制定请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultConditionAddReq {
|
||||
/**
|
||||
* 故障规则表Id
|
||||
*/
|
||||
private long carconditionId;
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障条件
|
||||
*/
|
||||
private String faultconditionIdentification;
|
||||
/**
|
||||
* 故障规则参数
|
||||
*/
|
||||
private BigDecimal faultconditionParameter;
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 故障规则列表条件查询请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultCondition
|
||||
* @Date:2024/9/21 20:02
|
||||
*/
|
||||
@Tag(name = "故障规则列表请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultConditionListReq {
|
||||
|
||||
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 页码,从1开始
|
||||
*/
|
||||
private Integer pageNum=1;
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
private Integer pageSize=10;
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 故障规则修改请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultConditionUpdReq
|
||||
* @Date:2024/9/22 9:38
|
||||
*/
|
||||
@Tag(name = "故障规则修改请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultConditionUpdReq {
|
||||
|
||||
/**
|
||||
* 故障规则表Id
|
||||
*/
|
||||
private long carconditionId;
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障条件
|
||||
*/
|
||||
private String faultconditionIdentification;
|
||||
/**
|
||||
* 故障规则参数
|
||||
*/
|
||||
private BigDecimal faultconditionParameter;
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 故障日志列表请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultLogReq
|
||||
* @Date:2024/9/20 9:38
|
||||
*/
|
||||
|
||||
@Tag(name = "故障日志列表请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class FaultLogListReq {
|
||||
|
||||
/**
|
||||
* 故障码Id
|
||||
*/
|
||||
private long faultcodeId;
|
||||
/**
|
||||
* 车辆VIN
|
||||
*/
|
||||
private String carVin;
|
||||
/**
|
||||
* 开始报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "开始报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date startwarningTime;
|
||||
/**
|
||||
* 结束报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "结束报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date endwarningTime;
|
||||
|
||||
/**
|
||||
* 页码,从1开始
|
||||
*/
|
||||
private Integer pageNum=1;
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
private Integer pageSize=10;
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.muyu.domain.CarFence;
|
||||
import com.muyu.domain.CarFenceGroup;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 围栏组围栏请求对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FenceGroupReq
|
||||
* @Date:2024/9/24 1:09
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "围栏组围栏请求对象")
|
||||
public class FenceGroupReq {
|
||||
|
||||
/**
|
||||
* 车辆
|
||||
*/
|
||||
private List<CarFence> carFences;
|
||||
/**
|
||||
* 围栏组
|
||||
*/
|
||||
private List<CarFenceGroup> carFenceGroups;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 公司信息请求对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.firmmanage.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:FirmListReq
|
||||
* @Date:2024/9/27 19:19
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "公司信息请求对象",description = "公司信息请求对象")
|
||||
public class FirmListReq {
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
private String firmName;
|
||||
/**
|
||||
* 页码,从1开始
|
||||
*/
|
||||
private Integer pageNum=1;
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
private Integer pageSize=10;
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 预警策略请求对象
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain.req
|
||||
* @Project:cloud-server-8
|
||||
* @name:WarnStrategyReq
|
||||
* @Date:2024/9/25 下午10:28
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "预警策略请求对象")
|
||||
public class WarnStrategyReq {
|
||||
|
||||
/**
|
||||
* 策略id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 车辆类型
|
||||
*/
|
||||
private String carTypeId;
|
||||
/**
|
||||
* 策略名称
|
||||
*/
|
||||
private String strategyName;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.domain.CarFenceGroup;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电子围栏-围栏组列表响应对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.resq
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarFenceGroupReq
|
||||
* @Date:2024/9/24 1:45
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "电子围栏-围栏组列表")
|
||||
public class CarFenceGroupResp {
|
||||
/**
|
||||
* 围栏主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 业务类型ID
|
||||
*/
|
||||
private Integer clazzId;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String clazzName;
|
||||
/**
|
||||
* 围栏类型ID
|
||||
*/
|
||||
private Integer typeId;
|
||||
/**
|
||||
* 围栏类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
/**
|
||||
* 围栏经纬度
|
||||
*/
|
||||
private String fenceText;
|
||||
/**
|
||||
* 围栏开始时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceStart;
|
||||
/**
|
||||
* 围栏结束时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceEnd;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy/MM/dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy/MM/dd hh:mm:ss")
|
||||
private Date fenceCreate;
|
||||
/**
|
||||
* 中间表ID
|
||||
*/
|
||||
private Integer middleId;
|
||||
/**
|
||||
* 围栏组
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<CarFenceGroup> carFenceGroups;
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
private Integer priority;
|
||||
/**
|
||||
* 启动状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 围栏组类型
|
||||
*/
|
||||
private String groupType;
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆-围栏组列表响应对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.resq
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarFenceGroupsResq
|
||||
* @Date:2024/9/25 21:08
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆-围栏组列表")
|
||||
public class CarFenceGroupsResp {
|
||||
|
||||
/**
|
||||
* 围栏组ID
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
private Integer priority;
|
||||
/**
|
||||
* 启动状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 围栏组类型
|
||||
*/
|
||||
private String groupType;
|
||||
/**
|
||||
* 车辆唯一VIN
|
||||
*/
|
||||
// @TableName(value = "car_information_VIN")
|
||||
private String carInformationLicensePlate;
|
||||
/**
|
||||
* 围栏经纬度
|
||||
*/
|
||||
private String fenceText;
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.domain.CarFence;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 电子围栏列表响应对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.resq
|
||||
* @Project:cloud-electronic
|
||||
* @name:CarFenceResq
|
||||
* @Date:2024/9/17 16:35
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "电子围栏列表")
|
||||
@TableName(value = "car_fence",autoResultMap = true)
|
||||
public class CarFenceResp {
|
||||
|
||||
/**
|
||||
* 围栏主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 业务类型名
|
||||
*/
|
||||
private String clazzName;
|
||||
/**
|
||||
* 围栏类型名
|
||||
*/
|
||||
private String typeName;
|
||||
/**
|
||||
* 围栏开始时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceStart;
|
||||
/**
|
||||
* 围栏结束时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date fenceEnd;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(fallbackPatterns = "yyyy/MM/dd hh:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy/MM/dd hh:mm:ss")
|
||||
private Date fenceCreate;
|
||||
|
||||
public static CarFenceResp carFenceResqListBuilder(CarFence etlDataScore) {
|
||||
return CarFenceResp.builder()
|
||||
.id(etlDataScore.getId())
|
||||
.name(etlDataScore.getName())
|
||||
.clazzName(etlDataScore.getClazzName())
|
||||
.typeName(etlDataScore.getTypeName())
|
||||
.fenceStart(etlDataScore.getFenceStart())
|
||||
.fenceEnd(etlDataScore.getFenceEnd())
|
||||
.fenceCreate(etlDataScore.getFenceCreate())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车辆基础信息列表响应对象
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.resq
|
||||
* @Project:cloud-server-8
|
||||
* @name:CarInformationResp
|
||||
* @Date:2024/9/28 12:08
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "车辆基础信息列表")
|
||||
public class CarInformationResp {
|
||||
|
||||
/**
|
||||
* 车辆ID
|
||||
*/
|
||||
@TableId(value = "car_information_id",type = IdType.AUTO)
|
||||
private Long carInformationId;
|
||||
/**
|
||||
* 车辆唯一VIN
|
||||
*/
|
||||
// @TableName(value = "car_information_VIN")
|
||||
@TableField(value = "car_information_VIN")
|
||||
private String carInformationVin;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carInformationLicensePlate;
|
||||
/**
|
||||
* 车辆颜色
|
||||
*/
|
||||
private String carInformationColor;
|
||||
/**
|
||||
* 车辆驾驶员
|
||||
*/
|
||||
private String carInformationDriver;
|
||||
/**
|
||||
* 车辆电子围栏外键ID
|
||||
*/
|
||||
private Integer carInformationFence;
|
||||
/**
|
||||
* 车检到期日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
|
||||
private Date carInformationExamineEnddata;
|
||||
/**
|
||||
* 车辆类型外键ID
|
||||
*/
|
||||
private Integer carInformationType;
|
||||
/**
|
||||
* 车辆品牌
|
||||
*/
|
||||
private String carInformationBrand;
|
||||
/**
|
||||
* 是否重点车辆 (0否默认 1是 )
|
||||
*/
|
||||
private Integer carInformationFocus;
|
||||
|
||||
/**
|
||||
* 车辆电机厂商
|
||||
*/
|
||||
private String carInformationMotorManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电机型号
|
||||
*/
|
||||
private String carInformationMotorModel;
|
||||
|
||||
/**
|
||||
* 车辆电池厂商
|
||||
*/
|
||||
private String carInformationBatteryManufacturer;
|
||||
|
||||
/**
|
||||
* 车辆电池型号
|
||||
*/
|
||||
private String carInformationBatteryModel;
|
||||
|
||||
/**
|
||||
* 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中)
|
||||
*/
|
||||
private Integer carInformationState;
|
||||
|
||||
//车辆类型表
|
||||
/**
|
||||
* 车辆类型ID
|
||||
*/
|
||||
@TableField(value = "car_information_type")
|
||||
private Integer carTypeId;
|
||||
/**
|
||||
* 车辆类型名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String carTypeName;
|
||||
/**
|
||||
* 车辆规则外键ID
|
||||
*/
|
||||
private long carTypeRules;
|
||||
|
||||
//电子围栏
|
||||
/**
|
||||
*电子围栏ID
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 电子围栏名
|
||||
*/
|
||||
private String name;
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 车辆报文信息(预警)响应对象
|
||||
* @Author:蓬叁
|
||||
* @Package:com.muyu.warn.domain.car
|
||||
* @Project:cloud-server-8
|
||||
* @name:resp
|
||||
* @Date:2024/9/22 下午7:12
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "车辆报文信息")
|
||||
public class CarMessageResp {
|
||||
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Integer carMessageId ;
|
||||
/**
|
||||
* 车辆类型外键
|
||||
*/
|
||||
private Integer carMessageCartype ;
|
||||
/**
|
||||
* 车辆报文外键
|
||||
*/
|
||||
private Integer carMessageType ;
|
||||
/**
|
||||
* 报文名称
|
||||
*/
|
||||
private String messageTypeName ;
|
||||
/**
|
||||
* 开始位下标
|
||||
*/
|
||||
private Integer carMessageStartIndex ;
|
||||
/**
|
||||
* 结束位下标
|
||||
*/
|
||||
private Integer carMessageEndIndex ;
|
||||
/**
|
||||
* 报文数据类型 (固定值 区间随机值)
|
||||
*/
|
||||
private String messageTypeClass ;
|
||||
/**
|
||||
* 报文是否开启故障检测(0默认未开启 1开启)
|
||||
*/
|
||||
private Integer carMessageState ;
|
||||
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
|
||||
import com.muyu.domain.FaultCode;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 故障码信息响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultCodeListResp
|
||||
* @Date:2024/9/17 15:41
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name="故障码信息响应对象",description = "故障码查询的响应结果")
|
||||
public class FaultCodeListResp {
|
||||
|
||||
/**
|
||||
*故障码Id
|
||||
*/
|
||||
private long faultcodeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
*故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
*故障组
|
||||
*/
|
||||
private String faultGroup;
|
||||
/**
|
||||
*故障位
|
||||
*/
|
||||
private String faultBit;
|
||||
/**
|
||||
*故障值
|
||||
*/
|
||||
private String faultValue;
|
||||
/**
|
||||
*是否警告
|
||||
*/
|
||||
private Integer isWarning;
|
||||
/**
|
||||
*故障类型名称
|
||||
*/
|
||||
private String faulttypeName;
|
||||
/**
|
||||
*报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
/**
|
||||
*报文名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
*报文所属类别
|
||||
*/
|
||||
private String messageTypeBelongs;
|
||||
|
||||
/**
|
||||
* 数据库对象构建为返回结果对象
|
||||
* @param faultCode
|
||||
* @return
|
||||
*/
|
||||
public static FaultCodeListResp faultCodeListResp(FaultCode faultCode){
|
||||
return FaultCodeListResp.builder()
|
||||
.faultcodeId(faultCode.getFaultcodeId())
|
||||
.messageTypeId(faultCode.getMessageTypeId())
|
||||
.faultcodeNumber(faultCode.getFaultcodeNumber())
|
||||
.faultGroup(faultCode.getFaultGroup())
|
||||
.faultBit(faultCode.getFaultBit())
|
||||
.faultValue(faultCode.getFaultValue())
|
||||
.isWarning(faultCode.getIsWarning())
|
||||
.faulttypeName(faultCode.getFaulttypeName())
|
||||
.messageTypeName(faultCode.getMessageTypeName())
|
||||
.messageTypeCode(faultCode.getMessageTypeCode())
|
||||
.messageTypeBelongs(faultCode.getMessageTypeBelongs())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据和总数的响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-faultmanage
|
||||
* @name:FaultCodeTotalListResp
|
||||
* @Date:2024/9/17 15:44
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name="故障码数据总数列表",description = "数据和总数的响应")
|
||||
public class FaultCodeTotalListResp {
|
||||
|
||||
|
||||
/**
|
||||
* 故障码信息集合
|
||||
*/
|
||||
private List<FaultCodeListResp> faultCodeListRespList;
|
||||
|
||||
private long total;
|
||||
|
||||
public static FaultCodeTotalListResp faultCodeTotalListResp(List<FaultCodeListResp> faultCodeListRespList,long total){
|
||||
FaultCodeTotalListResp faultCodeTotalListResp = new FaultCodeTotalListResp();
|
||||
faultCodeTotalListResp.setFaultCodeListRespList(faultCodeListRespList);
|
||||
faultCodeTotalListResp.setTotal(total);
|
||||
return faultCodeTotalListResp;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.muyu.domain.FaultCondition;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 故障规则信息响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultConditionResp
|
||||
* @Date:2024/9/21 19:59
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@Tag(name="故障规则信息响应对象",description = "故障规则查询的响应结果")
|
||||
public class FaultConditionListResp {
|
||||
|
||||
/**
|
||||
* 故障规则表Id
|
||||
*/
|
||||
private long carconditionId;
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障条件
|
||||
*/
|
||||
private String faultconditionIdentification;
|
||||
/**
|
||||
* 故障规则参数
|
||||
*/
|
||||
private BigDecimal faultconditionParameter;
|
||||
/**
|
||||
* 车辆类型名称
|
||||
*/
|
||||
private String carTypeName;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
|
||||
/**
|
||||
* 数据库对象构建为返回结果对象
|
||||
* @param faultCondition
|
||||
* @return
|
||||
*/
|
||||
public static FaultConditionListResp faultConditionListResp(FaultCondition faultCondition){
|
||||
return FaultConditionListResp.builder()
|
||||
.carconditionId(faultCondition.getCarconditionId())
|
||||
.carTypeId(faultCondition.getCarTypeId())
|
||||
.messageTypeId(faultCondition.getMessageTypeId())
|
||||
.faultconditionParameter(faultCondition.getFaultconditionParameter())
|
||||
.faultconditionIdentification(faultCondition.getFaultconditionIdentification())
|
||||
.carTypeName(faultCondition.getCarTypeName())
|
||||
.messageTypeName(faultCondition.getMessageTypeName())
|
||||
.messageTypeCode(faultCondition.getMessageTypeCode())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Author:yang
|
||||
* @Package:com.muyu.domain.resp
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultConditionResp
|
||||
* @Date:2024/9/28 16:53
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name="故障规则表",description = "数据响应")
|
||||
public class FaultConditionResp {
|
||||
|
||||
/**
|
||||
* 故障规则表Id
|
||||
*/
|
||||
@TableId(value = "carcondition_id",type = IdType.AUTO)
|
||||
private long carconditionId;
|
||||
/**
|
||||
* 车辆类型Id
|
||||
*/
|
||||
private long carTypeId;
|
||||
/**
|
||||
*故障名称Id
|
||||
*/
|
||||
private long messageTypeId;
|
||||
/**
|
||||
* 故障条件
|
||||
*/
|
||||
private String faultconditionIdentification;
|
||||
/**
|
||||
* 故障规则参数
|
||||
*/
|
||||
private BigDecimal faultconditionParameter;
|
||||
/**
|
||||
* 车辆类型名称
|
||||
*/
|
||||
private String carTypeName;
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
private String messageTypeName;
|
||||
/**
|
||||
* 报文编码
|
||||
*/
|
||||
private String messageTypeCode;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 故障规则数据总数响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultConditionTotalListResp
|
||||
* @Date:2024/9/21 20:00
|
||||
*/
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name="故障规则数据总数列表",description = "数据和总数的响应")
|
||||
public class FaultConditionTotalListResp {
|
||||
|
||||
/**
|
||||
* 故障规则信息集合
|
||||
*/
|
||||
private List<FaultConditionListResp> faultConditionListRespList;
|
||||
|
||||
/**
|
||||
* 总数量
|
||||
*/
|
||||
private long total;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param faultConditionListRespList
|
||||
* @param total
|
||||
* @return
|
||||
*/
|
||||
public static FaultConditionTotalListResp faultConditionTotalListResp(List<FaultConditionListResp> faultConditionListRespList,long total){
|
||||
FaultConditionTotalListResp faultConditionTotalListResp = new FaultConditionTotalListResp();
|
||||
faultConditionTotalListResp.setFaultConditionListRespList(faultConditionListRespList);
|
||||
faultConditionTotalListResp.setTotal(total);
|
||||
return faultConditionTotalListResp;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.domain.FaultLog;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 故障日志信息响应对象
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.faultmanage.domain.resp
|
||||
* @Project:cloud-server-8
|
||||
* @name:FaultLogResp
|
||||
* @Date:2024/9/20 9:43
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@Tag(name="故障日志信息响应对象",description = "故障日志的响应结果")
|
||||
public class FaultLogListResp {
|
||||
|
||||
|
||||
/**
|
||||
* 故障日志Id
|
||||
*/
|
||||
private long logId;
|
||||
/**
|
||||
* 故障码Id
|
||||
*/
|
||||
private long faultcodeId;
|
||||
/**
|
||||
* 车辆Id
|
||||
*/
|
||||
private long carInformationId;
|
||||
/**
|
||||
* 车辆VIN
|
||||
*/
|
||||
private String carVin;
|
||||
/**
|
||||
* 开始报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "开始报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date startwarningTime;
|
||||
/**
|
||||
* 结束报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "结束报警时间",defaultValue = "2024-8-9 10:47:57",type = "Date")
|
||||
private Date endwarningTime;
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
private String faultcodeNumber;
|
||||
/**
|
||||
* 车辆vin
|
||||
*/
|
||||
private String carInformationVIN;
|
||||
|
||||
|
||||
/**
|
||||
* 数据库对象构建为返回结果对象
|
||||
* @param faultLog
|
||||
* @return
|
||||
*/
|
||||
public static FaultLogListResp faultLogListResp(FaultLog faultLog){
|
||||
return FaultLogListResp.builder()
|
||||
.logId(faultLog.getLogId())
|
||||
.faultcodeId(faultLog.getFaultcodeId())
|
||||
.carInformationId(faultLog.getCarInformationId())
|
||||
.carVin(faultLog.getCarVin())
|
||||
.startwarningTime(faultLog.getStartwarningTime())
|
||||
.endwarningTime(faultLog.getEndwarningTime())
|
||||
.faultcodeNumber(faultLog.getFaultcodeNumber())
|
||||
.carInformationVIN(faultLog.getCarInformationVIN())
|
||||
.build();
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue