Compare commits
10 Commits
6ab26976d6
...
041aaa4654
Author | SHA1 | Date |
---|---|---|
|
041aaa4654 | |
|
9e8106ab46 | |
|
93ccc7535e | |
|
562deda30a | |
|
ab079c7daf | |
|
ad5626f0af | |
|
f07dc734e4 | |
|
2affa40686 | |
|
0c1cfb8f28 | |
|
2352def47e |
|
@ -17,11 +17,9 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 121.89.211.230:8848
|
server-addr: 121.89.211.230:8848
|
||||||
namespace: 172469
|
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 121.89.211.230:8848
|
server-addr: 121.89.211.230:8848
|
||||||
namespace: 172469
|
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>couplet-common-vehicle</artifactId>
|
|
||||||
|
<artifactId>couplet-common-business</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
@ -17,7 +18,6 @@
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- MuYu Common Core-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.couplet</groupId>
|
<groupId>com.couplet</groupId>
|
||||||
<artifactId>couplet-common-core</artifactId>
|
<artifactId>couplet-common-core</artifactId>
|
|
@ -1,9 +1,11 @@
|
||||||
package com.couplet.trouble.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.couplet.common.core.annotation.Excel;
|
import com.couplet.common.core.annotation.Excel;
|
||||||
import lombok.*;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.trouble.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.couplet.trouble.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.models.auth.In;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.trouble.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
|
@ -1,25 +1,20 @@
|
||||||
package com.couplet.map.common.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.couplet.common.core.web.domain.BaseEntity;
|
import com.couplet.common.core.web.domain.BaseEntity;
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
import com.couplet.common.domain.request.FenceUpdateRequest;
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: LiJiaYao
|
* @Author: LiJiaYao
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.map.common.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
@ -17,12 +17,11 @@ import lombok.experimental.SuperBuilder;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@TableName("couplet_vehicle")
|
@TableName("couplet_vehicle")
|
||||||
public class Vehicle{
|
public class Vehicle{
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*车辆id
|
*车辆id
|
||||||
* */
|
* */
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.common.system.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.common.system.domain;
|
package com.couplet.common.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ProjectName: five-groups-couplet
|
* @ProjectName: five-groups-couplet
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.map.common.domain.request;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.map.common.domain.request;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
@ -8,7 +8,6 @@ import lombok.NoArgsConstructor;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: LiJiaYao
|
* @Author: LiJiaYao
|
|
@ -1,6 +1,5 @@
|
||||||
package com.couplet.map.common.domain.request;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.couplet.trouble.domain.resp;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import com.couplet.trouble.domain.CoupletTroubleCode;
|
import com.couplet.common.domain.CoupletTroubleCode;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.domain.req;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.domain.req;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.domain.req;
|
package com.couplet.common.domain.request;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.utils;
|
package com.couplet.common.utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ProjectName: five-groups-couplet
|
* @ProjectName: five-groups-couplet
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.common.log.annotation;
|
package com.couplet.log.annotation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongXiaoDong
|
* @author DongXiaoDong
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.common.log.aop;
|
package com.couplet.log.aop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongXiaoDong
|
* @author DongXiaoDong
|
|
@ -1,20 +1,17 @@
|
||||||
package com.couplet.common.system.remote;
|
package com.couplet.remote;
|
||||||
|
|
||||||
import com.couplet.common.core.constant.ServiceNameConstants;
|
import com.couplet.common.core.constant.ServiceNameConstants;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.system.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.common.system.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.common.system.remote.factory.RemoteVehicleFallbackFactory;
|
import com.couplet.remote.factory.RemoteVehicleFallbackFactory;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@FeignClient(contextId = "remoteVehicleService" ,
|
@FeignClient(contextId = "remoteVehicleService" ,
|
||||||
value = ServiceNameConstants.VEHICLE_SERVICE,
|
value = ServiceNameConstants.BUSINESS_SERVICE,
|
||||||
fallbackFactory = RemoteVehicleFallbackFactory.class,
|
fallbackFactory = RemoteVehicleFallbackFactory.class,
|
||||||
path = "/vehicle"
|
path = "/vehicle"
|
||||||
)
|
)
|
||||||
|
@ -49,4 +46,9 @@ public interface RemoteVehicleService {
|
||||||
|
|
||||||
@PostMapping("vehicleAll")
|
@PostMapping("vehicleAll")
|
||||||
public Result<List<Vehicle>> VehicleManageList();
|
public Result<List<Vehicle>> VehicleManageList();
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/findByVIN/{vin}")
|
||||||
|
public Result<List<Vehicle>> findByVIN(@PathVariable("vin") String vin);
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,10 +1,13 @@
|
||||||
package com.couplet.common.system.remote.factory;
|
package com.couplet.remote.factory;
|
||||||
|
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.system.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.common.system.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.common.system.remote.RemoteVehicleService;
|
import com.couplet.remote.RemoteVehicleService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -14,7 +17,9 @@ import java.util.List;
|
||||||
* @description: TODO
|
* @description: TODO
|
||||||
* @date 2024/4/2 14:46
|
* @date 2024/4/2 14:46
|
||||||
*/
|
*/
|
||||||
|
@Component
|
||||||
public class RemoteVehicleFallbackFactory implements FallbackFactory<RemoteVehicleService> {
|
public class RemoteVehicleFallbackFactory implements FallbackFactory<RemoteVehicleService> {
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(RemoteVehicleFallbackFactory.class);
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,6 +44,13 @@ public class RemoteVehicleFallbackFactory implements FallbackFactory<RemoteVehic
|
||||||
public Result<List<Vehicle>> VehicleManageList() {
|
public Result<List<Vehicle>> VehicleManageList() {
|
||||||
return Result.error("调用失败....."+cause.getMessage());
|
return Result.error("调用失败....."+cause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<Vehicle>> findByVIN(String vin) {
|
||||||
|
log.error("车辆服务调用失败:"+cause.getMessage());
|
||||||
|
return Result.error("车辆服务调用失败:" + cause.getMessage());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
com.couplet.remote.factory.RemoteVehicleFallbackFactory
|
|
@ -26,8 +26,8 @@ public class ServiceNameConstants {
|
||||||
* @param null:
|
* @param null:
|
||||||
* @return null
|
* @return null
|
||||||
* @author 付凡芮
|
* @author 付凡芮
|
||||||
* @description 车辆管理模块
|
* @description couplet-business
|
||||||
* @date
|
* @date
|
||||||
*/
|
*/
|
||||||
public static final String VEHICLE_SERVICE = "couplet-vehicle";
|
public static final String BUSINESS_SERVICE = "couplet-business";
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.couplet.common.core.exception.analyze;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: LiJiaYao
|
||||||
|
* @Date: 2024/4/4
|
||||||
|
* @Description: 解析系统统一异常
|
||||||
|
*/
|
||||||
|
public class AnalyzeException extends RuntimeException{
|
||||||
|
|
||||||
|
private int code;
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public AnalyzeException(int code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AnalyzeException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AnalyzeException() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.vehicle.exception;
|
package com.couplet.common.core.exception.vehicle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ProjectName: five-groups-couplet
|
* @ProjectName: five-groups-couplet
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.couplet.common.redis.configure;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||||
|
import org.springframework.data.redis.listener.KeyExpirationEventMessageListener;
|
||||||
|
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: LiJiaYao
|
||||||
|
* @Date: 2024/4/4
|
||||||
|
* @Description: redis监听配置
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class RedisListenerConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
RedisMessageListenerContainer listenerContainer(RedisConnectionFactory redisConnectionFactory) {
|
||||||
|
|
||||||
|
RedisMessageListenerContainer container = new RedisMessageListenerContainer();
|
||||||
|
container.setConnectionFactory(redisConnectionFactory);
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
KeyExpirationEventMessageListener redisKeyExpirationListener(RedisMessageListenerContainer listenerContainer) {
|
||||||
|
return new KeyExpirationEventMessageListener(listenerContainer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,89 +0,0 @@
|
||||||
package com.couplet.common.system.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 lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ProjectName: five-groups-couplet
|
|
||||||
* @Author: LiuYunHu
|
|
||||||
* @CreateTime: 2024/3/26
|
|
||||||
* @Description: 车辆信息表
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@SuperBuilder
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@TableName("couplet_vehicle")
|
|
||||||
public class Vehicle{
|
|
||||||
/*
|
|
||||||
*车辆id
|
|
||||||
* */
|
|
||||||
@TableId(type = IdType.AUTO, value = "vehicle_id")
|
|
||||||
private Long vehicleId;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*车辆类型
|
|
||||||
* */
|
|
||||||
@TableField(value = "vehicle_type")
|
|
||||||
private Long vehicleType;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 车辆类型名称
|
|
||||||
* */
|
|
||||||
@TableField(exist = false)
|
|
||||||
private String vehicleTypeName;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
*电机厂商
|
|
||||||
* */
|
|
||||||
@TableField(value = "motor_manufacturer")
|
|
||||||
private String motorManufacturer;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*电池厂商
|
|
||||||
* */
|
|
||||||
@TableField(value = "battery_manufacturer")
|
|
||||||
private String batteryManufacturer;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*电机编号
|
|
||||||
* */
|
|
||||||
@TableField(value = "motor_number")
|
|
||||||
private String motorNumber;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*电池编号
|
|
||||||
* */
|
|
||||||
@TableField(value = "battery_number")
|
|
||||||
private String batteryNumber;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*vin码
|
|
||||||
* */
|
|
||||||
@TableField(value = "vin")
|
|
||||||
private String vin;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*0离线 1在线
|
|
||||||
* */
|
|
||||||
@TableField(value = "vehicle_state")
|
|
||||||
private Integer vehicleState;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*0未删除 1删除
|
|
||||||
* */
|
|
||||||
@TableField(value = "isdelete")
|
|
||||||
private Integer isdelete;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
package com.couplet.common.system.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 lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ProjectName: five-groups-couplet
|
|
||||||
* @Author: LiuYunHu
|
|
||||||
* @CreateTime: 2024/3/30
|
|
||||||
* @Description: 车辆和标志中间表
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@SuperBuilder
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@TableName("couplet_vehicle_and_logo")
|
|
||||||
public class VehicleAndLogo {
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 车辆、标志中间表id
|
|
||||||
* */
|
|
||||||
@TableId(type = IdType.AUTO, value = "vehicle_logo_middle_id")
|
|
||||||
private Long vehicleLogoMiddleId;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 车辆id
|
|
||||||
* */
|
|
||||||
@TableField("vehicle_id")
|
|
||||||
private Long vehicleId;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 标志id
|
|
||||||
* */
|
|
||||||
@TableField("logo_id")
|
|
||||||
private Long logoId;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
com.couplet.common.system.remote.factory.RemoteVehicleFallbackFactory
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?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.couplet</groupId>
|
|
||||||
<artifactId>couplet-common</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>couplet-trouble-log</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>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -18,8 +18,8 @@
|
||||||
<module>couplet-common-datascope</module>
|
<module>couplet-common-datascope</module>
|
||||||
<module>couplet-common-datasource</module>
|
<module>couplet-common-datasource</module>
|
||||||
<module>couplet-common-system</module>
|
<module>couplet-common-system</module>
|
||||||
<module>couplet-trouble-log</module>
|
<module>couplet-common-business</module>
|
||||||
<module>couplet-common-vehicle</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>couplet-common</artifactId>
|
<artifactId>couplet-common</artifactId>
|
||||||
|
|
|
@ -15,11 +15,9 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 121.89.211.230:8848
|
server-addr: 121.89.211.230:8848
|
||||||
namespace: 172469
|
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 121.89.211.230:8848
|
server-addr: 121.89.211.230:8848
|
||||||
namespace: 172469
|
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -86,6 +86,14 @@
|
||||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||||
<version>1.2.5</version>
|
<version>1.2.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.couplet</groupId>
|
||||||
|
<artifactId>couplet-modules-mq</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.couplet</groupId>
|
||||||
|
<artifactId>couplet-common-business</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
* @date 2024/4/2 8:39
|
* @date 2024/4/2 8:39
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication
|
@SpringBootApplication(scanBasePackages = "com.couplet")
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@EnableFeignClients(basePackages = "com.couplet.**")
|
@EnableFeignClients(basePackages = "com.couplet.**")
|
||||||
public class CoupletMsgApplication {
|
public class CoupletMsgApplication {
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.couplet.analyze.msg.consumer;
|
||||||
|
|
||||||
|
import com.rabbitmq.client.Channel;
|
||||||
|
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.amqp.core.Message;
|
||||||
|
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
|
||||||
|
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: LiJiaYao
|
||||||
|
* @Date: 2024/4/4
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Log4j2
|
||||||
|
@Component
|
||||||
|
@RabbitListener(queues = "")
|
||||||
|
public class MsgConsumer {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StringRedisTemplate redisTemplate;
|
||||||
|
|
||||||
|
@RabbitHandler
|
||||||
|
public void realTimeDataConsumer(Channel channel, Message message){
|
||||||
|
|
||||||
|
// log.info();
|
||||||
|
|
||||||
|
String messageId = message.getMessageProperties().getMessageId();
|
||||||
|
long deliveryTag = message.getMessageProperties().getDeliveryTag();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
package com.couplet.analyze.msg.contents;
|
||||||
|
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: LiJiaYao
|
||||||
|
* @Date: 2024/4/4
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class StateConstant {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆状态
|
||||||
|
*/
|
||||||
|
public static final Integer VEHICLE_STATUS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电状态
|
||||||
|
*/
|
||||||
|
public static final Integer CHARGING_STATUS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行状态
|
||||||
|
*/
|
||||||
|
public static final Integer OPERATING_STATUS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* soc状态
|
||||||
|
*/
|
||||||
|
public static final Integer SOC_STATUS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可充电储能装置工作状态
|
||||||
|
*/
|
||||||
|
public static final Integer CHARGING_ENERGY_STORAGE_STATUS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 驱动电机状态
|
||||||
|
*/
|
||||||
|
public static final Integer DRIVE_MOTOR_STATUS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定位是否有效
|
||||||
|
*/
|
||||||
|
public static final Integer POSITION_STATUS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EAS(汽车防盗系统)状态
|
||||||
|
*/
|
||||||
|
public static final Integer EAS_STATUS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PTC(电动加热器)状态
|
||||||
|
*/
|
||||||
|
public static final Integer PTC_STATUS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ABS(防抱死)状态
|
||||||
|
*/
|
||||||
|
public static final Integer ABS_STATUS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MCU(电机/逆变器)状态
|
||||||
|
*/
|
||||||
|
public static final Integer MCU_STATUS = 1;
|
||||||
|
/**
|
||||||
|
* 动力电池加热状态
|
||||||
|
*/
|
||||||
|
public static final Integer HEATING_STATUS = 1;
|
||||||
|
/**
|
||||||
|
* 动力电池当前状态
|
||||||
|
*/
|
||||||
|
public static final Integer BATTERY_STATUS = 1;
|
||||||
|
/**
|
||||||
|
* 动力电池保温状态
|
||||||
|
*/
|
||||||
|
public static final Integer BATTERY_INSULATION_STATUS = 1;
|
||||||
|
/**
|
||||||
|
* DCDC(电力交换系统) 状态
|
||||||
|
*/
|
||||||
|
public static final Integer DCDC_STATUS = 1;
|
||||||
|
/**
|
||||||
|
* CHG(充电机)状态
|
||||||
|
*/
|
||||||
|
public static final Integer CHG_STATUS = 1;
|
||||||
|
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ package com.couplet.analyze.msg.model;
|
||||||
|
|
||||||
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
import com.couplet.analyze.msg.service.IncidentService;
|
import com.couplet.analyze.msg.service.IncidentService;
|
||||||
|
import com.couplet.common.core.exception.analyze.AnalyzeException;
|
||||||
import com.couplet.common.core.utils.SpringUtils;
|
import com.couplet.common.core.utils.SpringUtils;
|
||||||
import com.couplet.common.core.utils.uuid.IdUtils;
|
import com.couplet.common.core.utils.uuid.IdUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -108,9 +109,9 @@ public class ModelMessage {
|
||||||
});
|
});
|
||||||
mqttClient.subscribe("test",0);
|
mqttClient.subscribe("test",0);
|
||||||
|
|
||||||
Thread.sleep(1000*60*10);
|
Thread.sleep(1000*6*10);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new AnalyzeException("连接断开:"+ e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,38 +1,88 @@
|
||||||
//package com.couplet.analyze.msg.service.impl;
|
package com.couplet.analyze.msg.service.impl;
|
||||||
//
|
|
||||||
//import com.couplet.analyze.msg.domain.CoupletMsgData;
|
import com.alibaba.fastjson.JSON;
|
||||||
//import com.couplet.analyze.msg.service.IncidentService;
|
import com.couplet.analyze.msg.contents.StateConstant;
|
||||||
//import com.couplet.common.log.annotation.Log;
|
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
//import lombok.extern.log4j.Log4j2;
|
import com.couplet.analyze.msg.service.IncidentService;
|
||||||
//import org.springframework.stereotype.Service;
|
import lombok.extern.log4j.Log4j2;
|
||||||
//
|
import org.aspectj.bridge.Message;
|
||||||
///**
|
import org.slf4j.Logger;
|
||||||
// * @Author: LiJiaYao
|
import org.slf4j.LoggerFactory;
|
||||||
// * @Date: 2024/4/2
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
// * @Description: 故障事件
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
// */
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
//@Service("breakdown")
|
import org.springframework.data.redis.listener.KeyExpirationEventMessageListener;
|
||||||
//@Log4j2
|
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
|
||||||
//public class BreakdownServiceImpl implements IncidentService {
|
import org.springframework.stereotype.Service;
|
||||||
// /**
|
|
||||||
// * 故障事件
|
import java.util.concurrent.TimeUnit;
|
||||||
// *
|
|
||||||
// * @param coupletMsgData
|
/**
|
||||||
// */
|
* @Author: LiJiaYao
|
||||||
// @Override
|
* @Date: 2024/4/2
|
||||||
// public void incident(CoupletMsgData coupletMsgData) {
|
* @Description: 故障事件
|
||||||
//
|
*/
|
||||||
// log.info("故障事件开始.....");
|
@Service("breakdown")
|
||||||
// log.info("故障事件结束.....");
|
public class BreakdownServiceImpl extends KeyExpirationEventMessageListener implements IncidentService {
|
||||||
//
|
|
||||||
//
|
/**
|
||||||
// }
|
* 设置redis存储
|
||||||
//
|
*/
|
||||||
// /**
|
@Autowired
|
||||||
// * @return 获取事件名称
|
private StringRedisTemplate redisTemplate;
|
||||||
// */
|
|
||||||
// @Override
|
private static Logger log = LoggerFactory.getLogger(BreakdownServiceImpl.class);
|
||||||
// public String getName() {
|
|
||||||
// return "breakdown";
|
public BreakdownServiceImpl(RedisMessageListenerContainer listenerContainer) {
|
||||||
// }
|
super(listenerContainer);
|
||||||
//}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障事件
|
||||||
|
*
|
||||||
|
* @param coupletMsgData
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void incident(CoupletMsgData coupletMsgData) {
|
||||||
|
|
||||||
|
log.info("故障事件开始.....");
|
||||||
|
long l = System.currentTimeMillis();
|
||||||
|
log.info("开始时间是:"+l);
|
||||||
|
if (StateConstant.VEHICLE_STATUS != coupletMsgData.getVehicleStatus()
|
||||||
|
|| StateConstant.CHARGING_STATUS!=coupletMsgData.getChgStatus()
|
||||||
|
|| StateConstant.OPERATING_STATUS!=coupletMsgData.getOperatingStatus()
|
||||||
|
|| StateConstant.SOC_STATUS!=coupletMsgData.getSocStatus()
|
||||||
|
|| StateConstant.CHARGING_ENERGY_STORAGE_STATUS != coupletMsgData.getChargingEnergyStorageStatus()
|
||||||
|
|| StateConstant.DRIVE_MOTOR_STATUS != coupletMsgData.getDriveMotorStatus()
|
||||||
|
|| StateConstant.POSITION_STATUS != coupletMsgData.getPositionStatus()
|
||||||
|
|| StateConstant.EAS_STATUS != coupletMsgData.getEasStatus()
|
||||||
|
|| StateConstant.PTC_STATUS != coupletMsgData.getPtcStatus()
|
||||||
|
|| StateConstant.ABS_STATUS != coupletMsgData.getAbsStatus()
|
||||||
|
|| StateConstant.MCU_STATUS != coupletMsgData.getMcuStatus()
|
||||||
|
|| StateConstant.HEATING_STATUS != coupletMsgData.getHeatingStatus()
|
||||||
|
|| StateConstant.BATTERY_STATUS != coupletMsgData.getBatteryStatus()
|
||||||
|
|| StateConstant.BATTERY_INSULATION_STATUS != coupletMsgData.getBatteryInsulationStatus()
|
||||||
|
|| StateConstant.DCDC_STATUS != coupletMsgData.getDcdcStatus()
|
||||||
|
|| StateConstant.CHG_STATUS != coupletMsgData.getChgStatus()){
|
||||||
|
//获取过期的key
|
||||||
|
String expireKey = coupletMsgData.toString();
|
||||||
|
redisTemplate.opsForValue().set(String.valueOf(coupletMsgData),JSON.toJSONString(coupletMsgData),10, TimeUnit.MINUTES);
|
||||||
|
|
||||||
|
long timeMillis = System.currentTimeMillis();
|
||||||
|
log.debug("失效+key is:"+ "coupletMsgData");
|
||||||
|
log.info("故障事件结束时间:"+timeMillis);
|
||||||
|
log.info("故障事件检测结束.....");
|
||||||
|
|
||||||
|
}
|
||||||
|
log.info("故障事件检测结束.....");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return 获取事件名称
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "breakdown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,33 +1,40 @@
|
||||||
//package com.couplet.analyze.msg.service.impl;
|
package com.couplet.analyze.msg.service.impl;
|
||||||
//
|
|
||||||
//import com.couplet.analyze.msg.domain.CoupletMsgData;
|
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
//import com.couplet.analyze.msg.service.IncidentService;
|
import com.couplet.analyze.msg.service.IncidentService;
|
||||||
//import org.springframework.stereotype.Service;
|
import lombok.extern.log4j.Log4j2;
|
||||||
//
|
import org.springframework.stereotype.Service;
|
||||||
///**
|
|
||||||
// * @Author: LiJiaYao
|
/**
|
||||||
// * @Date: 2024/4/2
|
* @Author: LiJiaYao
|
||||||
// * @Description: 电子围栏事件服务实现类
|
* @Date: 2024/4/2
|
||||||
// */
|
* @Description: 电子围栏事件服务实现类
|
||||||
//@Service("electronic-fence")
|
*/
|
||||||
//public class ElectronicFenceServiceImpl implements IncidentService {
|
@Service("electronic-fence")
|
||||||
//
|
@Log4j2
|
||||||
//
|
public class ElectronicFenceServiceImpl implements IncidentService {
|
||||||
// /**
|
|
||||||
// * 电子围栏事件
|
|
||||||
// *
|
/**
|
||||||
// * @param coupletMsgData
|
* 电子围栏事件
|
||||||
// */
|
*
|
||||||
// @Override
|
* @param coupletMsgData
|
||||||
// public void incident(CoupletMsgData coupletMsgData) {
|
*/
|
||||||
//
|
@Override
|
||||||
// }
|
public void incident(CoupletMsgData coupletMsgData) {
|
||||||
//
|
|
||||||
// /**
|
log.info("电子围栏事件开始.......");
|
||||||
// * @return 电子围栏service 名称
|
log.info("电子围栏事件结束.......");
|
||||||
// */
|
|
||||||
// @Override
|
|
||||||
// public String getName() {
|
|
||||||
// return "electronic-fence";
|
}
|
||||||
// }
|
|
||||||
//}
|
/**
|
||||||
|
* @return 电子围栏service 名称
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "electronic-fence";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,33 +1,52 @@
|
||||||
//package com.couplet.analyze.msg.service.impl;
|
package com.couplet.analyze.msg.service.impl;
|
||||||
//
|
|
||||||
//import com.couplet.analyze.msg.domain.CoupletMsgData;
|
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
//import com.couplet.analyze.msg.service.IncidentService;
|
import com.couplet.analyze.msg.mapper.IncidentMapper;
|
||||||
//import org.springframework.stereotype.Service;
|
import com.couplet.analyze.msg.service.IncidentService;
|
||||||
//
|
import lombok.extern.log4j.Log4j2;
|
||||||
///**
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
// * @Author: LiJiaYao
|
import org.springframework.stereotype.Service;
|
||||||
// * @Date: 2024/4/2
|
|
||||||
// * @Description: 实时数据事件
|
/**
|
||||||
// */
|
* @Author: LiJiaYao
|
||||||
//@Service("real-time-data")
|
* @Date: 2024/4/2
|
||||||
//public class RealTimeDataServiceImpl implements IncidentService {
|
* @Description: 实时数据事件
|
||||||
//
|
*/
|
||||||
// /**
|
@Service("real-time-data")
|
||||||
// * 实时数据事件
|
@Log4j2
|
||||||
// *
|
public class RealTimeDataServiceImpl implements IncidentService {
|
||||||
// * @param coupletMsgData
|
|
||||||
// */
|
/**
|
||||||
// @Override
|
* 查询传入的数据是否存在
|
||||||
// public void incident(CoupletMsgData coupletMsgData) {
|
*/
|
||||||
//
|
@Autowired
|
||||||
// }
|
private IncidentMapper incidentMapper;
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 实时数据事件
|
* 实时数据事件
|
||||||
// * @return
|
*
|
||||||
// */
|
* @param coupletMsgData
|
||||||
// @Override
|
*/
|
||||||
// public String getName() {
|
@Override
|
||||||
// return "real-time-data";
|
public void incident(CoupletMsgData coupletMsgData) {
|
||||||
// }
|
|
||||||
//}
|
log.info("实时数据事件开始.....");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
log.info("实时数据事件结束.....");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实时数据事件
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "real-time-data";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
com.couplet.analyze.msg.config.RabbitMQConfig
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
|
|
||||||
<insert id="reportMapper">
|
<insert id="reportMapper">
|
||||||
INSERT INTO `vehicle-resolver`.`resolver_report_data`
|
INSERT INTO `couplet-cloud`.`couplet_msg_data`
|
||||||
(`vin`, `create_time`, `longitude`, `latitude`,
|
(`vin`, `create_time`, `longitude`, `latitude`,
|
||||||
`speed`, `mileage`, `voltage`, `current`, `resistance`, `gear`,
|
`speed`, `mileage`, `voltage`, `current`, `resistance`, `gear`,
|
||||||
`acceleration_pedal`, `fuel_consumption_rate`,
|
`acceleration_pedal`, `fuel_consumption_rate`,
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
`single_battery_max_voltage`, `single_battery_min_voltage`,
|
`single_battery_max_voltage`, `single_battery_min_voltage`,
|
||||||
`single_battery_max_temperature`, `single_battery_min_temperature`,
|
`single_battery_max_temperature`, `single_battery_min_temperature`,
|
||||||
`available_battery_capacity`, `vehicle_status`, `charging_status`,
|
`available_battery_capacity`, `vehicle_status`, `charging_status`,
|
||||||
`operatingStatus`, `soc_status`, `charging_energy_storage_status`,
|
`operating_status`, `soc_status`, `charging_energy_storage_status`,
|
||||||
`drive_motor_status`, `position_status`, `eas_status`, `ptc_status`,
|
`drive_motor_status`, `position_status`, `eas_status`, `ptc_status`,
|
||||||
`eps_status`, `abs_status`, `mcu_status`, `heating_status`, `battery_status`,
|
`eps_status`, `abs_status`, `mcu_status`, `heating_status`, `battery_status`,
|
||||||
`battery_insulation_status`, `dcdc_status`, `chg_status`, `brake_pedal`)
|
`battery_insulation_status`, `dcdc_status`, `chg_status`, `brake_pedal`)
|
||||||
|
|
|
@ -5,25 +5,22 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.couplet</groupId>
|
<groupId>com.couplet</groupId>
|
||||||
<artifactId>couplet-electronic-fence</artifactId>
|
<artifactId>couplet-modules</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>couplet-electronic-fence-server</artifactId>
|
<artifactId>couplet-business</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.couplet</groupId>
|
<groupId>com.couplet</groupId>
|
||||||
<artifactId>couplet-electronic-fence-common</artifactId>
|
<artifactId>couplet-common-business</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- SpringCloud Alibaba Nacos -->
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
@ -48,7 +45,6 @@
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- Swagger UI -->
|
<!-- Swagger UI -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
|
@ -85,14 +81,6 @@
|
||||||
<groupId>com.couplet</groupId>
|
<groupId>com.couplet</groupId>
|
||||||
<artifactId>couplet-common-swagger</artifactId>
|
<artifactId>couplet-common-swagger</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.couplet</groupId>
|
|
||||||
<artifactId>couplet-common-system</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.kafka</groupId>
|
|
||||||
<artifactId>kafka-clients</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -121,5 +109,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.map.server;
|
package com.couplet.business.server;
|
||||||
|
|
||||||
import com.couplet.common.security.annotation.EnableCustomConfig;
|
import com.couplet.common.security.annotation.EnableCustomConfig;
|
||||||
import com.couplet.common.security.annotation.EnableMyFeignClients;
|
import com.couplet.common.security.annotation.EnableMyFeignClients;
|
||||||
|
@ -7,16 +7,17 @@ import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统模块
|
* @Author: LiJiaYao
|
||||||
*
|
* @Date: 2024/4/3
|
||||||
* @author couplet
|
* @Description: 业务实现启动类
|
||||||
*/
|
*/
|
||||||
@EnableCustomConfig
|
@EnableCustomConfig
|
||||||
@EnableCustomSwagger2
|
@EnableCustomSwagger2
|
||||||
@EnableMyFeignClients
|
@EnableMyFeignClients(basePackages = ("com.couplet"))
|
||||||
@SpringBootApplication
|
@SpringBootApplication(scanBasePackages = {"com.couplet"})
|
||||||
public class CoupletElectronicFenceApplication {
|
public class CoupletBusinessApplication {
|
||||||
public static void main (String[] args) {
|
public static void main (String[] args) {
|
||||||
SpringApplication.run(CoupletElectronicFenceApplication.class, args);
|
SpringApplication.run(CoupletBusinessApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
package com.couplet.server.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.EmployeeService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
import com.couplet.common.core.web.page.TableDataInfo;
|
import com.couplet.common.core.web.page.TableDataInfo;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.common.system.domain.SysUser;
|
import com.couplet.common.system.domain.SysUser;
|
||||||
import com.couplet.server.service.EmployeeService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package com.couplet.map.server.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.FenceService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
|
import com.couplet.common.domain.Fence;
|
||||||
|
import com.couplet.common.domain.request.FenceConfig;
|
||||||
|
import com.couplet.common.domain.request.FenceRequest;
|
||||||
|
import com.couplet.common.domain.request.FenceUpdateRequest;
|
||||||
import com.couplet.common.log.annotation.Log;
|
import com.couplet.common.log.annotation.Log;
|
||||||
import com.couplet.common.log.enums.BusinessType;
|
import com.couplet.common.log.enums.BusinessType;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.map.common.domain.Fence;
|
|
||||||
import com.couplet.map.common.domain.request.FenceConfig;
|
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
|
||||||
import com.couplet.map.server.service.FenceService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -83,7 +83,7 @@ public class FenceController extends BaseController {
|
||||||
@DeleteMapping("/{fenceId}")
|
@DeleteMapping("/{fenceId}")
|
||||||
@RequiresPermissions("couplet:fence:fenceDelete")
|
@RequiresPermissions("couplet:fence:fenceDelete")
|
||||||
@Log(title = "电子围栏删除",businessType = BusinessType.DELETE)
|
@Log(title = "电子围栏删除",businessType = BusinessType.DELETE)
|
||||||
public Result<?> fenceDelete(@PathVariable Long fenceId){
|
public Result<?> fenceDelete(@PathVariable Long fenceId){
|
||||||
fenceService.removeByFenceId(fenceId);
|
fenceService.removeByFenceId(fenceId);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
|
@ -1,19 +1,17 @@
|
||||||
package com.couplet.map.server.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.LogoService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
|
import com.couplet.common.domain.Logo;
|
||||||
import com.couplet.common.log.annotation.Log;
|
import com.couplet.common.log.annotation.Log;
|
||||||
import com.couplet.common.log.enums.BusinessType;
|
import com.couplet.common.log.enums.BusinessType;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.map.common.domain.Logo;
|
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
|
||||||
import com.couplet.map.server.service.LogoService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,11 +1,11 @@
|
||||||
package com.couplet.server.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.ManageServer;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.log.annotation.Log;
|
import com.couplet.common.log.annotation.Log;
|
||||||
import com.couplet.common.log.enums.BusinessType;
|
import com.couplet.common.log.enums.BusinessType;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.common.system.domain.SysDept;
|
import com.couplet.common.system.domain.SysDept;
|
||||||
import com.couplet.server.service.ManageServer;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package com.couplet.trouble.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.SysTroubleService;
|
||||||
import com.couplet.common.core.domain.PageResult;
|
import com.couplet.common.core.domain.PageResult;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
|
import com.couplet.common.domain.CoupletTroubleCode;
|
||||||
|
import com.couplet.common.domain.CoupletTroubleGrade;
|
||||||
|
import com.couplet.common.domain.CoupletTroubleType;
|
||||||
|
import com.couplet.common.domain.request.TroubleResp;
|
||||||
import com.couplet.common.log.annotation.Log;
|
import com.couplet.common.log.annotation.Log;
|
||||||
import com.couplet.common.log.enums.BusinessType;
|
import com.couplet.common.log.enums.BusinessType;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleCode;
|
|
||||||
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
|
||||||
import com.couplet.trouble.domain.CoupletTroubleType;
|
|
||||||
import com.couplet.trouble.domain.resp.TroubleResp;
|
|
||||||
import com.couplet.trouble.service.SysTroubleService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
|
@ -1,16 +1,15 @@
|
||||||
package com.couplet.vehicle.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.VehicleService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
|
import com.couplet.common.domain.Vehicle;
|
||||||
|
import com.couplet.common.domain.request.VehicleEditParams;
|
||||||
|
import com.couplet.common.domain.request.VehicleInsertParams;
|
||||||
|
import com.couplet.common.domain.request.VehicleListParams;
|
||||||
import com.couplet.common.log.annotation.Log;
|
import com.couplet.common.log.annotation.Log;
|
||||||
import com.couplet.common.log.enums.BusinessType;
|
import com.couplet.common.log.enums.BusinessType;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.vehicle.domain.Vehicle;
|
|
||||||
import com.couplet.vehicle.domain.VehicleMiddle;
|
|
||||||
import com.couplet.vehicle.domain.req.VehicleEditParams;
|
|
||||||
import com.couplet.vehicle.domain.req.VehicleInsertParams;
|
|
||||||
import com.couplet.vehicle.domain.req.VehicleListParams;
|
|
||||||
import com.couplet.vehicle.service.VehicleService;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.couplet.server.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.VehicleManageService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.system.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.common.system.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.server.service.VehicleManageService;
|
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
|
@ -1,10 +1,10 @@
|
||||||
package com.couplet.vehicle.controller;
|
package com.couplet.business.server.controller;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.VehicleTypeService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.controller.BaseController;
|
import com.couplet.common.core.web.controller.BaseController;
|
||||||
|
import com.couplet.common.domain.VehicleType;
|
||||||
import com.couplet.common.security.annotation.RequiresPermissions;
|
import com.couplet.common.security.annotation.RequiresPermissions;
|
||||||
import com.couplet.vehicle.domain.VehicleType;
|
|
||||||
import com.couplet.vehicle.service.VehicleTypeService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.couplet.map.server.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.common.domain.Fence;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package com.couplet.map.server.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.map.common.domain.Fence;
|
|
||||||
import com.couplet.map.common.domain.request.FenceConfig;
|
import com.couplet.common.domain.Fence;
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
import com.couplet.common.domain.request.FenceConfig;
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
import com.couplet.common.domain.request.FenceRequest;
|
||||||
|
import com.couplet.common.domain.request.FenceUpdateRequest;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -19,7 +20,7 @@ public interface FenceMapper extends BaseMapper<Fence> {
|
||||||
* 改变围栏信息
|
* 改变围栏信息
|
||||||
* @param fenceUpdateRequest
|
* @param fenceUpdateRequest
|
||||||
*/
|
*/
|
||||||
void changeFence(FenceUpdateRequest fenceUpdateRequest);
|
void changeFence(FenceUpdateRequest fenceUpdateRequest);
|
||||||
|
|
||||||
int insertFence(FenceRequest fenceRequest);
|
int insertFence(FenceRequest fenceRequest);
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
package com.couplet.map.server.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.common.domain.Logo;
|
||||||
import com.couplet.map.common.domain.Logo;
|
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,10 +1,10 @@
|
||||||
package com.couplet.trouble.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleCode;
|
import com.couplet.common.domain.CoupletTroubleCode;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
import com.couplet.common.domain.CoupletTroubleGrade;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleType;
|
import com.couplet.common.domain.CoupletTroubleType;
|
||||||
import com.couplet.trouble.domain.resp.TroubleResp;
|
import com.couplet.common.domain.request.TroubleResp;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.couplet.vehicle.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.vehicle.domain.VehicleAndLogo;
|
import com.couplet.common.domain.VehicleAndLogo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
|
@ -1,8 +1,8 @@
|
||||||
package com.couplet.vehicle.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.vehicle.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.vehicle.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.couplet.vehicle.mapper;
|
package com.couplet.business.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.couplet.vehicle.domain.VehicleType;
|
import com.couplet.common.domain.VehicleType;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.couplet.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.page.TableDataInfo;
|
import com.couplet.common.core.web.page.TableDataInfo;
|
|
@ -1,7 +1,8 @@
|
||||||
package com.couplet.map.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.common.domain.Fence;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: LiJiaYao
|
* @Author: LiJiaYao
|
|
@ -1,10 +1,10 @@
|
||||||
package com.couplet.map.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.common.domain.Fence;
|
||||||
import com.couplet.map.common.domain.request.FenceConfig;
|
import com.couplet.common.domain.request.FenceConfig;
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
import com.couplet.common.domain.request.FenceRequest;
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
import com.couplet.common.domain.request.FenceUpdateRequest;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -27,7 +27,7 @@ public interface FenceService extends IService<Fence> {
|
||||||
*
|
*
|
||||||
* @param fenceRequest
|
* @param fenceRequest
|
||||||
*/
|
*/
|
||||||
void fenceInsert(HttpServletRequest request,FenceRequest fenceRequest);
|
void fenceInsert(HttpServletRequest request, FenceRequest fenceRequest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除电子围栏
|
* 删除电子围栏
|
|
@ -1,7 +1,8 @@
|
||||||
package com.couplet.map.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.map.common.domain.Logo;
|
import com.couplet.common.domain.Logo;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
package com.couplet.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.system.domain.SysDept;
|
import com.couplet.common.system.domain.SysDept;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package com.couplet.trouble.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.common.core.domain.PageResult;
|
import com.couplet.common.core.domain.PageResult;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleCode;
|
import com.couplet.common.domain.CoupletTroubleCode;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
import com.couplet.common.domain.CoupletTroubleGrade;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleType;
|
import com.couplet.common.domain.CoupletTroubleType;
|
||||||
import com.couplet.trouble.domain.resp.TroubleResp;
|
import com.couplet.common.domain.request.TroubleResp;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package com.couplet.vehicle.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.vehicle.domain.VehicleAndLogo;
|
import com.couplet.common.domain.VehicleAndLogo;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.couplet.server.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
|
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.system.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.common.system.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.couplet.vehicle.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.vehicle.domain.Vehicle;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.vehicle.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.vehicle.domain.req.VehicleEditParams;
|
import com.couplet.common.domain.request.VehicleEditParams;
|
||||||
import com.couplet.vehicle.domain.req.VehicleInsertParams;
|
import com.couplet.common.domain.request.VehicleInsertParams;
|
||||||
import com.couplet.vehicle.domain.req.VehicleListParams;
|
import com.couplet.common.domain.request.VehicleListParams;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package com.couplet.vehicle.service;
|
package com.couplet.business.server.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.couplet.vehicle.domain.VehicleType;
|
import com.couplet.common.domain.VehicleType;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.couplet.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.EmployeeService;
|
||||||
import com.couplet.common.core.constant.SecurityConstants;
|
import com.couplet.common.core.constant.SecurityConstants;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.web.page.TableDataInfo;
|
import com.couplet.common.core.web.page.TableDataInfo;
|
||||||
|
@ -8,7 +9,6 @@ import com.couplet.common.system.domain.LoginUser;
|
||||||
import com.couplet.common.system.domain.SysUser;
|
import com.couplet.common.system.domain.SysUser;
|
||||||
import com.couplet.common.system.remote.RemoteEmployeeService;
|
import com.couplet.common.system.remote.RemoteEmployeeService;
|
||||||
import com.couplet.common.system.remote.RemoteUserService;
|
import com.couplet.common.system.remote.RemoteUserService;
|
||||||
import com.couplet.server.service.EmployeeService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import java.util.List;
|
||||||
* @date 2024/3/31 19:42
|
* @date 2024/3/31 19:42
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class EmployeeServiceImpl implements EmployeeService{
|
public class EmployeeServiceImpl implements EmployeeService {
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
|
@ -1,9 +1,9 @@
|
||||||
package com.couplet.map.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.business.server.mapper.FenAndLogoMapper;
|
||||||
import com.couplet.map.server.mapper.FenAndLogoMapper;
|
import com.couplet.business.server.service.FenAndLogoService;
|
||||||
import com.couplet.map.server.service.FenAndLogoService;
|
import com.couplet.common.domain.Fence;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
|
@ -1,13 +1,13 @@
|
||||||
package com.couplet.map.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.business.server.mapper.FenceMapper;
|
||||||
import com.couplet.map.common.domain.request.FenceConfig;
|
import com.couplet.business.server.service.FenAndLogoService;
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
import com.couplet.business.server.service.FenceService;
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
import com.couplet.common.domain.Fence;
|
||||||
import com.couplet.map.server.mapper.FenceMapper;
|
import com.couplet.common.domain.request.FenceConfig;
|
||||||
import com.couplet.map.server.service.FenAndLogoService;
|
import com.couplet.common.domain.request.FenceRequest;
|
||||||
import com.couplet.map.server.service.FenceService;
|
import com.couplet.common.domain.request.FenceUpdateRequest;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -58,7 +58,7 @@ public class FenceServiceImpl extends ServiceImpl<FenceMapper, Fence> implements
|
||||||
* @param fenceRequest
|
* @param fenceRequest
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void fenceInsert(HttpServletRequest request,FenceRequest fenceRequest) {
|
public void fenceInsert(HttpServletRequest request, FenceRequest fenceRequest) {
|
||||||
|
|
||||||
//先添加围栏
|
//先添加围栏
|
||||||
int a= fenceMapper.insertFence(fenceRequest);
|
int a= fenceMapper.insertFence(fenceRequest);
|
|
@ -1,19 +1,14 @@
|
||||||
package com.couplet.map.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.map.common.domain.Fence;
|
import com.couplet.business.server.mapper.LogoMapper;
|
||||||
import com.couplet.map.common.domain.Logo;
|
import com.couplet.business.server.service.LogoService;
|
||||||
import com.couplet.map.common.domain.request.FenceRequest;
|
import com.couplet.common.domain.Logo;
|
||||||
import com.couplet.map.common.domain.request.FenceUpdateRequest;
|
|
||||||
import com.couplet.map.server.mapper.LogoMapper;
|
|
||||||
import com.couplet.map.server.service.LogoService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,18 +1,16 @@
|
||||||
package com.couplet.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.couplet.common.core.constant.SecurityConstants;
|
import com.couplet.business.server.service.ManageServer;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.utils.StringUtils;
|
|
||||||
import com.couplet.common.security.utils.SecurityUtils;
|
import com.couplet.common.security.utils.SecurityUtils;
|
||||||
import com.couplet.common.system.domain.LoginUser;
|
import com.couplet.common.system.domain.LoginUser;
|
||||||
import com.couplet.common.system.domain.SysDept;
|
import com.couplet.common.system.domain.SysDept;
|
||||||
import com.couplet.common.system.remote.RemoteDeptService;
|
import com.couplet.common.system.remote.RemoteDeptService;
|
||||||
import com.couplet.common.system.remote.RemoteUserService;
|
import com.couplet.common.system.remote.RemoteUserService;
|
||||||
import com.couplet.server.service.ManageServer;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,7 +20,7 @@ import java.util.List;
|
||||||
* @date 2024/3/27 15:34
|
* @date 2024/3/27 15:34
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ManageServiceImpl implements ManageServer{
|
public class ManageServiceImpl implements ManageServer {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RemoteDeptService remoteDeptService;
|
private RemoteDeptService remoteDeptService;
|
|
@ -1,13 +1,13 @@
|
||||||
package com.couplet.trouble.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.couplet.business.server.mapper.SysTroubleMapper;
|
||||||
|
import com.couplet.business.server.service.SysTroubleService;
|
||||||
import com.couplet.common.core.domain.PageResult;
|
import com.couplet.common.core.domain.PageResult;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleCode;
|
import com.couplet.common.domain.CoupletTroubleCode;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleGrade;
|
import com.couplet.common.domain.CoupletTroubleGrade;
|
||||||
import com.couplet.trouble.domain.CoupletTroubleType;
|
import com.couplet.common.domain.CoupletTroubleType;
|
||||||
import com.couplet.trouble.domain.resp.TroubleResp;
|
import com.couplet.common.domain.request.TroubleResp;
|
||||||
import com.couplet.trouble.mapper.SysTroubleMapper;
|
|
||||||
import com.couplet.trouble.service.SysTroubleService;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -22,7 +22,7 @@ import java.util.List;
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SysTroubleServiceImpl extends ServiceImpl<SysTroubleMapper, CoupletTroubleCode> implements SysTroubleService{
|
public class SysTroubleServiceImpl extends ServiceImpl<SysTroubleMapper, CoupletTroubleCode> implements SysTroubleService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysTroubleMapper sysTroubleMapper;
|
private SysTroubleMapper sysTroubleMapper;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.couplet.vehicle.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.vehicle.domain.VehicleAndLogo;
|
import com.couplet.business.server.mapper.VehicleAndLogoMapper;
|
||||||
import com.couplet.vehicle.mapper.VehicleAndLogoMapper;
|
import com.couplet.business.server.service.VehicleAndLogoService;
|
||||||
import com.couplet.vehicle.service.VehicleAndLogoService;
|
import com.couplet.common.domain.VehicleAndLogo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
|
@ -1,11 +1,11 @@
|
||||||
package com.couplet.server.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
|
import com.couplet.business.server.service.VehicleManageService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
|
import com.couplet.common.domain.Vehicle;
|
||||||
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.common.security.utils.SecurityUtils;
|
import com.couplet.common.security.utils.SecurityUtils;
|
||||||
import com.couplet.common.system.domain.Vehicle;
|
import com.couplet.remote.RemoteVehicleService;
|
||||||
import com.couplet.common.system.domain.VehicleMiddle;
|
|
||||||
import com.couplet.common.system.remote.RemoteVehicleService;
|
|
||||||
import com.couplet.server.service.VehicleManageService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import java.util.List;
|
||||||
* @date 2024/4/2 9:05
|
* @date 2024/4/2 9:05
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class VehicleManageServiceImpl implements VehicleManageService{
|
public class VehicleManageServiceImpl implements VehicleManageService {
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
|
@ -1,22 +1,21 @@
|
||||||
package com.couplet.vehicle.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.couplet.business.server.mapper.VehicleMapper;
|
||||||
|
import com.couplet.business.server.service.VehicleAndLogoService;
|
||||||
|
import com.couplet.business.server.service.VehicleService;
|
||||||
|
import com.couplet.business.server.service.VehicleTypeService;
|
||||||
import com.couplet.common.core.domain.Result;
|
import com.couplet.common.core.domain.Result;
|
||||||
import com.couplet.common.core.utils.StringUtils;
|
import com.couplet.common.core.utils.StringUtils;
|
||||||
import com.couplet.common.core.utils.uuid.UUID;
|
import com.couplet.common.core.utils.uuid.UUID;
|
||||||
import com.couplet.common.security.utils.SecurityUtils;
|
import com.couplet.common.domain.Vehicle;
|
||||||
import com.couplet.vehicle.domain.Vehicle;
|
import com.couplet.common.domain.VehicleMiddle;
|
||||||
import com.couplet.vehicle.domain.VehicleMiddle;
|
import com.couplet.common.domain.VehicleType;
|
||||||
import com.couplet.vehicle.domain.VehicleType;
|
import com.couplet.common.domain.request.VehicleEditParams;
|
||||||
import com.couplet.vehicle.domain.req.VehicleEditParams;
|
import com.couplet.common.domain.request.VehicleInsertParams;
|
||||||
import com.couplet.vehicle.domain.req.VehicleInsertParams;
|
import com.couplet.common.domain.request.VehicleListParams;
|
||||||
import com.couplet.vehicle.domain.req.VehicleListParams;
|
|
||||||
import com.couplet.vehicle.mapper.VehicleMapper;
|
|
||||||
import com.couplet.vehicle.service.VehicleAndLogoService;
|
|
||||||
import com.couplet.vehicle.service.VehicleService;
|
|
||||||
import com.couplet.vehicle.service.VehicleTypeService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
|
@ -1,10 +1,10 @@
|
||||||
package com.couplet.vehicle.service.impl;
|
package com.couplet.business.server.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.couplet.vehicle.domain.VehicleType;
|
import com.couplet.business.server.mapper.VehicleTypeMapper;
|
||||||
import com.couplet.vehicle.mapper.VehicleTypeMapper;
|
import com.couplet.business.server.service.VehicleTypeService;
|
||||||
import com.couplet.vehicle.service.VehicleTypeService;
|
import com.couplet.common.domain.VehicleType;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
|
@ -6,7 +6,7 @@ server:
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: couplet-electronic-fence
|
name: couplet-business
|
||||||
|
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.map.server.mapper.FenAndLogoMapper">
|
<mapper namespace="com.couplet.business.server.mapper.FenAndLogoMapper">
|
||||||
|
|
||||||
<resultMap id="map" type="com.couplet.map.common.domain.Fence">
|
<resultMap id="map" type="com.couplet.common.domain.Fence">
|
||||||
<id property="fenceId" column="fence_id"/>
|
<id property="fenceId" column="fence_id"/>
|
||||||
<result property="fenceName" column="fence_name"/>
|
<result property="fenceName" column="fence_name"/>
|
||||||
<result property="fenceDescription" column="fence_description"/>
|
<result property="fenceDescription" column="fence_description"/>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<result property="isDelete" column="is_delete" />
|
<result property="isDelete" column="is_delete" />
|
||||||
<result property="maintainerName" column="maintainer_name" />
|
<result property="maintainerName" column="maintainer_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="logoMap" type="com.couplet.map.common.domain.Logo">
|
<resultMap id="logoMap" type="com.couplet.common.domain.Logo">
|
||||||
<id property="logoId" column="logo_id"/>
|
<id property="logoId" column="logo_id"/>
|
||||||
<result property="logoName" column="logo_name" />
|
<result property="logoName" column="logo_name" />
|
||||||
</resultMap>
|
</resultMap>
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.map.server.mapper.FenceMapper">
|
<mapper namespace="com.couplet.business.server.mapper.FenceMapper">
|
||||||
|
|
||||||
<resultMap id="map" type="com.couplet.map.common.domain.Fence">
|
<resultMap id="map" type="com.couplet.common.domain.Fence">
|
||||||
<id property="fenceId" column="fence_id"/>
|
<id property="fenceId" column="fence_id"/>
|
||||||
<result property="fenceName" column="fence_name"/>
|
<result property="fenceName" column="fence_name"/>
|
||||||
<result property="fenceDescription" column="fence_description"/>
|
<result property="fenceDescription" column="fence_description"/>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<result property="isDelete" column="is_delete" />
|
<result property="isDelete" column="is_delete" />
|
||||||
<result property="maintainerName" column="maintainer_name" />
|
<result property="maintainerName" column="maintainer_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="logoMap" type="com.couplet.map.common.domain.Logo">
|
<resultMap id="logoMap" type="com.couplet.common.domain.Logo">
|
||||||
<id property="logoId" column="logo_id"/>
|
<id property="logoId" column="logo_id"/>
|
||||||
<result property="logoName" column="logo_name" />
|
<result property="logoName" column="logo_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
alarm_status
|
alarm_status
|
||||||
FROM couplet_fence_info
|
FROM couplet_fence_info
|
||||||
</sql>
|
</sql>
|
||||||
<insert id="insertFence" parameterType="com.couplet.map.common.domain.request.FenceRequest" keyProperty="fenceId"
|
<insert id="insertFence" parameterType="com.couplet.common.domain.request.FenceRequest" keyProperty="fenceId"
|
||||||
useGeneratedKeys="true">
|
useGeneratedKeys="true">
|
||||||
INSERT INTO `couplet-cloud`.`couplet_fence_info`
|
INSERT INTO `couplet-cloud`.`couplet_fence_info`
|
||||||
(`fence_name`, `fence_longitude_latitude`, `fence_description`, `is_delete`, `fence_state`, `create_time`,
|
(`fence_name`, `fence_longitude_latitude`, `fence_description`, `is_delete`, `fence_state`, `create_time`,
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="changeFence" parameterType="com.couplet.map.common.domain.request.FenceUpdateRequest">
|
<update id="changeFence" parameterType="com.couplet.common.domain.request.FenceUpdateRequest">
|
||||||
|
|
||||||
UPDATE `couplet-cloud`.`couplet_fence_info`
|
UPDATE `couplet-cloud`.`couplet_fence_info`
|
||||||
SET `fence_name` = #{fenceName},
|
SET `fence_name` = #{fenceName},
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
delete from couplet_fence_info where fence_id = #{fenceId}
|
delete from couplet_fence_info where fence_id = #{fenceId}
|
||||||
</delete>
|
</delete>
|
||||||
<select id="pageQuery" resultMap="map"
|
<select id="pageQuery" resultMap="map"
|
||||||
parameterType="com.couplet.map.common.domain.request.FenceConfig">
|
parameterType="com.couplet.common.domain.request.FenceConfig">
|
||||||
<include refid="selectFence"></include>
|
<include refid="selectFence"></include>
|
||||||
<where>
|
<where>
|
||||||
<if test="fenceName!=null and fenceName!='' ">
|
<if test="fenceName!=null and fenceName!='' ">
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.trouble.mapper.SysTroubleMapper">
|
<mapper namespace="com.couplet.business.server.mapper.SysTroubleMapper">
|
||||||
|
|
||||||
<resultMap type="com.couplet.trouble.domain.CoupletTroubleCode" id="SysTroubleResult">
|
<resultMap type="com.couplet.common.domain.CoupletTroubleCode" id="SysTroubleResult">
|
||||||
<id property="troubleId" column="trouble_id"/>
|
<id property="troubleId" column="trouble_id"/>
|
||||||
<result property="troubleCode" column="trouble_code"/>
|
<result property="troubleCode" column="trouble_code"/>
|
||||||
<result property="troubleValue" column="trouble_value"/>
|
<result property="troubleValue" column="trouble_value"/>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
LEFT JOIN couplet_trouble_type y on t.type_id= y.type_id
|
LEFT JOIN couplet_trouble_type y on t.type_id= y.type_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectTroubleList" parameterType="com.couplet.trouble.mapper.SysTroubleMapper" resultMap="SysTroubleResult">
|
<select id="selectTroubleList" parameterType="com.couplet.business.server.mapper.SysTroubleMapper" resultMap="SysTroubleResult">
|
||||||
<include refid="selectTroubleVo"/>
|
<include refid="selectTroubleVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="troubleCode != null and troubleCode != ''">
|
<if test="troubleCode != null and troubleCode != ''">
|
||||||
|
@ -31,10 +31,10 @@
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectTroubleListByType" resultType="com.couplet.trouble.domain.CoupletTroubleType">
|
<select id="selectTroubleListByType" resultType="com.couplet.common.domain.CoupletTroubleType">
|
||||||
select * from couplet_trouble_type
|
select * from couplet_trouble_type
|
||||||
</select>
|
</select>
|
||||||
<select id="selectTroubleListByGrade" resultType="com.couplet.trouble.domain.CoupletTroubleGrade">
|
<select id="selectTroubleListByGrade" resultType="com.couplet.common.domain.CoupletTroubleGrade">
|
||||||
select * from couplet_trouble_grade
|
select * from couplet_trouble_grade
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.vehicle.mapper.VehicleAndLogoMapper">
|
<mapper namespace="com.couplet.business.server.mapper.VehicleAndLogoMapper">
|
||||||
|
|
||||||
|
|
||||||
<insert id="vehicleBindLogo">
|
<insert id="vehicleBindLogo">
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.vehicle.mapper.VehicleMapper">
|
<mapper namespace="com.couplet.business.server.mapper.VehicleMapper">
|
||||||
|
|
||||||
|
|
||||||
<sql id="selectMiddleUserOrVehicle">
|
<sql id="selectMiddleUserOrVehicle">
|
||||||
|
@ -51,13 +51,13 @@
|
||||||
where middle_id = #{middleId}
|
where middle_id = #{middleId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="UserUnderTheVehicleList" resultType="com.couplet.vehicle.domain.Vehicle">
|
<select id="UserUnderTheVehicleList" resultType="com.couplet.common.domain.Vehicle">
|
||||||
<include refid="selectMiddleUserOrVehicle"/>
|
<include refid="selectMiddleUserOrVehicle"/>
|
||||||
<if test="userId!=null">
|
<if test="userId!=null">
|
||||||
AND m.user_id = #{userId}
|
AND m.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="vehicleAll" resultType="com.couplet.vehicle.domain.Vehicle">
|
<select id="vehicleAll" resultType="com.couplet.common.domain.Vehicle">
|
||||||
<include refid="selectVehicle"/>
|
<include refid="selectVehicle"/>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.couplet.vehicle.mapper.VehicleTypeMapper">
|
<mapper namespace="com.couplet.business.server.mapper.VehicleTypeMapper">
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,38 +0,0 @@
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea/modules.xml
|
|
||||||
.idea/jarRepositories.xml
|
|
||||||
.idea/compiler.xml
|
|
||||||
.idea/libraries/
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Mac OS ###
|
|
||||||
.DS_Store
|
|
|
@ -1,38 +0,0 @@
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea/modules.xml
|
|
||||||
.idea/jarRepositories.xml
|
|
||||||
.idea/compiler.xml
|
|
||||||
.idea/libraries/
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Mac OS ###
|
|
||||||
.DS_Store
|
|
|
@ -1,34 +0,0 @@
|
||||||
<?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.couplet</groupId>
|
|
||||||
<artifactId>couplet-electronic-fence</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
|
|
||||||
<artifactId>couplet-electronic-fence-common</artifactId>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
couplet-electronic-fence-common
|
|
||||||
</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>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.couplet</groupId>
|
|
||||||
<artifactId>couplet-common-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,38 +0,0 @@
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea/modules.xml
|
|
||||||
.idea/jarRepositories.xml
|
|
||||||
.idea/compiler.xml
|
|
||||||
.idea/libraries/
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Mac OS ###
|
|
||||||
.DS_Store
|
|
|
@ -1,29 +0,0 @@
|
||||||
<?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.couplet</groupId>
|
|
||||||
<artifactId>couplet-electronic-fence</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>couplet-electronic-fence-remote</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>com.couplet</groupId>
|
|
||||||
<artifactId>couplet-electronic-fence-common</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,38 +0,0 @@
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea/modules.xml
|
|
||||||
.idea/jarRepositories.xml
|
|
||||||
.idea/compiler.xml
|
|
||||||
.idea/libraries/
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Mac OS ###
|
|
||||||
.DS_Store
|
|
|
@ -1,33 +0,0 @@
|
||||||
import org.apache.kafka.clients.producer.KafkaProducer;
|
|
||||||
import org.apache.kafka.clients.producer.ProducerRecord;
|
|
||||||
|
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: LiJiaYao
|
|
||||||
* @Date: 2024/4/1
|
|
||||||
* 异步发送
|
|
||||||
*/
|
|
||||||
public class test {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
|
|
||||||
Properties props = new Properties();
|
|
||||||
props.put("bootstrap.servers","39.103.133.136:9092");
|
|
||||||
//使用默认的配置
|
|
||||||
// props.put("acks","all");
|
|
||||||
// props.put("retries",0);
|
|
||||||
// props.put("batch.size",16384);
|
|
||||||
// props.put("linger.ms",1);
|
|
||||||
// props.put("buffer.memory",33554432);
|
|
||||||
props.put("key.serializer","org.apache.kafka.common.serialization.StringSerializer");
|
|
||||||
props.put("value.serializer","org.apache.kafka.common.serialization.StringSerializer");
|
|
||||||
KafkaProducer<String, String> producer = new KafkaProducer<>(props);
|
|
||||||
for (int i = 0; i < 10; i++) {
|
|
||||||
producer.send(new ProducerRecord<String,String>("my-topic",Integer.toString(i),Integer.toString(i)));
|
|
||||||
}
|
|
||||||
producer.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
import org.apache.kafka.clients.producer.KafkaProducer;
|
|
||||||
import org.apache.kafka.clients.producer.Producer;
|
|
||||||
import org.apache.kafka.clients.producer.ProducerRecord;
|
|
||||||
import org.apache.kafka.clients.producer.RecordMetadata;
|
|
||||||
import org.yaml.snakeyaml.introspector.Property;
|
|
||||||
|
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
|
||||||
import java.util.concurrent.Future;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: LiJiaYao
|
|
||||||
* @Date: 2024/4/1
|
|
||||||
* 同步发送
|
|
||||||
*/
|
|
||||||
public class test2 {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
|
|
||||||
Properties properties = new Properties();
|
|
||||||
properties.put("bootstrap.servers", "39.103.133.136:9092");
|
|
||||||
properties.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
|
|
||||||
properties.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
|
|
||||||
KafkaProducer<String, String> producer = new KafkaProducer<String, String>(properties);
|
|
||||||
for (int i = 0; i < 10; i++) {
|
|
||||||
Future<RecordMetadata> result = producer.send(new ProducerRecord<>("test", Integer.toString(i), Integer.toString(i)));
|
|
||||||
try {
|
|
||||||
RecordMetadata recordMetadata =result.get();
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (ExecutionException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
producer.close();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
<?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.couplet</groupId>
|
|
||||||
<artifactId>couplet-modules</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<artifactId>couplet-electronic-fence</artifactId>
|
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>couplet-electronic-fence-server</module>
|
|
||||||
<module>couplet-electronic-fence-common</module>
|
|
||||||
<module>couplet-electronic-fence-remote</module>
|
|
||||||
</modules>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,30 +0,0 @@
|
||||||
<?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.couplet</groupId>
|
|
||||||
<artifactId>couplet-enterprisemanagement</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>couplet-enterprisemanagement-common</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>com.couplet</groupId>
|
|
||||||
<artifactId>couplet-common-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.couplet</groupId>
|
|
||||||
<artifactId>couplet-common-system</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,34 +0,0 @@
|
||||||
<?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.couplet</groupId>
|
|
||||||
<artifactId>couplet-enterprisemanagement</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>couplet-enterprisemanagement-remote</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>com.couplet</groupId>
|
|
||||||
<artifactId>couplet-enterprisemanagement-common</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.couplet</groupId>
|
|
||||||
<artifactId>couplet-common-security</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.couplet</groupId>
|
|
||||||
<artifactId>couplet-common-security</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue