[fea]
[离线模式 大理适配]
This commit is contained in:
yangyakun
2024-10-22 10:15:43 +08:00
parent 51c196256e
commit cf216e0e3a
2 changed files with 33 additions and 7 deletions

View File

@@ -25,5 +25,8 @@ public interface IBascApiService {
@GET("/och-vehicle/public/car/queryBindLineListBySn")
Observable<BindLineListResponse> queryBindLineListBySn(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
@GET("/och-shuttle-cabin/api/business/v1/driver/queryBindLineListBySn")
Observable<BindLineListResponse> daliQueryBindLineListBySn(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn);
}

View File

@@ -2,6 +2,7 @@ package com.mogo.och.offline.net
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.env.ProjectUtils
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.commons.storage.SharedPrefsMgr
import com.mogo.och.common.module.constant.OchCommonConst
@@ -24,12 +25,34 @@ object OrderServiceManager {
fun queryBindLineListBySn(
callback: OchCommonServiceCallback<BindLineListResponse>?
) {
mService.queryBindLineListBySn(
MoGoAiCloudClientConfig.getInstance().serviceAppId,
SharedPrefsMgr.getInstance().token,
SharedPrefsMgr.getInstance().sn
)
.transformIoTry()
.subscribe(OchCommonSubscribeImpl(AbsMogoApplication.getApp(), callback, "queryBindLineListBySn"))
if(ProjectUtils.isSaas()) {
mService.queryBindLineListBySn(
MoGoAiCloudClientConfig.getInstance().serviceAppId,
SharedPrefsMgr.getInstance().token,
SharedPrefsMgr.getInstance().sn
)
.transformIoTry()
.subscribe(
OchCommonSubscribeImpl(
AbsMogoApplication.getApp(),
callback,
"queryBindLineListBySn"
)
)
}else if(ProjectUtils.isDali()){
mService.daliQueryBindLineListBySn(
MoGoAiCloudClientConfig.getInstance().serviceAppId,
SharedPrefsMgr.getInstance().token,
SharedPrefsMgr.getInstance().sn
)
.transformIoTry()
.subscribe(
OchCommonSubscribeImpl(
AbsMogoApplication.getApp(),
callback,
"queryBindLineListBySn"
)
)
}
}
}