package com.flightfeather.uav.lightshare.service.impl
|
|
import com.flightfeather.uav.biz.datafetch.ShenXinDataFetch
|
import com.flightfeather.uav.common.exception.BizException
|
import com.flightfeather.uav.lightshare.eunm.ThirdPartyLabel
|
import com.flightfeather.uav.lightshare.service.ThirdPartyService
|
import com.flightfeather.uav.socket.eunm.UWDeviceType
|
import org.springframework.stereotype.Service
|
import java.time.LocalDateTime
|
|
/**
|
*
|
* @date 2024/8/26
|
* @author feiyu02
|
*/
|
@Service
|
class ThirdPartyServiceImpl(private val shenXinDataFetch: ShenXinDataFetch) : ThirdPartyService {
|
|
override fun fetchMissionData(label: String, missionCode: String): Boolean {
|
when (label) {
|
ThirdPartyLabel.ShenXin.value -> {
|
shenXinDataFetch.fetchMissionData(missionCode)
|
return true
|
}
|
else -> throw BizException("第三方接口标识不存在")
|
}
|
}
|
|
override fun fetchLatestData(
|
label: String, type: UWDeviceType, deviceCode: String, startTime: LocalDateTime?, endTime: LocalDateTime?,
|
): Boolean {
|
when (label) {
|
ThirdPartyLabel.ShenXin.value -> {
|
shenXinDataFetch.fetchLatestData(type, deviceCode, startTime, endTime)
|
return true
|
}
|
else -> throw BizException("第三方接口标识不存在")
|
}
|
}
|
}
|