[dev_arch_opt_3.0]
[Change] [ 1、更改接口地址将需要进行DNS转换的接口和部分通用接口统一由服务端进行中转解析 ]
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.chat.facade.net
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.JsonObject
|
||||
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.chat.UserInfo
|
||||
import com.mogo.eagle.core.function.api.chat.biz.ChatConsts
|
||||
@@ -33,7 +34,7 @@ internal class ChatServiceModel {
|
||||
val sns = arrayListOf(sn)
|
||||
val requestData = SnArrayRequestBody().also { it.sns = sns }
|
||||
return apiCall {
|
||||
getNetWorkApi(getConfig())?.queryUserInfoBySnS(requestData)
|
||||
getNetWorkApi()?.queryUserInfoBySnS(requestData)
|
||||
?: throw IllegalStateException("apis is null.")
|
||||
}.let { itx ->
|
||||
if (itx.code != 0 && itx.code != 200) {
|
||||
@@ -120,7 +121,7 @@ internal class ChatServiceModel {
|
||||
return call.invoke()
|
||||
}
|
||||
|
||||
private fun getNetWorkApi(baseUrl: String = ChatHttp.getBaseUrl()): HttpApi? {
|
||||
private fun getNetWorkApi(baseUrl: String = HostConst.getEagleHost()): HttpApi? {
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl).create(HttpApi::class.java)
|
||||
}
|
||||
}
|
||||
@@ -128,7 +129,7 @@ internal class ChatServiceModel {
|
||||
internal interface HttpApi {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-chat-service/car/voiceRoom/no/operate/v1")
|
||||
@POST("eagle-eye-dns/yycp-chat-service/car/voiceRoom/no/operate/v1")
|
||||
suspend fun requestConnectStatus(
|
||||
@Query("sn") sn: String,
|
||||
@FieldMap connectStatus: Map<String, String>
|
||||
@@ -136,24 +137,24 @@ internal interface HttpApi {
|
||||
|
||||
//邀请加入车队
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-chat-service/car/chat/no/inviteJoinTeam/v1")
|
||||
@POST("eagle-eye-dns/yycp-chat-service/car/chat/no/inviteJoinTeam/v1")
|
||||
suspend fun inviteJoinVehicleTeam(@FieldMap inviteVehicleTeam: Map<String, String>): BaseResponse<Any>
|
||||
|
||||
//车队状态同步
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-chat-service/car/chat/no/operateTeamRoom/v1")
|
||||
@POST("eagle-eye-dns/yycp-chat-service/car/chat/no/operateTeamRoom/v1")
|
||||
suspend fun requestVehicleTeamConnectStatus(@FieldMap connectStatus: Map<String, String>): BaseResponse<Any>
|
||||
|
||||
//查询用户是否在线
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-chat-service/car/queryOnLineBySn/v1")
|
||||
@POST("eagle-eye-dns/yycp-chat-service/car/queryOnLineBySn/v1")
|
||||
suspend fun isOnLine(@FieldMap onLine: Map<String, String>): BaseResponse<OnLineStatus>
|
||||
|
||||
@POST("/yycp-realtimeLocations/realTimeLocationServer/queryRsAncCarAndUserInfoBySns")
|
||||
@POST("eagle-eye-dns/yycp-realtimeLocations/realTimeLocationServer/queryRsAncCarAndUserInfoBySns")
|
||||
suspend fun queryUserInfoBySnS(@Body body: SnArrayRequestBody): BaseResponse<JsonObject>
|
||||
|
||||
//语音房间信息,原路径dataService
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-chat-service/car/sender/no/createRoom/v1")
|
||||
@POST("eagle-eye-dns/yycp-chat-service/car/sender/no/createRoom/v1")
|
||||
suspend fun requestRoomInfo(@FieldMap roomInfo: Map<String, String>): BaseResponse<RoomInfo>
|
||||
}
|
||||
Reference in New Issue
Block a user