diff --git a/couplet-common/couplet-common-business/src/main/java/com/couplet/common/domain/request/RealTimeDataRequest.java b/couplet-common/couplet-common-business/src/main/java/com/couplet/common/domain/request/RealTimeDataRequest.java new file mode 100644 index 0000000..5135e00 --- /dev/null +++ b/couplet-common/couplet-common-business/src/main/java/com/couplet/common/domain/request/RealTimeDataRequest.java @@ -0,0 +1,27 @@ +package com.couplet.common.domain.request; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + +/** + * @author fufanrui + * @version 1.0 + * @description: 车辆实时数据请求参数 + * @date 2024/4/4 14:35 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class RealTimeDataRequest { + + + private Integer userId; + + private String vin; + + + +} diff --git a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/controller/VehicleDetectionController.java b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/controller/VehicleDetectionController.java new file mode 100644 index 0000000..8e7f851 --- /dev/null +++ b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/controller/VehicleDetectionController.java @@ -0,0 +1,53 @@ +package com.couplet.business.server.controller; + +import com.couplet.business.server.service.VehicleDetectionService; +import com.couplet.common.core.domain.Result; +import com.couplet.common.domain.Vehicle; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @author fufanrui + * @version 1.0 + * @description: 车辆检测控制器 + * @date 2024/4/4 10:11 + */ + +@RestController +@RequestMapping("detection") +public class VehicleDetectionController { + + + @Autowired + private VehicleDetectionService vehicleDetectionService; + + /* + * @param : + * @return Result> + * @author 付凡芮 + * @description 查询上线的车辆信息 + * @date + */ + @PostMapping("/detectionList") + public Result> detectionList() { + return Result.success(vehicleDetectionService.detectionList()); + } + + + /* + * @param vin: + * @return Result> + * @author 付凡芮 + * @description 根据vin查询车辆信息 + * @date + */ + @PostMapping("/findByVin/{vehicleId}") + public Result> findByVin(@PathVariable("vehicleId") Integer vehicleId) { + return Result.success(vehicleDetectionService.findByVin(vehicleId)); + } +} diff --git a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/mapper/VehicleDetectionMapper.java b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/mapper/VehicleDetectionMapper.java new file mode 100644 index 0000000..33ab95a --- /dev/null +++ b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/mapper/VehicleDetectionMapper.java @@ -0,0 +1,13 @@ +package com.couplet.business.server.mapper; + +import com.couplet.common.domain.Vehicle; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface VehicleDetectionMapper { + List detectionList(); + + List findByVin(Integer vehicleId); +} diff --git a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/VehicleDetectionService.java b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/VehicleDetectionService.java new file mode 100644 index 0000000..2da84f6 --- /dev/null +++ b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/VehicleDetectionService.java @@ -0,0 +1,13 @@ +package com.couplet.business.server.service; + +import com.couplet.common.core.domain.Result; +import com.couplet.common.domain.Vehicle; + +import java.util.List; + +public interface VehicleDetectionService { + + List detectionList(); + + List findByVin(Integer vehicleId); +} diff --git a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java new file mode 100644 index 0000000..d0d29ce --- /dev/null +++ b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java @@ -0,0 +1,34 @@ +package com.couplet.business.server.service.impl; + +import com.couplet.business.server.mapper.VehicleDetectionMapper; +import com.couplet.business.server.service.VehicleDetectionService; +import com.couplet.business.server.service.VehicleManageService; +import com.couplet.common.core.domain.Result; +import com.couplet.common.domain.Vehicle; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author fufanrui + * @version 1.0 + * @description: 车辆检测服务实现类 + * @date 2024/4/4 10:23 + */ +@Service +public class VehicleDetectionServiceImpl implements VehicleDetectionService{ + + @Autowired + private VehicleDetectionMapper vehicleDetectionMapper; + + @Override + public List detectionList() { + return vehicleDetectionMapper.detectionList(); + } + + @Override + public List findByVin(Integer vehicleId) { + return vehicleDetectionMapper.findByVin(vehicleId); + } +} diff --git a/couplet-modules/couplet-business/src/main/resources/mapper/business/VehicleDetectionMapper.xml b/couplet-modules/couplet-business/src/main/resources/mapper/business/VehicleDetectionMapper.xml new file mode 100644 index 0000000..bf0db67 --- /dev/null +++ b/couplet-modules/couplet-business/src/main/resources/mapper/business/VehicleDetectionMapper.xml @@ -0,0 +1,36 @@ + + + + + + SELECT + v.vehicle_id, + v.vehicle_type, + v.motor_manufacturer, + v.battery_manufacturer, + v.motor_number, + v.battery_number, + v.vin, + v.vehicle_state, + v.isdelete, + t.vehicle_type_id, + t.vehicle_type_name + FROM + couplet_vehicle v + LEFT JOIN couplet_vehicle_type t ON v.vehicle_type = t.vehicle_type_id + WHERE v.isdelete = 0 + + + + diff --git a/couplet-modules/couplet-file/src/main/resources/bootstrap.yml b/couplet-modules/couplet-file/src/main/resources/bootstrap.yml index b0d1d24..8681657 100644 --- a/couplet-modules/couplet-file/src/main/resources/bootstrap.yml +++ b/couplet-modules/couplet-file/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 - namespace: 172469 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 config: # 配置中心地址 server-addr: 121.89.211.230:8848 - namespace: 172469 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/couplet-modules/couplet-gen/src/main/resources/bootstrap.yml b/couplet-modules/couplet-gen/src/main/resources/bootstrap.yml index b024662..d2834c9 100644 --- a/couplet-modules/couplet-gen/src/main/resources/bootstrap.yml +++ b/couplet-modules/couplet-gen/src/main/resources/bootstrap.yml @@ -17,11 +17,11 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 - namespace: 172469 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 config: # 配置中心地址 server-addr: 121.89.211.230:8848 - namespace: 172469 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/couplet-modules/couplet-job/src/main/resources/bootstrap.yml b/couplet-modules/couplet-job/src/main/resources/bootstrap.yml index bb8e219..3b56a22 100644 --- a/couplet-modules/couplet-job/src/main/resources/bootstrap.yml +++ b/couplet-modules/couplet-job/src/main/resources/bootstrap.yml @@ -17,11 +17,11 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 - namespace: 172469 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 config: # 配置中心地址 server-addr: 121.89.211.230:8848 - namespace: 172469 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/couplet-modules/couplet-system/src/main/resources/bootstrap.yml b/couplet-modules/couplet-system/src/main/resources/bootstrap.yml index aeddeaa..d9315bd 100644 --- a/couplet-modules/couplet-system/src/main/resources/bootstrap.yml +++ b/couplet-modules/couplet-system/src/main/resources/bootstrap.yml @@ -4,7 +4,6 @@ server: # Spring spring: - application: # 应用名称 name: couplet-system diff --git a/couplet-visual/couplet-monitor/src/main/resources/bootstrap.yml b/couplet-visual/couplet-monitor/src/main/resources/bootstrap.yml index d219500..94d42fc 100644 --- a/couplet-visual/couplet-monitor/src/main/resources/bootstrap.yml +++ b/couplet-visual/couplet-monitor/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 - namespace: 172469 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 config: # 配置中心地址 server-addr: 121.89.211.230:8848 - namespace: 172469 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 # 配置文件格式 file-extension: yml # 共享配置