From fb1dc85a9ae6a9b8426ec5e29eb0139933ebe233 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期日, 29 九月 2019 11:22:24 +0800 Subject: [PATCH] 新增接口: 1. 获取某设备某时间段的数据流个数 --- src/main/kotlin/com/flightfeather/obd/lightshare/service/impl/ObdDataServiceImpl.kt | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/com/flightfeather/obd/lightshare/service/impl/ObdDataServiceImpl.kt b/src/main/kotlin/com/flightfeather/obd/lightshare/service/impl/ObdDataServiceImpl.kt index 592810c..c2babe3 100644 --- a/src/main/kotlin/com/flightfeather/obd/lightshare/service/impl/ObdDataServiceImpl.kt +++ b/src/main/kotlin/com/flightfeather/obd/lightshare/service/impl/ObdDataServiceImpl.kt @@ -1,8 +1,8 @@ package com.flightfeather.obd.lightshare.service.impl -import com.flightfeather.obd.lightshare.bean.ObdDataVo +import com.flightfeather.obd.lightshare.bean.* import com.flightfeather.obd.lightshare.service.ObdDataService -import com.flightfeather.obd.repository.ObdDataRepository +import com.flightfeather.obd.repository.* import org.springframework.stereotype.Service /** @@ -10,10 +10,32 @@ * Date: 2019/8/27 */ @Service -class ObdDataServiceImpl(val obdDataRepository: ObdDataRepository) : ObdDataService { +class ObdDataServiceImpl( + val obdDataRepository: ObdDataRepository, + val carLoginRepository: CarLoginRepository, + val carLogoutRepository: CarLogoutRepository, + val obdInfoRepository: ObdInfoRepository, + val dataStreamRepository: DataStreamRepository +) : ObdDataService { - override fun getDataByVinCode(vinCode: String, pageNum: Int?, pageSize: Int?): MutableList<ObdDataVo> { - return obdDataRepository.getDataByVinCode(vinCode, pageNum, pageSize) - } + override fun getDataByVinCode(vinCode: String, pageNum: Int?, pageSize: Int?): MutableList<ObdDataVo> + = obdDataRepository.getDataByVinCode(vinCode, pageNum, pageSize) + override fun getLoginData(deviceCode: String, pageNum: Int?, pageSize: Int?, startTime: String?, endTime: String?): List<CarLoginVo> + = carLoginRepository.getLoginData(deviceCode, pageNum, pageSize, startTime, endTime) + + override fun getLogoutData(deviceCode: String, pageNum: Int?, pageSize: Int?, startTime: String?, endTime: String?): List<CarLogoutVo> + = carLogoutRepository.getLogoutData(deviceCode, pageNum, pageSize, startTime, endTime) + + override fun getObdInfo(deviceCode: String, pageNum: Int?, pageSize: Int?): List<ObdInfoVo> + = obdInfoRepository.getObdInfo(deviceCode, pageNum, pageSize) + + override fun getDataStream(deviceCode: String, pageNum: Int?, pageSize: Int?, startTime: String?, endTime: String?): List<DataStreamVo> + = dataStreamRepository.getDataStream(deviceCode, pageNum, pageSize, startTime, endTime) + + override fun getDataStreamCount(deviceCode: String, startTime: String?, endTime: String?): Int + = dataStreamRepository.getDataStreamCount(deviceCode, startTime, endTime) + + override fun getCoordinate(deviceCode: String): LatLngVo + = dataStreamRepository.getCoordinate(deviceCode) } \ No newline at end of file -- Gitblit v1.9.3