[opt3.0]HttpDns改版接口补交
This commit is contained in:
@@ -12,17 +12,17 @@ interface TrafficLightApiService {
|
||||
|
||||
//获取前方路口RoadID
|
||||
@FormUrlEncoded
|
||||
@POST("ai-roadInfo-service/cross/near")
|
||||
@POST("eagle-eye-dns/ai-roadInfo-service/cross/near")
|
||||
suspend fun getFrontRoadID(@FieldMap roadID: Map<String, String>): BaseResponse<RoadIDResult>
|
||||
|
||||
//获取前方红绿灯状态
|
||||
@FormUrlEncoded
|
||||
@POST("mec-etl-server/light/bgd/channel/realTime")
|
||||
@POST("eagle-eye-dns/mec-etl-server/light/bgd/channel/realTime")
|
||||
suspend fun getTrafficLight(@FieldMap status: Map<String, String>): BaseResponse<TrafficLightResult>
|
||||
|
||||
//变灯
|
||||
@FormUrlEncoded
|
||||
@POST("mec-etl-server/light/bdg/newTask")
|
||||
@POST("eagle-eye-dns/mec-etl-server/light/bdg/newTask")
|
||||
suspend fun changeLight(@FieldMap turnLight: Map<String, String>): BaseResponse<TrafficLightControl>
|
||||
|
||||
}
|
||||
@@ -1,18 +1,18 @@
|
||||
package com.mogo.eagle.function.biz.v2x.trafficlight.network
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.network.apiCall
|
||||
import com.mogo.eagle.core.network.cancel
|
||||
import com.mogo.eagle.core.network.request
|
||||
import com.mogo.commons.constants.HostConst.CITY_HOST
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
|
||||
class TrafficLightNetWorkModel {
|
||||
|
||||
private fun getNetWorkApi(baseUrl: String = CITY_HOST): TrafficLightApiService {
|
||||
private fun getNetWorkApi(baseUrl: String = HostConst.getEagleHost()): TrafficLightApiService {
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl)
|
||||
.create(TrafficLightApiService::class.java)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import retrofit2.http.*
|
||||
interface VipApiService {
|
||||
|
||||
//查询是否为VIP车辆
|
||||
@GET("/dataService/carUser/getVipStatusBySn")
|
||||
@GET("eagle-eye-dns/dataService/carUser/getVipStatusBySn")
|
||||
suspend fun requestVip(@Query("sn") sn: String): BaseResponse<VipRequest>
|
||||
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
package com.mogo.eagle.function.biz.v2x.vip.network
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.data.v2x.VipRequest
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.network.apiCall
|
||||
import com.mogo.eagle.core.network.request
|
||||
import com.mogo.commons.constants.HostConst.DATA_SERVICE_HOST
|
||||
|
||||
|
||||
class VipNetWorkModel {
|
||||
|
||||
private fun getNetWorkApi(baseUrl: String = DATA_SERVICE_HOST): VipApiService {
|
||||
private fun getNetWorkApi(baseUrl: String = HostConst.getEagleHost()): VipApiService {
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl)
|
||||
.create(VipApiService::class.java)
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ import retrofit2.http.*
|
||||
internal interface BadCaseApi {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-vehicle-management-service/tool/badcase/add/v2")
|
||||
@POST("eagle-eye-dns/yycp-vehicle-management-service/tool/badcase/add/v2")
|
||||
suspend fun post(@FieldMap map: Map<String, String>): Response<UploadResult>
|
||||
|
||||
@GET("/yycp-vehicle-management-service/tool/badcase/reasons")
|
||||
@GET("eagle-eye-dns/yycp-vehicle-management-service/tool/badcase/reasons")
|
||||
suspend fun get(@Query("channel", encoded = true) channel: String, @Query("pageNo") pageNo: Int): Response<BadCaseResponse>
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.elegant.network.utils.GsonUtil
|
||||
import com.elegant.network.utils.SignUtil
|
||||
import com.elegant.utils.CommonUtils
|
||||
import com.mogo.cloud.network.RetrofitFactory
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.eagle.core.function.v2x.internal.V2XManager
|
||||
import com.mogo.eagle.core.function.v2x.internal.config.V2XConfig
|
||||
import com.mogo.eagle.core.function.v2x.internal.data.V2XLocation
|
||||
@@ -26,7 +27,7 @@ internal class V2XRefreshModel {
|
||||
callback: IV2XRefreshCallback<V2XMarkerResponse>?
|
||||
): Disposable? {
|
||||
val config = V2XManager.getConfig()
|
||||
val retrofit = RetrofitFactory.getInstance(config.baseUrl) ?: return null
|
||||
val retrofit = RetrofitFactory.getInstance(HostConst.getEagleHost()) ?: return null
|
||||
return retrofit
|
||||
.create(V2XApiService::class.java)
|
||||
.querySnapshotSync(buildParams(longitude, latitude, config))
|
||||
|
||||
@@ -9,6 +9,6 @@ import retrofit2.http.POST
|
||||
internal interface V2XApiService {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-launcherSnapshot/launcherSnapshot/querySnapshotSync")
|
||||
@POST("eagle-eye-dns/yycp-launcherSnapshot/launcherSnapshot/querySnapshotSync")
|
||||
fun querySnapshotSync(@FieldMap parameters: Map<String, @JvmSuppressWildcards Any>): Maybe<V2XMarkerResponse?>
|
||||
}
|
||||
Reference in New Issue
Block a user